| Previous Topic (Rendering Thinking Particles) | Up (Particle Sources) | Next Topic (None) |
Rendering FumeFX Simulations
Available in Krakatoa 1.5.0 and higher
- 1 Rendering FumeFX Simulations
Overview
- Sitni Sati's FumeFX is a voxel-based fluid simulation and rendering plug-in for 3ds Max.
- Since the beginning, Krakatoa and FumeFX have been used together by many artists, mainly via the FumeFX Particle Flow operators which can drive particles through the simulation.
- Rendering every voxel of the FumeFX simulation was not directly possible in versions of Krakatoa prior to v1.5.0.
- Starting with Krakatoa v1.6.0, an intermediate PRT FumeFX object is required to convert the FumeFX simulation to particles.
Advantages
- The main advantages of rendering FumeFX in Krakatoa are:
- Krakatoa uses significantly less memory when rendering LARGE FumeFX simulations. For example, a real-world production case called for a FumeFX simulation which required around 64GB of RAM to render. In comparison, Krakatoa used only around 600MB to render the same simulation.
- Krakatoa can create a particle per voxel and thus turn a FumeFX simulation into a particle cloud (similar to what is seen in the viewport previews of FumeFX). These particles can be rendered directly or saved to PRT for later use. FumeFX PFlow Operators allow the advecting of particles inside the FumeFX volume, but not the explicit conversion of voxels to particles.
Disadvantages
- Rendering in Krakatoa has disadvantages, too:
- The FumeFX rendering has to be composited over the rest of the scene, while FumeFX can render directly in Scanline, VRay, Brazil, finalRender and lately mental ray.
- FumeFX currently provides more shading options, more controls and supports Multiple Scattering.
- At this point, the FumeFX volumetric engine renders faster.
Krakatoa v1.5.x Rendering Workflow
- To render a FumeFX simulation, simply check the "FumeFX" option in the Krakatoa Main Controls rollout.
- Optionally, you can add a Krakatoa FumeFX Modifier to the FumeFX simulation object to define which channels NOT to acquire.
- If no modifier is applied, all relevant channels available will be acquired automatically.
- The modifier can also be used to disable the rendering of specific FumeFX simulations instead of hiding them.
Krakatoa v1.6.0 Rendering Workflow
- To render a FumeFX simulation, first create a PRT FumeFX object using the Krakatoa Menu, the Krakatoa toolbar icons, or the Create > Geometry > Krakatoa > PRT FumeFX button in the 3ds Max Command Panel.
- Check the "FumeFX" option in the Krakatoa Main Controls rollout.
- Note that is is possible to add Krakatoa Channels Modifiers, Deformation Object Space and World Space Modifiers and assign a Material to the PRT FumeFX object to modify the particle data being rendered or saved.
Smoke
- In Krakatoa v1.5.x, the FumeFX Smoke Channel had to be be present in the simulation for Krakatoa to be able to render it!
- In Krakatoa v1.6.0 and higher, the seeding of particles by Smoke and Fire channels can be controlled via the intermediate PRT FumeFX object.
- Krakatoa does not allocate a dedicated Smoke channel in the particle stream, it sets the Density of the particles based on the FumeFX Smoke channel.
- Thus, just rendering a FumeFX simulation without any preparations, only the Smoke channel becomes apparent.
- In the example below, a default Standard Material (gray) was assigned to the FumeFX simulation object in Krakatoa v1.5.0.
- To get the same result in v1.6.0, the material should be assigned to the PRT FumeFX object creating the particles, and the "Seed in Fire" option should be unchecked.
- In the second example, >Use Absorption was turned on and Absorption channel was overridden to [40,23,11].
Setup Info: The example FumeFX setup was simulated at 200x200x600 voxels (100x100x300 Spacing 0.5). Examples were rendered on a Dual-Quadcore Intel Xeon 2.5GHz Rendering in Voxel Mode in Krakatoa including the data acquisition took about 23 seconds. Pure Voxel Mode render time without data acquisition with Fire and Smoke was around 15 seconds. Pure Voxel Mode render time without data acquisition and without Fire was around 11 seconds. Rendering in Particle Mode in Krakatoa including the data acquisition took about 12 seconds.
- Below are the results of the Scanline Renderer with default FumeFX render settings:
Fire
Visualizing The Fire Channel in Krakatoa v1.5.x
- In order to visualize the Fire channel which is acquired from the FumeFX simulation if available,
- the >Use Emission option was turned on and
- a global Krakatoa Channels Modifier was assigned with the following flow:
NOTE: Currently, you cannot add local object space KCMs to FumeFX objects. You can either create a Global Channels Override in the Global Render Values rollout and add KCMs to it or save the FumeFX simulation to a PRT file sequence and apply local KCMs to a PRT Loader reading that sequence.
- The images below show the same simulation rendered in Voxel mode with varying Particle Density settings:
- 2.0/-3 | 5.0/-3 | 1.0/-2 | 2.0/-2
- 4.0/-2 | 8.0/-2 | 2.0/-1 | 5.0/-1
Boosting The Fire Value in Krakatoa v1.5.x
- The Fire value is generally relatively low, a lot below 1.0.
- To boost it to higher values, it is a good idea to use a Power Operator with a second Float Input less than 1.0, for example 0.1.
- It is important to note though that in some cases, FumeFX might provide a Fire channel value below 0.0. Since a Power below 1.0 is the same as calculating the root of the value, a negative value does not have a valid root and would produce Indeterminate values which appear as black splotches in the final rendering.
- To avoid these, you can either use the AbsoluteValue Operator, a Clamp operator with second input 0 and third a larger positive number, or a logical operator to test against 0.
- The left image shows the artifacts when not clamping the Fire Channel and using the Power Operator to boost the fire.
- The right image shows the fixed result using the Clamp Operator as shown in the flow below:
- The images below show the same simulation rendered in Particle mode with Density of 2.-/-2 and the Fire channel to the Power of 1.0, 0.5, 0.25 and 0.1:
Rendering Fire Without Smoke in Krakatoa v1.5.x
- Currently, the Smoke Channel of the FumeFX simulation controls the generation of particles in Krakatoa - if the Smoke Channel is turned off in FumeFX, an error message will be displayed complaining about missing Smoke Channel.
- In many cases though, the user might want to render only the Fire Channel and ignore completely the Smoke - this can be done easily using another Global KCM setting the Density of particles with Fire == 0.0 to 0.0:
- Since we already have a Global KCM setting the Emission channel based on the Fire channel, all we have to change is:
- Set the Absorption Override to Black.
- Enable the Color Override and set the Color to Black.
- At this point, this will give us fully Additive Fire (no Scatter, no Absorption, just pure Emission) where the Fire channel is not zero, while effectively removing all particles with Fire channel of zero.
- Here is the same simulation as above, but rendered in Voxel mode with Density of 2.0/-2:
Fluid Mapping
- If the Fluid Mapping channel of FumeFX is enabled in the Simulation, Krakatoa will support it automatically and copy it into the TextureCoord (Mapping Channel 1) channel of the particle stream.
- In other words, any texture map using UV Channel 1 will be mapped to the Fluid Mapping (if available)
- When saving particles, add the TextureCoord channel to the list of channels to save to output the Fluid Mapping to PRT.
- In the following example,
- Fluid Mapping was generated with Latency set to 101 frames (not updating during the whole simulation)
- A Checker map using UV Coord 1 with Blue and Green colors and UV Tiling of 0.05 was assigned via Diffuse Map channel:
- Adding a Fractal Noise Map to the Opacity Channel produces the following result:
Temperature Channel
- The FumeFX Temperature Channel contains a Float value representing the temperature of the fluid in each voxel.
- Using a MagmaFlow, we could use this data to blend colors depending on the temperature of our particles.
- In the following example, a Global Channels Override was used to produce a pseudo-color rendering of the Temperature data.
- The Temperature channel was scaled down by 0.003, then clamped between 0.0 and 1.0 and fed into the U value of the particles' TextureCoord Channel.
- A Gradient Ramp texture map was added to the Emission Override slot of Krakatoa and set to use Mapping Channel 1 (TextureCoord).
Voxel Rendering vs. Particle Rendering
- Depending on the simulation quality (number of voxels in the FumeFX simulation) and the distance from the camera to the simulation, you can use either
- Particle Rendering which is faster and precise but does not work when zooming closer of flying through the cloud, or
- Voxel Rendering which is slower but produces dense clouds at any distance.
- Below is a comparison of Voxel Rendering (left) and Particle Rendering (right) at Density of 4.0/-1:
- Once you zoom in closer to the simulation, the Particle Rendering starts dissipating into points while the Voxel Rendering remains solid: