This page provides information on the Grid rollout for a FireSmokeSim object.
The PhoenixFDSimulator works best when the scale of the container matches the real-world size of the simulated effect. For example, If you are simulating a camp fire, your container should be at most a couple of meters wide. Note that it doesn't matter if this is two meters or two thousand millimeters - the way you view the units is irrelevant. Phoenix always converts the units to a common world-size length, so the only important thing is the size of the container. If you are simulating a volcano for example, the container should be several hundred meters wide, or several hundred thousand millimeters.
If your scene is structured in a way that makes it hard for you to scale the objects to their real-world size, you can use the Scene Scale parameter to tell Phoenix FD to treat the container as larger / smaller than it actually is when measured in Scene Units. This will influence the dynamics of the simulation, allowing to you achieve the correct behavior for your simulation without the need to tweak the size of the objects in your scene.
Using the parameters on this roll-out you can:
- Specify the Size and Resolution of the Simulator
- Enable / Disable Adaptive Grid which is a performance optimization allowing you to keep the size of the Simulator as small as possible thus reducing RAM usage
- Specify which Walls of the Simulator will be considered Open (infinite) or Jammed (ie. as solid obstacles, closed)
- Specify a Confine Geometry to limit the fluid calculations only to the volume of the specified object
UI Path: ||Select Fire Smoke Simulator | FireSmokeSim|| > Modify panel > Grid rollout
Scene Scale | scenescale – Specifies a multiplier for the original scene units of the scene. Phoenix FD works best when the container size is close to the real-world size of the desired effect. You can use this parameter to make the simulator see the container as bigger or smaller than it actually is in the scene, in case you cannot change the general scene units of 3ds Max. Check the labels to the right of X, Y, Z for the container sizes affected by this parameter. Bigger scale would make the fluid move more slowly because it needs to travel a greater distance, while smaller scale makes the fluid move faster and more chaotic. For more information on how changing the Scene Scale affects the simulation, see thebelow.
Cell Size | cellsz – The size of a single voxel, in scene units. For more information, see the Grid Resolution below.
X, Y, Z | xc, yc, zc – The grid size in cells. The dimensions shown next to X, Y, Z are the grid sizes in the scene, multiplied by the Scene Scale parameter - these sizes show how the solver will see the grid box and you can use the Scene Scale to cheat the solver into simulating as if the grid box was larger or smaller. In case you want to see how big the container for the loaded cache is in the scene without accounting for the Scene Scale, see the Container Dimensions in the Simulation rollout. Changing one of the sizes to 1 allows the simulator to perform a 2D Simulation. For more information on how to do this, please see the Setting up a 2D Simulation example below.
Increase/Decrease resolution – Changes the resolution of the grid while maintaining its size. For more information, see the Grid Resolution below.
Example: Scene Scale
The following video provides examples to show the differences of Scene Scale with values of 0.1, 5.0, and 15.0.
Example: Grid Resolution
The following video provides examples to show the differences when the Total cells from the Grid's Resolution is at 570,000, 4,000,000, and 16,000,000.
Example: Setting up a 2D Simulation
A 2D Simulation can be performed by adjusting the Grid dimensions such that either X Size, Y Size, or Z Size is set to 1. The main application of this feature is to create very wide fires that would otherwise be time-consuming with a 3D simulation, like the image below.
To keep features like the embedded gravity and pressure decay, it is recommended to leave the Z direction active and set the X or Y size to 1.
X, Y, Z | x_bound, y_bound, z_bound – Select between different container wall conditions for the simulation grid.
Open – The fluid is allowed to leave the bounding box of the Simulator through this wall.
Jammed(-) – The simulation behaves as if there is a solid boundary in the negative direction. The Adaptive Grid will not expand in this direction.
Jammed(+) – The simulation behaves as if there is a solid boundary in the positive direction. The Adaptive Grid will not expand in this direction.
Jammed Both – The simulation behaves as if there is a solid boundary in both directions. The Adaptive Grid will not expand in this direction.
Wrap – The left and right boundaries are connected (toroidal topology). E.g. Fluid leaving the Simulator from the +X wall will enter it again from the -X wall.
Confine Geom | usegridgizmo, gridgizmo – You can specify a closed geometry object with normals pointing outwards, and the simulation will run only inside this object. The rest of the cells will be frozen as if a solid body was covering them. This way you can fill irregular shapes with liquid, or generally speed up your simulation by chopping off empty cells when you have an irregular fluid shape, e.g. a rocket launch.
While using a Confine Geometry can speed up a simulation, it will not reduce RAM usage.
Adaptive Grid | adaptive – Enables the adaptive grid option and determines which channel to use (see the Threshold parameter). The grid will then resize to fit the volume occupied by the selected channel. Only channel values above the Threshold will affect the adaptive grid. Note that only the Open Container Walls will expand and contract using the Adaptive Grid.
Threshold | grid_treshold – When Adaptive Grid is enabled, the grid expands when the content of a cell near the borders crosses this value. On the contrary, when No Smaller Than Initial Grid is disabled, the grid will contract when there are no cells with content above this value near the borders.
The Threshold value depends on the channel used for adaptation. For Smoke, a value of 0.01 is a good starting point. For Fire, setting the Adaptive Grid Channel to Temperature and increasing the Threshold to 800 or more should give you good results.
Extra Margin | adapt_margin – Specifies the number of cells between the end of the grid and the active zone. You can use this to give the fluid a bit more room if the adaptive grid can't keep up with the simulation.
No Smaller Than Initial Grid | nbigrid – When enabled, the Adaptive Grid can't contract to a smaller size than what is given as the initial X,Y,Z size for the Simulator. Note that this way the initial grid box is always included, even if the fluid has moved farther from it. If this option is disabled, the grid will always encompass only the active fluid and will move together with it if needed.
Expand and Don't Shrink | onlyexpand – When enabled the Adaptive Grid will expand without shrinking. If this option is disabled, the grid may shrink if the content of the tracked channel for a given section of the simulator is below the Treshold value. This option is useful when making very thin smoke simulations which usually will contract the grid when the fluid gets below the Threshold value.
Max Memory % | limitby,limit – If memory consumption reaches the specified percentage, the grid won't expand any further.
Maximum Expansion | maxexp,expx/y/z/neg/pos – Specifies maximum growth sizes for each side of the grid, in cells. Using this, you can stop the expansion in certain directions.
Shrink to view | usegridfitcamera, grid_fit_camera – Species a camera whose frustum will be used to determine the maximum expansion. The Adaptive Grid will not resize beyond the frustum. Note that the algorithm might not handle complicated cases properly. For such cases, the limits must be animated manually.
When a Shrink to view Camera is provided, the Adaptive Grid will expand no further than the already specified Maximum Expansion Limits.
Preallocate memory | prealloc_mem – When the grid size is changed, a new grid is allocated and the old content is transferred into the new space. However, during this process, both grids, the new and the old one, exist simultaneously and the RAM usage is doubled. This way you will be able to use only as much as half of your memory. To solve this problem, this option allocates all memory in the beginning of the simulation at once (eventually limited by the Max Memory and Maximum expansion), and simulates only in a part of it, allowing re-size without doubling the memory usage.
Disabled – Allocates the exact amount of memory. If the grid changes its resolution during the simulation, a new piece of memory is allocated for it, and the old one is copied over. This temporarily increases the overall consumed memory. This mode is the easiest to set up but is not recommended for huge grids.
When Adaptive – Preallocates memory when the Adaptive Grid mode is enabled. Max Memory controls how much memory is preallocated at the start of the simulation. No other grid memory allocations are done during the simulation.
Always – Always preallocates memory at the start of the simulation, regardless of grid settings/resizing. This can be useful if you change the grid size by hand.