Simulation¶
Simulations in Eddy are created through the use of Eddy Elements. The Simulation Element is a very versatile construct that can represent a wide range of physics. Currently Eddy supports two types of simulation Elements:
The Smoke Element Node simulates buoyant smoke
The Combustion Element Node simulates combustion processes, for example fires
Eddy Channel Data¶
Simulation Elements operate on and output Eddy Channel Sets. A channel set is a collection of channels where each channel is a 3D volume filled with values that represent specific physical properties - for example pressure, velocity or smoke density. Eddy has three different channel ValueTypes any number of which can be contained in an Eddy Channel Set:
Scalar channels store one floating point decimal value at each point in space. Examples of simulation scalar channels are temperature, pressure and density.
Vector channels store three floating point decimal values at each point in space. Examples of simulation vector channels are velocity and vorticity.
Integer channels store one integer value at each point in space. This type of channel is typically only used internally by the simulation Element.
Channels can be visualized or rendered directly in Nuke and can also be exported and imported as OpenVDB volumes for later processing in Eddy or other tools.
Controlling Simulations¶
A simulation Element is a container for the physics of a specific phenomenon. Emitters and colliders are used to tell the element the specifics of the scenario you want to simulate.
Emitters are responsible for creating and modifying channel data whereas Colliders represent collision objects in the simulation space with which the Element can interact.
Efficient Simulation Workflow¶
Setting up and dialling in a new simulation can be a time consuming process. However, the interactive nature of Eddy can speed up this process significantly. In general the faster you can iterate on your simulation the more quickly you can home in on the aesthetic look-and-feel you are after. Here are a few recommendations for being efficient and productive when running simulations with Eddy:
Mind your emitters and colliders¶
When setting up a new simulation it is always good to spend a bit of extra time on the emitters and colliders. These are very important to the overall look and behavior of a simulation. Modelling reasonably accurate emitters and colliders are fundamental to a good result. Once this work is done the simulation parameters can be tweaked to get the most out of the simulation but it is often hard if not outright impossible to get good simulation results if the emitters and colliders are not properly modelled.
Mesh to volume can limit performance¶
Converting a mesh (or particle system) to a collision or emission volume can be relatively slow. If the geometry is static or slow moving it is often an option to precompute these volumes and store them as OpenVDB caches. These caches can then be read back and used during the simulation to increase performance. As a last resort reducing the resolution of the E_MeshToVolume node can also be an option - the resolution of collision objects used by the simulation Element can often be reduced without significant visual impact. However - for best results collision objects should still whenever possible have a level of detail on par with the simulation.
Start with low resolution simulations¶
There is no need to run high detail simulations from the start. When setting up a new simulation find the lowest possible resolution that still allows you to evaluate basic emission and collision behavior. You can often get an idea of the manner in which your emitters and colliders interact with your simulation without needing to run time consuming high detail simulations. Don’t mind the lack of detail in the simulation - that will come later - just focus on the broad strokes and get that working right. Using low detail simulations and viewers allow you to quickly iterate on your initial setup, try out ideas and experiment until you find what looks like a reasonable setup to take you towards the artistic look-and-feel you are aiming for.
At this point you can start increasing the resolution and tweak parameters as needed to take you towards final quality. When you do be mindful that you may need to increase the level of detail of emitters and colliders as well to match the additional level of detail your simulation can now capture. In general you should aim to not iterate more than a few times at your final resolution - most parameters and artistic choices can be made at lower resolutions. Full quality simulations should only be used for final polish.
Avoid using high quality viewers when iterating¶
Visualizing Eddy data takes time just as simulating it does. When viewing a channel you are only looking at a visualization of that channel - changing the detail level of the viewer does not affect the quality of the underlying data. You can increase and decrease the resolution of the viewer at any time without changing the simulation result. When running Eddy interactively the overall iteration speed can be increased simply by using a low quality live visualization. You can still at any time pause your simulation and visualize at higher quality or render the frame (or if needed the entire sequence) to gauge the full level of detail of your simulation.
Avoid high quality rendering when iterating¶
High quality rendering is also time consuming and often not necessary to get an appreciation of the overall quality and behavior of the simulation. Consider using low quality renderings until you are happy with the overall behavior of your simulation and feel ready to start dialling in a more final look.
Combustion Simulation Basics¶
Combustion simulation can be tricky to master. To help with the learning process this section provides an introduction to the basics of the combustion model and its parameters.
The basic principle of the combustion model is the fire triangle – making things burn requires heat, fuel and oxygen. Sufficient oxygen is assumed to already be present in the air and thus you don’t need to explicitly add it to the simulation. Instead you control your combustion process by adding fuel and heat.
Our current combustion model is simplified and does not try to model more complex reaction processes found in thermodynamics for ease of use.
Heat is injected into the simulation using an emitter connected to the temperature input of the combustion element and fuel is injected using an emitter connected to the fuel input.
Fuel contains energy that is released as heat when the fuel burns. The resulting hot gases and hot soot makes up the bright parts of the flame through a process called black-body radiation. This light emission is computed by the fire shader.
Fires, although fundamentally the same process, can look very different eg: a slow burn like a candle or campfire looks very different from a fast burn like an explosion or the flame of a blowtorch. The specific behavior of the fire is controlled using the combustion parameters of the combustion element. Let’s look at each of them in the order they become relevant to the combustion process:
Ignition temperature: This is the temperature the heat channel must exceed to ignite the fuel. So to start the combustion process you’ll need to add some heat (ideally in contact with the surface of the fuel region) – exceeding this threshold.
Fuel combustion threshold: For combustion to happen fuel and air must be mixed. If a region of the simulation contains only air there is no fuel to burn and if there is only fuel there is no air (oxygen) for the fuel to react with. The minimum amount of air needed for the fuel to burn is controlled using the ‘Fuel combustion threshold’ parameter. Regions in the simulation where the fuel value is higher than this threshold will not burn until more air has been mixed in. Note that even if you emit a block of fuel with a fuel density above this threshold the surface of that region can still ignite as there is plenty of air outside the fuel region with which it can mix.
Combustion temperature: Once the fuel ignites it releases heat as it burns. The combustion temperature controls how much heat is released per unit of fuel spent.
Fuel burn rate: This parameter controls how fast the fuel burns – i.e. how many units of fuel is consumed per second under nominal conditions.
Fuel expansion: When fuel burns it turns into hot gases that typically take up more volume. This parameter controls how much the fuel expands as it burns (expansion per unit fuel consumed) – leading to the burning region expanding. An explosion is an example of rapid expansion due to very fast combustion.
Fuel carbon amount: This parameter controls how much soot (smoke density) is produced per unit of fuel consumed. Higher values lead to a sootier, smoky burn whereas lower values lead to a cleaner flame.
Cooling rate: This parameter controls how fast the hot gases generated from the combustion cools down. The hot gases loose heat quickly through heat radiation. This is the heat you feel when looking at a fire from a distance (you are not in contact with any hot parts of the fire and the air is not hot but you can still feel the heat). Higher values means the gases that make up the flames cool down quicker, lower values mean they cool more slowly. This affects the visual look of the flame. Objects that are hot enough will glow due to a process called black-body radiation. Faster cooling means the flames of the fire will dim more quickly.
Thermal conductivity multiplier: This parameter multiplies the amount of thermal conduction happens through air at constant pressure. Temperature exchange will occur with the neighbouring voxels and spread through the system.
Thermal solver iterations: This parameter controls the number of multigrid solver iterations used to compute the thermal conductivity.