Archive / Category / Code

I’ve had several people contact me about my radial menus design and proof of concept for Blender that I showed here a couple of months ago. Progress on it had come to a standstill, while I was waiting for a limitation in Blender’s input system to be overcome. Previously, it wasn’t possible to detect in Blender if a key other than Ctrl Shift or Alt was held down, which meant that the fast menu selection method of holding down a key temporarily could only work when bound to combinations of those keys, and not most other hotkeys used in Blender.

Jean-Luc ‘lukep’ plans to work on improving this area of Blender when he works on refactoring the low-level input events system in Blender, and I’d put the menus on hold until this happened. However Jean-Luc’s project is large, progress is slow and it will take some time until it is completed.

So for my own sake and for those curious people who would like to give it a whirl, I wrote some temporary code to work around that problem, and now the radial menus are working on any hotkey, as they should. I also found a way to allow more than 8 items per menu, which was missing before. This is still a bit sketchy on enormous menus like the mesh specials menu, but that’s really a usability fault in Blender more than the radial menus - the specials menu is a badly organised dumping ground for tools that’s clunky to use and getting messier each release. This particular problem should be solved at its root.

Anyway, having said that, I’ve finally made a patch for you all to try, sitting in the patch tracker. Keep in mind it’s still a little rough around the edges, but hopefully you should find it interesting. If you make a testing build, I’d appreciate it if you could post a link to it in the comments here, so others can try too. Cheers!



Radial menus

I got a new email on the Apple Developer Connection mailing list today announcing that entries are open for the 2006 Apple Design Awards, to be presented at this year’s worldwide developer conference. I went to check it out, interested after Blender received runner up last year in the Best use of Open Source category, but upon arriving at the site was quite disappointed to see that the category no longer exists. An open source award has existed in some form since 2002, amongst other fluctuating categories, as documented on Wikipedia’s ADA page and it was great to see Apple recognising the open source applications that helped make the platform great. This year there are two new categories, Best Mac OS X Dashboard Widget and Best Mac OS X Automator Workflow, and although it’s understandable that they want to encourage these areas to spur on developers to create content, it does seem quite a shame that these more self-promotional categories seem to have edged out others.

It’s also interesting to see that rather than a category like ‘best new technology adoption’, there is only Best Use of Mac OS X Graphics, which would now exclude apps concentrating on sound, or WebCore, or CoreData, etc or anything that is a good use of the OS technology which isn’t particularly visually flashy. Good use of visual technologies, while extremely important, are still a subset of what comprises good interface design, but I guess Apple are giving away the awards, so they have every right to decide what they want to include. Still, I hope they at least reconsider bringing back the Open Source award in coming years. If anything it’s a nice gesture to let Mac OSS developers feel loved :)


Update 5 May: I got a reply back from Apple after sending disappointed feedback via their contact web form, with some more positive news that is indeed very good to see. I hope Mark doesn’t mind me quoting it here:

“Please know that we did remove a specific Open Source category, but we did instead add Open Source criteria to every category in this year’s conference. Thus making the importance of Open Source more emphasized than before. You can find additional information regarding the Open Source criteria in the Official Contest Rules page: http://developer.apple.com/ada/rules.html

I was playing around with Processing last weekend, trying ideas for some kind of random generated circular continuous line drawing code, but I got a bit sidetracked with happy mistakes and found myself with this little sketch.

I’ve got some interesting ideas for the original concept, but I don’t know when I’ll get a chance to do more on it, so may as well just post this simple thing here now as an aside :)



Painting arcs / processing

More experimentation and learning - variation on the clock theme.

A couple of days ago I downloaded Processing, after discovering it a little while before. It’s “a programming language and environment built for the electronic arts and visual design communities”. Today, I made my first ’sketch’, and I anticipate doing a lot more experimenting with this - it’s great.

