3D Asset Workflow: Collisions and Breakable objects

From Frozenbyte Wiki
Jump to: navigation, search
  • This site is a part of a series of 3D asset creating process related wiki sites 3D Asset Workflow
  • For using Modo you'll probably find a lot of useful general info on the Modo site


  • Collisions are very simple and very low poly meshes that tell the game engine where the collideable edges of the model are
  • Collisions can be divided into two categories; static and dynamic
  • When making collisions, be wary of sharp edges or holes, in which the characters can get stuc
  • If you are unsure how to create and edit new types in the editor, ask designers about it

Static Collisions

  • Collisions for objects which can't be manipulated by the characters in the game
  • For example just a static piece of environment in the game that doesn't move in any way
  • Can be made in one layer with multiple objects colliding with each other
  • The collision layer must be parented with the original object
  • Naming: xx_static_collision

Example of the hierarchy:

  • box
    • box_static_collision

Dynamic Collisions

  • Collisions for objects which move and/or can be manipulated by the characters in the game, for example dropped or kicked.
  • The collision objects can't be concave, so in most cases the dynamic collision must be made with many objects
  • These must be separated to different layers and can't collide with each other
  • All the dynamic collision layers must be parented with the original object
  • Naming: xx_dynamic_collision(_01)

Example of the hierarchy:

  • box
    • box_dynamic_collision_01
    • box_dynamic_collision_02
    • box_dynamic_collision_03

Static and dynamic collisions.jpg

Adding Collisions in Editor

  • Once the collisions for each object are done in Modo and the models are exported to the Editor, you need to add Model Components to the type to make the collisions work
  • Most of the time you can just copy and paste the needed components from some existing model that is similar to your new model
  • It's good to copy the Model Components from objects that have similar material or size, but the shape doesn't matter because your object will use the collision model you made for it in Modo

collision tips

  • Select the model in Type Tree and see its Properties
  • There should already be these Model Components
    • ModelComponent
    • TransformComponent
  • You need to either copy or search and add these components
    • HittableComponent
    • ContactEffectCreatorComponent
    • PhysicsComponent
      • StaticMesh (for static collision)
      • ConvexCompound (for dynamic collision)
  • Copy by selecting the object you want to copy from in Type Tree and right click "Copy Components", don't copy ModelComponent and TransformComponent, DO NOT COPY FROM DYNAMIC TO STATIC OBJECT OR FROM STATIC TO DYNAMIC!
  • If there aren't similar objects with collision in the game Add by selecting the object you want to add to in Type Tree and right click "Add Component Type", then search the needed components

Teemu's collision tips

Breakable Objects

  • When in doubt, ask a designer

Breakable Objects Setup in Modo

  • To make the editor recognize what objects are breakable and what meshes are the broken parts of the model they need to be named correctly and have a correct hierarchy in the Modo file.
  • The naming and hierarchy of the breakable objects in Modo. Please use the naming method your project uses (old/new)

The naming and hierarchy of the breakable objects in Modo. Please use the naming method your project uses (old/new)

  • Here is how to break the model into pieces, notice that this example uses the OLD naming system, see above the right naming convention for the NEW naming

How to make a broken mesh.jpg

Breakable Objects Setup in the Editor

Adding Components
Right-click on the type -> Add Component
Creating new instances of components
When adding a component 'Add and inherit'
Otherwise: right-click -> Inherit new -> Select all sub-components that you want to create new copies of. Unselected components will remain shared

Add the following components to the *_breakable asset.

  • BreakableComponent
  • BreakTriggerComponent
  • DoEffectOnBreakComponent
    • Effect type: Inherit a *BreakParticleSystemEntity that somewhat fits with your object
    • In the new ParticleSystemEntity insert your *_broken mesh into 'ModelResource'
    • Find your *_broken mesh resource in the resource window, or right click on the type and select 'locate type model resource'
      • when selected, go to the properties window and tick the following:
      • AlwaysIncluded, AlwaysLoaded, Breakable
  • GameHealthComponent
  • HittableComponent
  • PhysicsComponent
  • PhysicsContactDamageComponent