RSS< Twitter< etc

Undersampling FumeFX Simulations

Last Edited April 29, 2013 

Overview

The following tutorial discusses the undersampling of Sitni Sati's FumeFX fluid simulations by using an intermediate Krakatoa PRT FumeFX object as Velocity Source.

This tutorial requires Krakatoa MX v2.1.8 or higher to be installed. The free evaluation version would be suffucient.

The Base Scene 

We will continue with the test scene created and saved in the previous Stoke and FumeFX tutorial.

Additional Setup

In the previous tutorial, we already used the Krakatoa PRT FumeFX object as an optional Distribution source which let us sample the FumeFX simulation and produce particles where desired. It also have us access to all FumeFX-related channels, something the FumeFX object does not provide when picked directly as Stoke MX Distribution source.

This time, we will use Krakatoa PRT FumeFX to sample all voxels of the simulation and provide a Velocity Field to Stoke. This will allow us to use the Velocity Field From Particles options and vary the Grid Spacing to resample and blur the velocity data. 

  • Unhide the PRT FumeFX object and remove all modifiers from it.
  • Select the Stoke object in the scene.
  • In the "Distribution" rollout, check FumeFX001 as the only distribution object, and uncheck any other sources.
  • In the "Velocity Field" rollout, uncheck the FumeFX001 entry used previously.
  • Click the Pick... button and pick the PRTFume_FumeFX001_001 object created in the previous tutorial, or use the By Name... button to select it from a list.
  • Select the new entry on the list and enter 30.0 for the Velocity Scale, assuming you are using 30 FPS as your scene frame rate. This is because the PRT FumeFX object provides the Velocity values as units per frame, but we need them as units per second.
  • Change the Grid Spacing to 4.0 because the FumeFX grid size was also 4.0 at the time of simulation.
  • Right-click the new entry and pick "Select Object..." from the menu.
  • Check the Seed In Smoke option and enter 0.0 as the Minimum value.
  • Uncheck the Jitter Position option to create a grid.
  • Hide the PRT FumeFX object again.
  • Press the SIMULATE button. 

RESULT: A particle will be created by the PRT FumeFX object in the center of each FumeFX voxel, and the associated velocity will be splatted onto a grid and passed to the Stoke particles.

In the following animation, the Red particles represent the Stoke simulation created using the actual FumeFX Velocities, saved in a separate simulation run and then loaded via a PRT Loader. The Yellow particles are the Stoke simulation using the PRT FumeFX particles' Velocities. Since the former simulation approach can interpolate the velocity value at any point in the FumeFX grid, while the latter uses discrete particle samples, the two are very similar but not identical:

 

You might ask: Would it be possible to increase the precision of the particle approach?

To some extent yes, but it makes no practical sense. The PRT FumeFX lets you use Sub-Divisions and create more particles. Setting the Subdivide Region to 2 will allow us to go as low as 1.0 unit for the Grid Spacing, but the results would closer but not identical, and the simulation time would be a lot longer

Undersampling The FumeFX Simulation

Now let's see how we can blur the incoming data by using a larger Grid Spacing value than the actual spacing of the FumeFX Simulation. 

  • Change the Grid Spacing to 12.0
  • Press SIMULATE again 

RESULT: The yellow particles are now moving according to the new larger Grid, and show a lot less detail in their motion.

We can continue increasing the Grid Spacing to, say, 24.0 units to produce even less detail:

Creating Divergence-Free Fluid Motion

FumeFX simulates burning of a fuel in air and the resulting velocity field is not necessarily divergence-free (which is a requirement for liquids which are truly incompressible). Using the above approach, we can use the Create Fluid Motion feature on the sampled FumeFX Velocity Field to produce a very different particle motion. 

  • Set the Grid Spacing back to 4.0.
  • Check the Create Fluid Motion option.
  • Press the SIMULATE button. 

RESULT: The particles are now moving very differently compared to the original red particles driven by the native FumeFX Velocity Field.