Workflow
Recommendations for efficient simulation
The most important factor affecting simulation efficiency is the complexity of the objects passed to the simulator. You should always use the minimum number of vertices necessary to define the desired shape. After the simulation is complete, you can optionally add a Subsurface modifier to smooth the result.
In elasticity simulations (such as those performed by VeeDynamics), the number of vertices is not the sole measure of an object’s complexity. For simulation purposes, each object undergoes a process called tet meshing, where its volume is filled with tetrahedrons — basic volumetric elements that form the object internally — at a specified density.
For example, passing a cube with a very large volume (e.g., 1000 m × 1000 m × 1 m) into the simulation to serve as a ground collider may require the simulator to fill it with thousands of tetrahedrons (the next section explains why this is not necessarily the case). This can significantly slow down the simulation, even though the cube itself only has eight vertices.
Therefore, when adding colliders to a scene, it is recommended to use the smallest possible size that still fulfills their role in the simulation.
Tet meshing process
Each object passed into the simulation undergoes a process called tet meshing, in which its volume is filled with tetrahedrons (tets) — basic volumetric elements that represent the object internally — at a defined density. It is the case for elastic body objects as well as colliders. Note that tets are used solely for the simulation process and are not exported back into Blender after the simulation completes.
The global density of tets filling the objects is controlled by the Tet Meshing Size property found in the Expert Properties panel. A lower value of this property results in smaller tets, meaning a greater number of tets will be used overall by the simulation.
As a rule of thumb: the more tets that form an object, the more precise and stable the simulation will be. However, an increased number of tets also results in slower simulation performance. Therefore, it is recommended to lower the Tet Meshing Size value only when dealing with particularly demanding scenarios — for example, when an elastic object undergoes extreme deformation or when material properties are set to extreme values (in either direction).
It is also important to note that the tet meshing process occurs in the object’s Local space (prior to transformation into World space). This design allows users to control the resulting tet density on a per-object basis. For example, if a moderately-sized object is scaled up in Blender (without applying the scale), the resulting tet mesh density for that object will remain low — meaning relatively few tets will form the object even though it appears large in World space.
This feature can be especially useful when creating simple-shaped colliders that must be large in World space. If a collider is simple in shape (e.g., cube-like), it may not require a high-density tet mesh for effective simulation. Reducing the number of tets in such cases can help speed up the simulation.
User interface
VeeDynamics UI is located in the N panel of the 3D viewport. The VeeDynamics tab consists of the following panels:
- Simulation - provides a button to start simulation and general simulation properties.
- Expert Properties - provides simulation properties for advanced use cases (adjust with caution).
- Object Properties - provides object properties of the current active objects (visible only if the active object is a mesh).
Object configuration
The main property of an object is Mode. It determines how the object is going to processed by the simulation. It can be set to the following values:
- Ignored - the object will be ignored by the simulation. It is the default value for all objects.
- Elastic Body - the object will behave as elastic body
- Collider - the object will behave like a rigid collider for elastic bodies. It won’t be affected by gravity. It can be animated in Blender using keyframes and the animation will be loaded into simulator.
The second property of an object is Material. Every object passed to the simulator has to have a material assigned. Materials can be shared by many objects (in a similar manner as rendering materials can be shared in Blender).
Every object passed to the simulator has to satisfy the topology requirements.
You can copy all object properties from the active object to all other selected objects by using the Copy To Selected button.
Keep in mind that only the visible objects will be passed to the simulator. A hidden object will be ignored, even if it has the Mode property set to a value other than Ignored.
Running the simulation
When you configure the objects for simulation, press the Run Simulation button to start the simulation process. Before the simulation starts, a File Explorer window will be spawned, where you need to specify the target location for simulation results. Simulation results are saved in a usdc file.
After the target location for the result is selected, the engine window will be spawned showing the simulation progress. The simulation will use the following properties of the Blender scene:
- Start frame
- End frame
- FPS.
When the simulation is done, close the engine window in order to load results into Blender.
Simulation result in Blender
The addon loaded a simulation result into Blender by adding the Mesh Sequence Cache modifier for every elastic body object which participated in the simulation. The modifier will be automatically initialized with the usdc file set to store the simulation result so object deformation is immediately visible in Blender.
The modifier name will be set to __VeeDynamics__. If an object already contains a modifier named __VeeDynamics__ on the stack (from a previous simulation run), the addon won’t add another modifier instance but it will use existing one to load the simulation result. That’s why it is important not to change the default modifier name __VeeDynamics__ manually.
How other modifiers on the object stack interact with the simulation depends on whether the __VeeDynamics__ modifier is already present on the stack:
- if __VeeDynamics__ is not present (first simulation run): all modifiers on the stack will be evaluated before sending the mesh to the simulator (so the changes introduced by the modifiers will be visible during simulation). Note that the modifiers themselves will not be applied - the addon will not remove them from the stack. After the simulation is done, the __VeeDynamics__ modifier will be added at the very end of the stack to load the simulation result.
- if __VeeDynamics__ is already present on the stack (another simulation run): all the modifiers earlier than the __VeeDynamics__ modifier on the stack will be evaluated before sending the mesh to the simulator (they will not be applied though). All modifiers after the __VeeDynamics__ modifier (if any) will be ignored by the simulation - they will not be removed from the stack though. After the simulation is done, the simulation result will be loaded using the existing __VeeDynamics__ modifier. That means that all modifiers after __VeeDynamics__ on the stack will immediately affect the simulation result.