Yesterday, Rob ‘phase’ Haarsma committed some code that Mika Saari and he had been working on to Tuhopuu Blender - a first revision of enabling Unicode characters in 3D text objects. Although usability-wise, it’s still a little cumbersome, it’s an excellent improvement that I’ve been hoping for, for a while now, and I bet these guys will be overjoyed, too. Now who can I bug about adding proper kerning and leading? Baseline shift? Would ligatures be too much to ask for? :)

“Hello” in Japanese and Korean

Hello!

Over the last few days, I’ve committed some code for a time slider to the Tuhopuu Blender testing version, which will hopefully be a big usability boost for animation. I’ve been working on some animation lately myself, so it was a good motivation to polish up this work, which has been sitting around in a partially done state since last year. You can give it a try by picking up a tuhopuu testing build from over at the blender.org forums.

Timeline screenshot

If I could turn back time


Notable features include: (excerpt from the CVS commit logs)

  • Useful controls for start/end/current frame, and
    buttons to rewind, play and fast forward in the active time area.
    The area before the start frame and after the end is now tinted
    out slightly.
  • The auto key recording is now actually useful ;)
    Rather than being a user preference, it’s now a toggle in the
    timeline (red record symbol) which can be flicked on and off
    quickly, which is really how this is meant to be used. The button
    currently works for both object and action keyframes, hopefully it can be extended to other Ipos such as materials in the future.
  • Keyframes of the active object are shown as little lines in the
    timeline. Yellow lines represent object keys, blue lines represent
    action keys
  • Markers! Markers are the little triangles you can see in the
    screenshot above. Video editors should be very familar with this,
    they’re used very often in editing to help time cuts etc, but I don’t
    know of any other 3D apps that have this, which is a little
    surprising.

    Basically, markers are used to mark spots on the timeline, that may
    mean something to you, so you can easily find that point later.
    They’re useful for timing animation, syncing animation to audio,
    and plenty of other things, I’m sure. You can drop a marker on the
    current frame by pressing M while the mouse is over the timeline,
    or also by pressing M during animation playback (Alt A, play
    button, whatever). You can remove a marker from the current frame
    with Alt M. There is currently a limit of 99 markers

  • Support for naming markers. Ctrl M or Frame->Name Marker opens
    a text field where you can give a marker on the current frame a
    name, which displays next to the triangle icon.
  • Previous / Next Keyframe buttons. These should be pretty self
    explanatory - clicking them brings the current frame to the previous
    or next keyframe visible on the timeline.
  • Hotkeys (S and E) for setting the current frame as the start or
    end frame of the animation.
  • Right mouse button now cancels animation playback, just like most
    other ‘temporary modes’ (same functionality as Esc).
  • Timeline now initialises showing frame numbers by default

Related to this earlier experiment, I’ve ventured further into the scary world of 3D math and OpenGL, re-doing the 3D visualisation of lamp objects in Blender. There were a few problems with the previous versions which I hope to have addressed in this little project.


The problems I saw in the previous versions:

  • They were too dependent on the little yellow center points - when I removed them in the previous experiment, the lamps became almost invisible.
  • The ’stems’ (the vertical dashed line connecting every lamp to the ground plane) created useless visual clutter (why on earth should it be a lamp’s job to tell me which is the Z axis?), and was a potential source of confusion, making normal omnidirectional lamps look the same as hemi or sun lamps pointed vertically downwards.
  • There was inadequate visual distinction between lamp types in the 3D View - a hemi lamp looked identical to a sun lamp, and the visual design didn’t really say much about what each lamp did.
  • There was inadequate visual communication of other subtle lamp information (only some, such as ‘Dist:’ or ‘Sphere’ settings).

