Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Example Assets

Object setup in Maya for a simple jointed breakable

  • Once you cut your object into several pieces, you need to identify which one will be the static remaining piece when the joints get broken. This is your base piece and becomes the parent render mesh for your hierarchy setup which is a child of your export node. Give it a unique nodename and enter "mass=0" and "entity" in its UDP's's. Create LOD's and collision geometry for it. Center the pivot to the export dummy helper and make sure that it does not have any transformations applied.
  • Link all other pieces as children to this static piece and give them a mass in their UDP's (depending on their weight in kg, i.e. "mass=15" meaning the object has a mass of 15 kilograms). Give the pieces unique nodenames and create LOD's and collision geometry for them. Make sure the LOD's line up perfectly with all other LOD's on each level so that no gaps are visible. Only create LOD´s for pieces that have more then 100 triangles. Center the pivots of all objects to your export node and make sure they do not have any transformations applied. For information on how to add UDPs, please refer to the UDP Settings section.
  • Create one joint for each piece and call it _jointxx (xx=00,01,02,...). Set a limit to your joints (use 500 for testing, for more explanation in detail refer to joint values). Make sure the joints intersect with only one piece of collision geometry (connecting this piece to the world, making the joint red in debug game mode) or two different pieces of collision geometry (interconnecting those two pieces, making the joint light grey in debug game mode). The joints must not be scaled and should not be rotated.

  • Export your object by adding the cryexportnode with "Export File per Node" enabled and "Merge All Nodes" disabled.
  • Place the object as a brush in Sandbox and shoot it. It should now break.

Setup in Sandbox

Not much else is really needed for setup in Sandbox. You may use objects as a Brush, BasicEntity or Breakable Object.

Debugging

Apply enough force to the object to break it.

Include Page
CryAutoGen:pdrawhelpers
CryAutoGen:pdrawhelpers

On This Page

Table of Contents
maxLevel3
minLevel2