Grid

A grid forms the simulation domain with Flow. It is responsible for nearly all Flow memory allocation. It controls fundamental simulation behavior.

Cell Size

The grid cell size controls the resolution. Higher resolution means more detail, but also means more cells must be simulated for the same volume. For performance tuning, keep in mind volume is the cell size cubed (gridCellSize^3). This means small changes to the grid cell size will have a proportionally larger impact on performance.

Creating a grid

To create a grid, left-click Add New in the Content Browser, and choose Create Advanced Asset->Physics->Flow Grid Asset.

_images/CreateFlowGridAsset.png

Grid Properties

Give the grid an appropriate name, e.g.: FlowGridFireAsset, and double click to open it’s property sheet.

_images/FlowGridAsset.png

The grid contains parameters controlling memory use and performance, along with simulation behavior and rendering settings.

Grid

  • Grid Cell Size See Cell Size section.
  • Virtual Grid Dimension The length in virtual cells of each axis. The combination of grid cell size and virtual grid dimension determines the extents of the grid address space. This is visualized in the editor by clicking on the flow grid actor. The flowvis command will also visualize the grid extents.
  • Memory Limit Scale Controls the relative memory usage with respect to the default value. For higher cost effects, the default limit can be increased. This is likely necessary if the flowvis visualization indicates that blocks expected to allocate are unable. This is often observed as a cube shaped clipping effect.
  • Simulation Rate Controls the grid update rate. Fixed time stepping is used for consistent behavior. The simulation rate can be increased to improve grid response time, at the cost of performance.
  • Multi Adapter Enabled Allows the grid to simulate on secondary GPUs when available, offering a potential performance increase. (currently win10 only)

The velocity, density, temperature, and fuel weights and thresholds control what blocks the grid allocates beyond what emitters allocate. The default settings are targeted for flame with limited smoke, so only the temperature weight is nonzero. The temperature threshold needs to be greater than zero to be effective at deallocation. The threshold should be aligned with the color map alpha, so that the effect is visually faded before deallocation.

Block Allocation

  • Velocity Weight Relative importance of velocity for allocation, 0.0 means not important.
  • Density Weight Relative importance of density for allocation, 0.0 means not important.
  • Temp Weight Relative importance of temperature for allocation, 0.0 means not important.
  • Fuel Weight Relative importance of fuel for allocation, 0.0 means not important.
  • Velocity Threshold Minimum velocity magnitude that is considered relevant.
  • Density Threshold Minimum density magnitude that is considered relevant.
  • Temp Threshold Minimum temperature magnitude that is considered relevant.
  • Fuel Threshold Minimum fuel magnitude that is considered relevant.
  • Importance Threshold Global importance threshold, to scale quality/performance.

Simulation

  • Gravity Gravity vector for use by buoyancy. This specifies not only direction, but can be used to increase or decrease the buoyant force.
  • Velocity Damping Higher values reduce velocity faster (exponential decay curve).
  • Density Damping Higher values reduce density faster (exponential decay curve).
  • Velocity Fade Fade velocity rate in units / sec. Compared to damping, fade reduces low values faster.
  • Density Fade Fade density rate in units / sec. Compared to damping, fade reduces low values faster.
  • Velocity MacCormack Blend Factor Higher values make a sharper appearance, but with more artifacts.
  • Density MacCormack Blend Factor Higher values make a sharper appearance, but with more artifacts.
  • Vorticity Strength Higher values increase rotation, reduce laminar flow.
  • Ignition Temperature Minimum temperature for combustion.
  • Cooling Rate Cooling rate, exponential.

Collision

  • Object Type Enum indicating what type of object this should be considered as. It is ideal to create a Flow collision channel, where the Flow grid is set to a Flow object type, allowing emitters to overlap/block against the Flow channel as desired.
  • Response To Channels Controls which types of objects the Flow grid will consider when gathering collision/emitter shapes from the world. Setting a particular object type response to Ignore will disable all emitters/colliders with that object type.

Rendering

  • Rendering Alpha Scale Provides a convenient global opacity scale.
  • Color Map Controls color and opacity as a function of temperature.
  • Color Map Min X Color curve minimum X value. The color map is a 1D texture internally, this specifies the lower temperature properly described in the 1D texture. Lower values are clamped.
  • Color Map Max X Color curve maximum X value. The color map is a 1D texture internally, this specifies the upper temperature properly described in the 1D texture. Higher values are clamped.
  • Rendering mode Provides access to useful visualizations, such as a density visualization (render mode 1) and a velocity field visualization (render mode 5). Render mode 0 is the default color map mode.
  • Adaptive Screen Percentage Experimental VR feature. Allows ray march resolution to vary to manage total frame time.
  • Adaptive Target Frame Time Experimental VR feature. Target frame time for adaptive screen percentage.
  • Max Screen Percentage Provides control of offscreen ray march resolution relative to main render target resolution. Is used even when Adaptive Screen Percentage is disabled.
  • Min Screen Percentage Experimental VR feature. Minimum ScreenPercentage when Adaptive is enabled.
  • Debug Wireframe If enabled, visualizes the grid extents and the active grid blocks.

Placing a grid

To place a grid, drag the asset into the level. The grid should be placed in the center of the region of interest. Left-clicking the placed grid actor will show the grid extents.