collsion mesh
by Anthony Ratcliffe · in Artist Corner · 04/06/2009 (10:09 pm) · 3 replies
im having real trouble making a collision mesh with my max objects, i followed the tutorials but theres no collisions, i copied my box and named it col-1 as asked and set up it up. am i missing somthing
About the author
#2
04/07/2009 (2:28 am)
I have never had any luck getting a mesh named Col-1 to give me a collision mesh. If I name my mesh Collision-1 (note the capital. It's necessary) then the mesh works perfectly.
#3
I can help you with this (yay, finally something I know about).
1. Make your object, center it using F-12 to place it at 0,0,0
2. If your object is simple, clone a copy and name it Col-1, if it's a complex object, just create a sphere or box about the same size as the object and name it Col-1
3. highlight your object, then, using the DTS exporter, click renumber selection. renumber it 2.
4. With object2 still selected, use the exporter to "embed shape".
5. Open the "schematic view". You should see base01 with an arrow to start01 and detail2. start01 should have an arrow to Object2. click on 'connect' and drag Col-1 to start01 to connect them. Now go back to 'select object by name' and select 'detail2'. clone a copy and name it Collision-1
6. make a box that completely surrounds your object named bounds
7. Go back to the exporter, click 'export entire shape' or whatever it says (I'm doing this from memory, sorry). save the object file as Object.dts and load it into your game using the World Editor Creator.
If it doesn't work, post another message and I'll try to help you.
Tony
04/07/2009 (10:24 am)
You need a box called bounds surrounding the entire object. What exporter are you using? Max2DTS, or Max2DTSpro?I can help you with this (yay, finally something I know about).
1. Make your object, center it using F-12 to place it at 0,0,0
2. If your object is simple, clone a copy and name it Col-1, if it's a complex object, just create a sphere or box about the same size as the object and name it Col-1
3. highlight your object, then, using the DTS exporter, click renumber selection. renumber it 2.
4. With object2 still selected, use the exporter to "embed shape".
5. Open the "schematic view". You should see base01 with an arrow to start01 and detail2. start01 should have an arrow to Object2. click on 'connect' and drag Col-1 to start01 to connect them. Now go back to 'select object by name' and select 'detail2'. clone a copy and name it Collision-1
6. make a box that completely surrounds your object named bounds
7. Go back to the exporter, click 'export entire shape' or whatever it says (I'm doing this from memory, sorry). save the object file as Object.dts and load it into your game using the World Editor Creator.
If it doesn't work, post another message and I'll try to help you.
Tony
Torque Owner Anthony Ratcliffe
(excuse the spelling mistakes its 4am and i havent been to bed lol)
Collision Objects:
There is no correct way to make collision objects for the Torque engine. It all depends on how your programmer wants to implement collision detection. Several games used this engine and they all used different collision schemes. Different collision schemes can be different for different shapes as well. Some shapes use simple sphere collision that is derived from the bounding box, some have custom-built collision shapes. Vehicles tend to have custom collision shapes.
Custom collision shapes can be created by assigning a negative detail number to the shape (like -1) and creating a corresponding detail marker. Shapes with negative number will export but not draw.
The Torque engine presently uses detail markers named "Collision-" with the mesh shapes named Col-. The shapes must be convex hulls (no concave surfaces).
Here are some of the naming conventions:
Collision-1 thru Collision-9: These are the collision markers
Col-1 thru Col-9: These are the actual collision shape geometry.
LOS-9 thru LOS-15: Markers for line of sight, or 'bullet' collision shapes.
LOScol-9 thru LOScol-15: Geometry for line of sight collision.
Keep the detail meshes as low in polygon count as possible as this is processor intensive. Vehicles are limited to ONE collision mesh for the collision shape.
Creating Collision Details for Simple Shape:
Open SimpleShape3.max located in the documentation file pack.
Make a copy Clone of SimpleShape 128 and change the segments to 6. Name this mesh'Col-1'.
Clone one of the detail markers and name it 'Collision-1'
Export this shape. It will now have a collision mesh. The easiest way to test this is to export it over a shape in the game. You can export over bush1.dts (make sure you rename the old bush and have your texture in the correct directory). Drop in the demo and you can crash into and bounce off the shape you just made.