Game Development Community

MilkShape and Collison mesh (bounding box)

by Tony Chamberlain · in Artist Corner · 01/17/2003 (2:14 pm) · 11 replies

Ok guy's I'm lost on this one. I had a hard time getting a exact fit for a spaceship model of mine.

In Milkshape I found by copying the entire model and leaving the texture empty, I could then have milkshape use that mesh (the copied one) as a bounding box.

Well it worked great, the bounding box was skin tight around the ship, walk on top of the ship etc., every thing was fine, until I put it in a sunny area and noticed thet sun flare (ie as in Scorched Earth) would shine right through the model, I thought ok I might would live with this, until I tried out test weapons in the game, they would shoot right through my model with the tight fitting bounding box, but the other models I used as a square bounding box, works fine (which you can't even get close to the model, because the bounding box stops you, you walk around the model in one big square.

Is there a way in MilkShape to do bounding boxes that fit the model and stop the particles(light effects) and weapons from passing through them?

#1
01/17/2003 (3:34 pm)
I haven't gotten that far yet. My guess it's one of a few things. For one, sophisticated collision meshes can cause problems. The lower number of polys the better and make sure it's a convex hull. Another possibility is that it's detecting the collision mesh for collision and looking for the line of sight collision for projectiles/particles and not finding it. These are rough guesses. May have to redo the code for projectiles/LOS handling.
#2
01/17/2003 (10:31 pm)
Thanks for the reply, I honestly don't have a clue about the line of sight thing. MilkShape's exporter is fairly simple in design.

I do need to find the material codes for reflections and tranparency and node names for mounting etc. for Milk Shape. I searched the forums, but I keep finding nothing.

I wish I could figure out why the engine lets me shoot throught a bounding box object :(

Thanks again!
#3
01/18/2003 (12:46 am)
3DSMAX Exporter Documentation has all that info. Explains LOS collision detail and the node naming. LOS is not available with the Milkshape exporter though.

*typos*
#4
01/19/2003 (8:27 am)
When you LOS is not available with MilkShape, does that mean nothing will work for my problem using MilkShape exported DTS's ?
#5
01/19/2003 (8:42 am)
I'm not up to snuff on how the engine handles projectiles yet. My guess is you'll have to redo the code to just detect the single collision box. Milkshape only supports one collision mesh in the export (What I meant by no LOS).
#6
01/19/2003 (9:52 am)
Tony what did you name your copied (bounding box) version of your ship. And did you put it in the same folder as your ship is in. I been starting models with milkshape and need info on creating collion meshes...mabe i can help with your problem.
#7
01/19/2003 (12:56 pm)
Actully I just did select all --> copy

Then I has a mesh with all the elements in 1 piece
Next I exported it- selected used this mesh (the copied one) and that's all.
#8
01/19/2003 (6:26 pm)
Okay, are you exporting the model and the collision mesh seperately? As in two seperate files?
#9
01/19/2003 (7:18 pm)
As to the original question: your mesh is multi-part isn't it? ;)

Torque wants a nice clean (as I understand it) bounding box. The easiest way to do this is to hand draw the vertices where you're going to need them, and then build the mesh, face by face.

Time consuming? YES! BUt the results are well worth it as you collisions will be tight, and d@mn near exact!

Once you have the mesh built to the shape of the actual model (Do leave a little space between the faces of the mesh and the faces of the bounding mesh... just in case ;) I would name it Col-1 (for clarity sake anyway) and then export.

*Hope this helps*
#10
01/19/2003 (7:21 pm)
Oh yeah: as for transparency, you can assign a material to be transparent in MS the same way you do any transparent material. Just set the emissive property to your liking and export.

Notice, that this applies to the WHOLE texture/ material though, and can't be parsed like reflections can through Alpha channels. In otherwords: assign all of yuour transparent items to one texture, and all of your opaque items to another...


P.S>>>
Make absolutley sure that your bounding mesh has NO HOLES what-so-ever. One piece - no holes. ;)

Okay, I'm really finished now. =\
#11
03/20/2004 (11:10 pm)
This is something I need to understand on this mesh collision thing.

I built me a static object and the like. Textured it (though the textures did not come through). I get a big block that just surround the object (can't stand on top of it so to speak).

So how did you do your collision mesh?

My Orignal Post here: here