Friday, October 23, 2009

Krakatoa Icons Are There To Make Your Life Easier

Over two years ago Krakatoa 1.0.0 shipped to customers, packaged with some useful MacroScripts (even including pictures of volcanoes). To this day, I shake my head in disbelief when I see that nobody is using them.

As usual, some back story.

Krakatoa was implemented as a .DLR, a Render Plugin like most other 3rd party renderers. Normally, a Max-compliant renderer provides one or more tabs with one or more rollouts inside the Render Dialog. But designing User Interfaces using a resource editor in Visual Studio is a task nobody really enjoys. It is so last millennium, and a real PITA. Before Krakatoa, another renderer (or rather, bridge to a renderer) was under development by the same team - Amaretto. In both cases, the decision was made to split the UI and the core code and implement as many controls as possible using MAXScript. This had several positive implications:
  • The UI could be developed A LOT faster.
  • Fixes to UI bugs could be made without even restarting Max.
  • Fixes to UI bugs could be distributed to customers by simply replacing an .MS file without recompiling the DLR, often the same HOUR the bug was reported. In fact, some fixes during Beta were even distributed by telling the user what line to edit or remark (Do It Yourself fixing!)
  • Customers could replace portions of the code or modify the UI if desired, as well  as read the UI scripts and learn how to access all internal properties of the renderer. All scripted components ship unprotected.
  • Last but not least, the UI design and implementation could be taken over by someone outside of the RnD team, someone who uses the software in production and knows a bit of MAXScript... That's how I got involved.
This design decision for Amaretto carried over to Krakatoa. In fact, the original UI of Krakatoa written by Mark Wiebe, the "father" and "godfather" of the volumetric particle renderer, was an edited version of the Amaretto UI script file. Krakatoa was already in early Beta when I tried to use that UI and immediately felt the desire to modify it.

One negative side effect of all this was the inability to display the UI inside the Renderer tab of the Render Scene dialog. It is simply not possible to add scripted rollouts to that tab. So the solution was to add a big fat button to that rollout which would then open the scripted UI of the renderer. This was, of course, a slightly inconvenient and quite untypical workflow.

At this point in time, Max 6 had come and gone and the Production/Draft slots of the renderer were replaced by Production only and the ability to save/load render presets. We started discussing ways to keep Krakatoa assigned as the renderer while being able to switch to Scanline, mental ray, VRay, Brazil, you name it. We did not want to lose the current settings of Krakatoa, but the fact that Krakatoa required cooperation with another renderer to produce the final image (including casting shadows from particles onto geometry) meant that we had to make it easy for the user to swap back and forth.

To my surprise, the Render Presets turned out to work great with Krakatoa despite the fact Krakatoa doesn't even use Parameter Blocks like any other Max plugin (our developers found Parameter Blocks clunky and not very stable when changing their structure between versions, so both Amaretto and Krakatoa use a custom string-based storage for all non-animatable / non-object-related properties). So saving and loading a Render Preset with Krakatoa restored everything perfectly.

As result, I decided to create two MacroScripts that would:
  • Assign Krakatoa as the current renderer if it isn't the current renderer yet when the "Toggle GUI On/Off" is checked, while storing the last renderer's settings in a Render Preset before assigning Krakatoa.
  • Toggle the Krakatoa UI on and off when the main icon is checked/unchecked.
  • Load the last renderer's settings from that preset if the "Remove Krakatoa" button is pressed, while saving the current Krakatoa settings to another Render Preset
  • Load back Krakatoa via that Render Preset if the Toggle button was checked again.
  • Provide a prompt to let the user reset Krakatoa to factory defaults instead of loading a previous Render Preset if desired.
These MacroScripts can be found along with a dozen other useful buttons in the Krakatoa category of the Customize User Interface. They are the MAIN BUTTONS to access Krakatoa, much faster and more powerful than the Open Krakatoa GUI and Assign Renderer controls in the Render Scene Dialog.

The fact nobody seems to use them makes me sad. It even makes me write Blogs, as you can see here...

So I beg you, if you are a Krakatoa user, spend 2 minutes to create a Krakatoa toolbar and drag the most vital icons to it. Once you start using them, you will be
  • Orders of magnitude more productive
  • A Happier Person
The available icons are documented here, in the Fine Manual Nobody Reads:
http://software.primefocusworld.com/software/support/krakatoa/macroscripts.php

Some of the other icons provide one-click creation of PRT Loaders, one-click creation of PRT Volumes from any number of selected geometry objects, one-click assignment of KCMs to any number of selected supported objects, as well as buttons to access the Krakatoa Log Window, the Shadows On Geometry utility, and the ONLY way to access the Krakatoa Schematic Flow tool introduced in v1.5.1.

Obviously, you can even assign these MacroScripts to keyboard shortcuts if you want to be even faster!

This information is already in the Online Documentation, but I hope a Blog will be more effective in spreading the word. To quote a sign that hangs in our office, "Only YOU Can Prevent Render Madness!" Make your life easier. Use the shortcuts!

4 comments:

  1. Ok I admit I didn't even knew these existed... Thanks for info, I'll definitely pop them up somewhere!

    ReplyDelete
  2. Haha... I must be one of the few that actually used some of the macros and functions built into the ui.. Having all of that as a scripted gui is great -- it has saved a lot of time integrating it into other pipelines.

    ReplyDelete
  3. The link to the macroscripts is dead !

    ReplyDelete
  4. I've learned the hard way that people don't "explore" software as much as they should. I've started writing scripts that add the new menu items and toolbar buttons for the tools my office uses. Otherwise they wouldn't know to add them. I suggest that krakatoa floater have a button for quickly adding shortcuts. People like easy.

    ReplyDelete