So, I’ve tried to make some improvements:

  • Each lamp now has a distinct visual appearance, that hopefully gives a better idea about how the lamp works, i.e. an omnidirectional lamp is represented as a point source, a sun lamp is shown with the typical sun rays, a hemi lamp is shown with arcs representing that the light is coming from a hemisphere direction, not just a single point. I think they all look nicer too :)
  • More information is displayed - the size of the continuous line circle represents the energy value of the lamp, and a new circle inside the base of the spot lamp cone represents the SpotBlur falloff value (Note: this second circle is not entirely accurate to the rendered image, but it’s moderately close. Maybe someone with knowledge of how this works in the renderer could make it better, at least it’s a nice visual hint at a glance for now).
  • The lamps now scale with the objects’ size, and with the view zoom. This means that when you zoom out, you don’t get a meaningless conglomerate of yellow dots at the same size, obscuring everything else. It’s also easy to tell where the lamps are in 3D space in perspective - lamps further away will look smaller. Of course if you do want them to look bigger though, you can just scale them up.
  • I’m guessing because they’re drawn as lines, and not using glBitmap commands, these lamps are slightly faster to display on screen, too. On my Powerbook, according to Help->System->Benchmark, the scene shown in the video linked above displays at 284 fps on Blender 2.35 and 298 fps on my development version.
  • I’d also like to rename the ‘lamp’ sub-type to ‘omni’ (short for omnidirectional). It’s rather dumb to have a ‘lamp’ sub-type of a ‘lamp’ object.

Now, if only we could modify lamp data (spotsize, spotblur, energy, etc.) directly with transformations in the 3D View, rather than having to use sliders for everything. *sigh*

Well that was fun, being here at Ton’s place when the big button was pushed and the new release of Blender 2.35 was made available to the world, and he even sneakily used a testing file of mine for the front page screenshot. We also had a good dinner tonight with Bart about how to proceed with the sticky issue of the website, which was very productive.

I had some high hopes for cool stuff to put in version 2.35, but unfortunately other things like preparations for the conference and having a good time in strange new countries got in the way! Oh well, there’s already plenty of awesome stuff in this release anyway, got to save something for 2.36. :)

Last night, in another display of hardcore coding brilliance, Ton Roosendaal added a feature to bf-blender CVS that we’d been discussing a bit in IRC - an ‘Outliner’ scene management tool. I made a design proposal, from which Ton put this first working version together in the space of a couple of days. In this initial stage, it’s mostly useful for visualising, selecting and activating different Blender data for editing, and hopefully as it develops, we’ll see more interactive functionality being implemented. In particular, I’m really enthusiastic about the proposed Ipo channel editing functionality for setting keyframes etc, which would surely tie in quite nicely with the work on animation tools that Ton’s interested in doing for version 2.36.

Outliner stage 01 - thumbnail

Out of liners

Last night, I added some new code to the ‘tuhopuu’ experimental Blender version to allow cutting strips in the Video Sequence Editor. It cuts any strips you have selected on the current frame, though there are a couple of minor limitations that perhaps someone more experienced in programming than I may be able to help with. Nevertheless, I’m quite proud to be capable of more ‘functional’ additions as well as the UI stuff I’ve been doing too (though I must also credit Alexander Ewering for sharing some similar code of his, for help and reference). Hopefully this will improve Blender’s NLE capabilities somewhat, which might be nice for Linux users, who don’t have much choice in video editing software on their OS.

how the sequence cutting works thumbnail (MPEG4 video)

How it works (MPEG4 video)

It’s been an intense week or so, but R-Day has finally arrived, fire extinguishers have been strategically placed around the web servers, and blender.org has been plunged into B-Con 5 with the brand-spanking new release of Blender version 2.34. In the final throes before the source code was frozen against new changes, I managed to squeeze in a bunch of smaller UI tweaks, the left mouse button selection preference and the long-awaited Python driven Help menu, all of which I’m quite proud of, along with my earlier additions, too.

Everyone involved, from developers, to testers, to doc writers, to web admins, to bug reporters, to demo file producers deserve a big pat on the back and a nice cold beer for their efforts - it’s a hell of a release and if you haven’t done so already, go and check it out now at blender3d.org. Time for some well needed rest and relaxation before starting the vicious cycle again for version 2.35 :)