Collision model

Joined
Jul 19, 2003
Messages
8,037
Reaction score
2
I've read 2 tutorials on creating a collision/physics model for custom models.

The first tutorial says to use simply shaped Editable Poly boxes, then attach them all as one object, and give them all a smoothing group of 1.

The second tutorial was similar, except it said to leave each seperate box as it's own object. Then apply Box01 to smoothing group 1, then Box02 to smoothing group 2 etc etc.

I can't get either way to work. The compile log says that it compiles the collision fine, although in the model viewer it still uses the defaultly generated one. It's pretty annoying, since the shadows generated seem to follow the collision model, so the shadows are wrong in-game.

I'm using really simple boxes, as if I was rebuilding my model with simple BSP brushes.
 
you don't need to attach the boxes, and a collision model can only have a maximum of 20 boxes (i think.. could be lower, 20 or 16.. not sure anymore)
when you have the collision model made, select each box one at a time and go into polygon (in 3DSmax) control + A (clean all smooth groups) and add the whole box into one smooth group. Do this for all the boxes.
Then select the whole scene (model + collision) and add the texture to everything (the main texture that is used on the model). And then export model.smd + model_idle.smd + model_phys.smd (last one is the collision) the other two are the model (idle = skeleton).

Hope this works for you
 
Woooot, it's working now, finally. Thanks. I found out it was the applying the texture to the collision boxes that was the problem.
 
I got a similar problem. In MAX I set all the polies to SG 1. Exported to a model_phys.smd. Go to compile and the compiler says
Bad Collision Model!!! Check your smoothing groups!!!

When the sg are perfectly fine? Any ideas whats wrong?

EDIT: Well, I got rid of the error but the coll model isn't correct in HLMV, it shows the one created by the engine :S

my.php
 
That's the same problem I had. Your colision boxes have to be seperate objects, then go through them one by one clearing their smoothing groups, then add each of them to smoothing group 1.

Then you have to apply the main model's texture to each box, but you don't have to UVMap it or anything.
 
It worked kinda. But some of the vertices are lower then they are in 3dsm. :S

Help
 
Back
Top