Procedural Breaking 3D Objects
The underlying physics technology is versatile enough to break many things, not only tree trunks. It is just a matter of setting up the assets. For the examples below we will concentrate on tree trunks, though.
Sample File cut_shape.max
- tree example
sample_tree.max breakable cut out - example
General Setup in 3d applications
- For the Trunk Material (!), turn on "physicalize" in the Material Editor. Set the Parameter for the physics to "default".
Important: Remove any proxy physics objects from parts you want to be breakable (i.e. trunk)
- create a predefined mesh in an extra cgf file, which is used to "cap" the broken parts.
Setup in Sandbox Editor
- In the Sandbox material editor, the trunk's material surface type needs to be set to "mat_wood_breakable".
- The surfacetype defines the predefined mesh used to cap the tree trunk. The location and name of this mesh is stored in the surfacetype script.
- Breakable trees need to be placed as vegetation objects.
- apply enough force to the object to break it. in Crysis explosions from rocketlaunchers or grenades were sufficient to check the functioanlity.