What Is New in Krakatoa MX 2
The following document discusses the features introduced or enhanced in the Krakatoa MX 2 release.
Krakatoa MX 2 is the fifth major commercial release of the Krakatoa Volumetic Particle Rendering, Manipulation and Management for 3ds Max, after versions 1.0.x, 1.1.x, 1.5.x and 1.6.x.
Here is the list of the main new features and improvements in this release:
- Krakatoa Atmospheric effect for rendering Krakatoa particles using ray-marching in other renderers.
- Performance improvements incl. multi-threaded particle loading, accelerated sorting and optimized Additive Rendering tested with up to 40 billion particles.
- Lighting and Rendering improvements incl. Enhanced Bilinear Filtering, Matte Object Raytraced Reflections support, Environment Map as Background support, Reflection Maps intensity controls, Render Elements in Voxel Mode etc.
- Support for Hair Rendering using splines, 3ds Max Hair&Fur and HairFarm.
- Support for particles generated by Chaos Group's Phoenix FD fluid dynamics simulator.
- PRT Maker procedural particle generator with 3D Fractal Design capabilities.
- PRT Cloner modifier for hierarchical multiplication of particle clouds.
- Magma 2 Channel Editing sub-system - rewritten from scratch, faster, more powerful and easier to use.
- New Particle Saving method - MAXScript Interface for saving PRT files from PRT objects.
In addition, many existing features have been updated and enhanced.
Krakatoa Atmospheric Effect
The Krakatoa Atmospheric effect is a ray-marcher implemented using the 3ds Max atmospheric sub-system. As such, it will render in any renderer that supports the native atmospheric effects of 3ds Max, including Scanline, V-Ray, finalRender and Brazil r/s (but not mental ray which would require the development of a separate volumetric shader).
It produces a render output very similar to the Voxel mode of Krakatoa, but it can be integrated directly into geometry renderers including the ability to cast and receive shadows and to appear in raytraced reflections without intermediate steps, multiple render passes or compositing tricks.
The Krakatoa Atmospheric effect supports the basic shading-related particle channels including Color, Emission , Absorption and Density and supports shadows casting from geometry objects and onto geometry objects. The main exposed controls are Spacing and the Adaptive Step Min. and Max. values expressed in voxel sizes. See the following topic for details.
The Krakatoa Atmospheric effect requires a lot more memory because all voxels have to be allocated at once.
The PRT Loader now supports parallel loading of PRT sequences listed in the same object, typically Partitions. Loading multiple partitions from a Fusion-io card or a fast Solid State Drive is up to 12 times faster compared to Krakatoa v1.6.1. The time to load 100 million particles into memory from 80 partitions stored on a Fusion-io card was stopped at 4.75 seconds. The loading performance of both the PRT Loader and the multi-threaded procedural particle generator (PRT Maker) was measured at 21 million particles per second.
Rendering in >Force Additive mode now skips the Sorting phase since A+B = B+A and the order of drawing does not matter. This speeds up pure additive rendering significantly. Since lighting has no effect on pure additive rendering, it is a good idea to also check >Ignore Scene Lights in this specific case to save memory by not allocating the Lighting channel.
The overall rendering performance, esp. with billions of particles, has been improved by approx. 20% (up to 37% in some CPU configurations) by moving a portion of the code responsible for checking for invalid colors to the Drawing loop and optimizing the code used to reset the Lighting channel before lighting the particles.
Rendering more than 4 billion particles was not supported in v1.6.1 and earlier. This limitation has been lifted. Krakatoa MX has rendered successfully up to 40 billion particles on a single frame using a machine with 1TB of RAM.
When rendering the lighting or final pass in Particle mode, the sampling size of the Bilinear filter can be controlled independently. Providing higher sampling values for the Self-Shadowing Filter will smooth out the shadows and reduce Moire effects. Setting a higher filter size for the Draw Filter will produce blurring in the final image which can improve the result when rendering lower particle counts.
A new control has been added to the Krakatoa Main Controls to tweak the intensity of the environment reflection maps globally.
Enabling the Background Color Global Override will now replace the Max Environment Map in the rendering, while allowing it to be reflected as Environment Reflection Map. When the Background Color override is not enabled, the background will be rendered, allowing for quick compositing of particle rendering over background images.
The Krakatoa Material now supports Raytraced reflections of Matte Objects, Atmospheric Effects and the Environment map as an additional Emission source. This includes reflecting the Krakatoa Atmospheric effect. This mode uses Krakatoa's own raytracing acceleration and performs faster than the 3ds Max Raytrace map.
The Krakatoa Material will now pass through the Wireframe color of a PRT object if no Color channel is available in the PRT object and the Scatter Color checkbox is unchecked in the Material. Previously, a default white color was used in this specific case.
As mentioned above, it also supports Raytraced reflections of Matte Objects, Atmospheric Effects and the Environment map.
A new option was added to scale the Emission by the particle's Density.
Render Elements Improvements
Render Elements are now supported in Voxel mode.
PRT Hair Object
The PRT Hair object was originally designed to work with Hair Farm, but now it supports the Max Hair&Fur in the scene (globally - to exclude a hair object, just hide it). It also works with regular splines, so anything that can generate splines can be turned into particles. When using Hair Farm, you have to add a modifier to the stack to turn the hair to splines.
Several useful channels are generated automatically that can be used in a KCM to tweak the parameters of the hair - use PDV to explore them. In particular, the Density is automatically faded off along the strand so it appears to be thinner at the tip. There are channels describing the position of the root and the distance from the root that can be used to define a color gradient along the hair. The Normal and Tangent channels are also populated.
PRT Maker Object
The PRT Maker object can generate very quickly a large number of particles (up to 4 billion per object) to be distributed using Magma modifiers.
It also supports the application of animated affine transform operations to produce fractal-like designs. A dedicated PRT Maker Designer utility (see below) is provided to explore and manipulate such designs. The fractal design controls are also fully accessible through MAXScript.
PRT Maker Designer utility
A new PRT Maker Designer utility ships and is available from the Krakatoa menu. It lets you create design wedges using basic parameters, save individual frames of these designs to disk and merge saved designs into new animated wedges to produce new designs in a form of "genetic engineering" process.
PRT Loader Object
The PRT Loader file sequences are now exposed as filename assets and will show up in the Asset Tracker where they can be replaced and manipulated like any other external references. In addition, the PRT file sequences can be accessed and modified as Asset Metadata in the .MAX file without opening the scene in 3ds Max.
The "Add All Partition Sequences" menu option in PRT Loader has been fixed. It adds all future Partitions set up in the Save Particles and Partitioning rollouts even before they have been actually saved. This allows you to send Partitioning Jobs (One Job Per Partition) and make a render job with a PRT Loader listing all future partitions to Deadline and make the latter frame-dependent on the former. Thus, when a frame has completely saved all partitions, the corresponding render task can render it.
Under the hood, the PRT Loader now exposes the standard 3ds Max IParticleObjectExt interface that can be accessed by other plug-ins that want to employ PRT sequences as particle sources.
PRT Volume Object
The Random Seed of PRT Volume can now be keyframed. This is useful when generating Jittered particles in a volume like a Frosted RealFlow to produce foam-like noise.
A new World Space option has been added to the PRT Volume object which uses the world-space geometry of the source object. This ignores the PRT Volume object's transforms and can be useful when converting Frost meshes or simulating objects moving through a static world-aligned voxel grid .
A new Preferences option has been added to control the PRT Volume Viewport Spacing Factor. Higher values produce more particles, default is 50.0. This value is used to scale the viewport spacing based on the largest dimension of the source's bounding box when creating via the VOL MacroScript or "Create PRT Volume..." Krakatoa Menu item. In previous releases, the value of 50.0 was hard-coded, ensuring the same geometry object would produce the same particle count regardless of its volume, e.g. a Sphere with Radius 10.0 would produce the same number of viewport particles as one with a Radius of 1000.0. The actual count can now be adjusted using the new Preference option.
PRT FumeFX Object
The PRT FumeFX object now supports the conversion of FumeFX streams with no Smoke or Fire.
Phoenix FD Particles Support
Chaos Group's Phoenix FD fluid simulation software is now supported directly as a particle source. Its rendering is controlled by the same option used for PRT FumeFX objects.
PRT Cloner Modifier
The PRT Cloner Modifier allows the distribution of particle clouds (Sources) to each particle of a Target particle object. Each particle can get a different shape by either cycling the Sources or using the ShapeIndex channel already employed by FROST to control shape distribution. The scaling of the particle shapes can be controlled by the distance of the particles in the distribution stream or by its Scale channel. Orientation channel is also supported. Multiple modifiers can be used to stack cloning operations.
The PRT Cloner accepts all PRT object classes as Sources, incl. PRT Loader, PRT Volume, PRT Hair, PRT FumeFX, PRT Maker and PRT Source.
Krakatoa Delete Modifier Improvements
The Krakatoa Delete Modifier now has an option to reset the selection channel to prevent it from affecting modifiers above it.
Magma 2.0 Particle Channel Editing
Magma 2 is a complete rewrite of Krakatoa's channel editing sub-system. At its core, it is now cleaner and more scalable. At UI level, it solves the majority of problems reported by Beta testers.
Magma Flow Data Storage
The flow is now stored in the modifier itself, including related controllers and properties. All data can be get and set via MAXScript, allowing for a fully ASCII-based interchange format. Nodes are stored as references and are name-independent. Copying and pasting is supported natively. kd-tree acceleration data, noise node data etc. can now be cached, resulting in better performance.
Flows support multiple output nodes to branch the same data to multiple targets.
Nodes can have more than one output socket, reducing the number of nodes to extract complex data.
Input sockets can have default values, reducing the need for Input Value nodes to just animatable and exposable values.
Multiple editors can be open at the same time.
Old KCMs and CustomData Render Elements will be converted automatically to new Magma Modifiers and CustomData Render Elements when loading older scenes. Since the original Magma 1.x system is still available, the automatic conversion can be disabled temporarily to preserve the original flows. Old KMF files can also be selected and loaded manually and will be fully converted to Magma 2 flows.
New Magma Flow Format
The saving of Magma 2 flows is performed using pure MAXScript code describing the creation of the flow's nodes. This same format can be loaded, merged, copied and pasted, shared via forums etc. Even the Undo/Redo buffer of the editor uses this format to store the intermediate editing steps. The format also stores the keyframes of any controllers assigned to InputValue nodes.
Same applies to BLOP definitions - they are saved in nearly the same format as regular flows. Existing definitions will appear in the Depot and the B key Category Menu. BLOPs in the Depot will show their Notes description on mouse roll-over. If no Notes were saved, the path to the file will be shown instead.
KMF/MagmaScript flows loading is available directly from inside the MagmaFlow Editor. Double-clicking a flow will load it, double-clicking [Custom Flow] will return to the last flow. The notes (if any) of the Magma 2 flows will be shown in the Notes field when a file is selected.
Enhanced Node Display Options
Color swatches and Texture map preview options in InputVector and InputTexmap nodes can be displayed by enabling options in the View menu. Other options in the View menu enable the display of the connected node's name and value at the input socket.
Many nodes now provide defaults values for their input sockets, allowing for less crowded flows with less InputValue nodes. An InputValue node is really necessary only when a value must be animated or exposed to the UI.
Default values have user-definable type. E.g. for Add, you can select whether the second empty input socket's default value is a Vector, Float or Int depending on what the first socket requires.
Inserting Nodes Into Existing Wires
You can now insert an unconnected node into an existing wire by selecting the wire, Ctrl+selecting the free node and hitting SPACE BAR. Creating a new node using the keyboard when a wire is selected will also insert the new node into the selected connection.
Disconnecting A Node
SHIFT+Drag in MagmaFlow now disconnects all the node's inputs and outputs, and preserves the highest connected sockets wire regardless of index. (so if input 2 was connected and input 1 wasn't, the Input 2 wire will be preserved)
A single Magma Modifier can provide any number of outputs which will be evaluated in order from top to bottom. The outputs can depend on the same flows or connect to independent sub-flows. Stacking modifiers and passing data between them via channels is still supported, but in many cases the same effect can be produced by performing calculations once and outputting the resulting data to multiple channels.
Output Nodes can be disabled like any other node. This will suppress their whole flow and produce no output channel data. This means that you can have multiple sub-flows in the same modifier and disable any of them by disabling the corresponding output node.
Output Nodes can also be collapsed by double-clicking, hiding the whole branch unless a node is used by other Output Nodes, too. This can be useful to concentrate only on the nodes contributing to a specific Output.
InputObject and PropertyQuery
The PropertyQuery node together with an InputObject node can acquire any property accessible through MAXScript from a scene object. Some of the obvious properties will be listed automatically, but you can type your own expressions to get to anything, e.g you can type in "material.diffuse" in the text field and press Add... to expose a new output socket. The PropertyQuery node replaces completely the older Input Value > Connect To Track approach. To get object positions, rotations, base object property values, modifier properties etc., use this set of nodes.
InputGeometry has a second output socket to get the Object Count.
InputTexmap and Texture Map Sampling
The InputTexmap node is a new type of Input node that has input sockets - in old Magma 1.x, Input nodes had no input sockets. This node can be used to evaluate a texture at arbitrary points in object space or UV space. It supports both explicit and implicit channel data. Explicit data can be provided by the optional input sockets, implicit data work like in Magma 1.x using the incoming channels of the current particle object.
InputParticles and Particle Data Sampling
The InputParticles node lets you provide a "proxy" particle system for data access and sampling. It has a second output socket providing the Particle Count in the selected system.
The ParticleQuery operator provide access to a specific indexed particle's data.
The NearestParticle operator returns the particle closest to the specified sampling point.
A new Modulo operator has been added.
The Function>Curve node is now edited in a large floating dialog and supports X-range scaling after the fact instead of being limited to the 0-1 domain.
The Function>Noise and Function>VecNoise operators now have a Normalize option to output values in the range from -1 to +1.
The Breakout node can be used to extract the components of a vector. Together with a ToVector it can be used to reorder the components. e.g. XYZ --> XZY etc. Other than in Magma 1.x, here you get all 3 components from a single node since it can have more than one output socket.
The QuatToVectors node is equivalent to FromQuat in Magma 1.x, but has 3 outputs for the 3 components.
The VectorsToQuat can be used to convert 3 axes into a Quat value, equivalent to the ToQuat node in Magma 1.x.
The MatrixMulVec node can be used to multiply a vector by a 3x3 matrix. It is mainly used for fractal generation in PRT Creator.
The Mux (Multiplexor) operator lets you send the data from one of the first N-1 input sockets to the output socket based on the 0-based integer value passed to the Nth (control) input socket where N is the number of Inputs. In other words, passing 0 to the last socket will output the value of the first input socket, passing 5 will output the 6th and so on.
The IntersectRay and NearestPoint operators now cache the kd-tree acceleration structure and require less geometry data updates, resulting in a speed increase. Instead of using a SurfaceData node to extract specific results, most of the results like Position, Object Index, Barycentric Coordinate and Face Normal are exposed as multiple output sockets. Additional info can be acquired using the FaceQuery operator:
The FaceQuery operator can be used to sample a point within a face based on its barycentric coordinates. It supports the Position, Selection and Normal channels, the latter producing the render-time smoothed normal as opposed to the (facetted) face normal returned by IntersectRay and NearestPoint.
The MeshQuery operator gets Geometry and ObjIndex inputs and outputs the Face Count of the Geometry.
The Elbow node can be used to pass through any wire without modifying it. It is for guiding the flow of wires, is drawn as a round node and has exactly one input and one output socket.
The Missing node is a stand-in for loading retired nodes from older versions - currently from older Beta builds, but it might be used in the future should Krakatoa MX 2 operators get retired. The node will be shown in a lighter red than regular errors and will have to be replaced or removed manually.
Krakatoa GUI Changes
New Main Controls buttons for PRT Hair, PRT Maker and PRT Source were added to the block of source buttons. The VFB extensions and the Schematic Flow were also updated to show these objects. The PRT FumeFX option was extended to enable the rendering of Phoenix FD particles.
Two new Phase Functions were added to Krakatoa - Kajiya-Kai (simple hair shading) and Marschner (advanced hair shading) with secondary colored highlights and a lot more controls.
Two new value spinners were added next to the Shadow Filter and Draw Point Filter drop-down lists to specify the Bilinear Filter Size.
Reflection Strength control added to the Krakatoa GUI > Main Controls to adjust the intensity of the Environment Reflections without touching the bitmap loader.
The wording of the Switch To/From dialogs has been changed and they have been formatted better. The Tooltip in the GUI were also reformatted to make them easier to read, mostly via new lines.
The Preferences floater now has an additional rollout to host the Krakatoa SR export options. All Multi-Threading Preference options are now checkboxes - either on or off.
The VFB Extension panels have been expanded to a width of 800 pixels and now include the ability to lock the current viewport, the Backbround Color override which was missing previously, the Reflection Strength value and the new Bilinear Filter Size spinners.
Particle Data Viewer
The ">" symbol will now appear before the names of channels in PRT Loaders if the channel is not coming from the file stream. For example, if you load a PRT sequence with Position, Velocity and ID, the PDV will also show Color and Density taken from the loader's defaults (object wirecolor and 1.0, respectively). These two channels will have > next to their name to denote that they did not come from the file. Same applies to channels created with KCMs on the stack.
The new "TP PDV" scripted operator for Thinking Particles 4 and higher can be used to expose arbitrary data to the Krakatoa Particle Data Viewer.
Two new methods have been added to the FranticParticles interface:
<bool>FranticParticles.SaveParticleObjectsToFile <node array>Nodes <value>Filename <value>Channels
This method saves the specified node(s) to the given PRT filename. The third argument is an array specifying the channels layout, or an empty array #() to save all channels found in the source streams.
<void>FranticParticles.SaveHairFile <bool>SaveWholeSceneHairAndFur <node>SaveSingleObjectSplineNode <value>Filename <integer>FrameStart <integer>FrameEnd
This method saves the spline definition of the given node to a PRT-based file format that can be read by Krakatoa SR or loaded using the Krakatoa PRT Loader in Krakatoa MX for further modifications. The file contains spline knot definitions via dedicated SplineID and KnotID channels.
Matte Objects Explorer Improvements
Right-click menus have been added to the Matte Objects Explorer to tweak object settings directly.
Added a REFRESH option, Layer Name display and updating of the Matte Objects rollout when changing properties in the Matte Objects Explorer. Double-clicking nodes will select them in the viewport.
Particle Flow Operators Improvements
Krakatoa Geometry Lookup operator in PFlow now has an option "Update Only Once" to affect only new particles entering the event. It used to update on every step.