Using Solid

The Solidifier is for matching up physics primitives to 3D models. It creates new assets which can be associated with models in the game. With attached physics primitives, your model can be interacted with as a solid object in the world. As a solid object, the model will also be considered as an obstacle (or walkable surface) for the pathing system.

Starting Solidifier

Solidifier is a plugin for Composer. With Windows binary installs, it can be accessed from the start menu. For source releases, open a command line window and navigate to the trunk folder (the base of the MV3D source tree where the mv3d folder is) and run

python mv3d/tools/composer/composer2.py

For setuptools installations, make sure Python's scripts directory is in your path and just run composer2.

Getting Started

To get started with Solidifier, you'll first want to select a model. To do this, go to File->Select Model.

New in 0.60. Both models and representations (prefabs) can be selected.

Once you've selected a model, you'll want to use the colliders pane to create some colliders:

Click the buttons to create a Sphere, Box, or Cylinder. Creating a Mesh collider is also possible. To do this, select Edit->Generate as Mesh from the menu. There are options below that for generating a Sphere, Box, or Cylinder that matches the shape of the loaded object. Keep in mind that Mesh colliders are expensive and do not collide well with each other. It is best to save them for complex world geometry.

The list of colliders in the object is shown at the top left of the window. You can use the modes listed below the collider section to modify them. Selection is by mouse click or double clicking in the collider list.

Move, Rotate, and Scale are all available. They can all be limited on a per axis basis via the X, Y, and Z toggle buttons in the controls panel. When scaling, if the Link button is selected, the object will be scaled equally on all axes. The Lock button can be used to lock the current selection.

The properties pane shows all the options for the selected collider. From top to bottom:

  • X, Y, Z: the position of the collider.
  • rX, rY, rZ: the rotation of the collider.
  • Name: friendly name for the collider.
  • Radius: the radius for a sphere or cylinder.
  • Length: the length for a box or cylinder.
  • Width: the width for a box.
  • Height: the height for a box.
  • Normal: Unused.
  • Distance: Unused.
  • mu: See the ODE manual
  • mu2: See the ODE manual
  • Bounce: amount of bounce for the collider.
  • Bounce Velocity: velocity for bounces.
  • Slip1: how much slip the surface has.
  • Slip2: how much slip the surface has.
  • Roll Frict: Rolling friction amount
  • Soft ERP: the error reduction parameter for joints.
  • Soft CFM: the constraint force mixing setting.

When finished you may have something that looks like this:

You are just approximating the shape of the object, so it's better to have less colliders and be less exact. When ready, choose File->Save and use the file extension .rxml.

Tutorial

Note the rest of this page is currently more of a tutorial than a manual. It will be expanded soon.

  1. Run Solid and connect to your server.
  2. Go to File->Select Model and choose your model.
  3. Click the Sphere/Box/Cylinder buttons to create collision geometry.
  4. You can drag each collider around or use the text boxes once it is selected to modify it. Not all fields apply to everything (i.e. Boxes don't have a Radius).
  5. You can switch the mode to change the position/rotation/scale of the collider.
  6. Adding colliders is like adding polygons, too many and it'll hurt performance.
  7. When you are done, File->Save, and select a name ending in .solid
  8. Use the Importer app to add that as an asset. Adding your model as a dependency is optional, but good practice.

Attachments