Concave Physics Model Not Concave

Okay, so this is really frustrating me.

This image sums up the issue I am having.

https://dl.dropbox.com/u/8416055/ThisIsTheWorstConcavityIveEverSeenInMyLife.png

The top image is of the model in-game, with the vcollide_wireframe command on to show the physics model. The bottom picture is the physics model it is compiled with.

As you can see, it is behaving as though the “$concave” control is not being used. In fact, when I first compiled the model, I didn’t use $concave, and it looked exactly like it does now. Since then, though, I have compiled it three separate times, restarting gmod completely every time. I even compiled it under a different filename and tested, but it does the same thing.

Here is the QC:


$cd "D:\Decompiled\Oblivion\Furniture\Beds"
$modelname "oblivion/beds/upperclass_double_01b.mdl"
$model "Body" "bed_double_upperclass_01.smd"
$cdmaterials "models\oblivion\beds/"
$illumposition -0.000 0.000 0.000
$sequence idle "idle" fps 30.00
$collisionmodel "bed_double_upperclass_phys.smd" {
	$concave
	$mass 220.0
	$inertia 1.00
	$damping 0.00
	$rotdamping 0.00
}


I know the physics model is fine, because I had to import it fresh into MS3D to take that picture - I closed Milkshape when I compiled the first time around, because I wasn’t expecting to have to do anything with it anymore.

Anyone have any ideas?

Don’t you have to create a bone for ever separate part of the collision model?

I decompiled the HL2 bench, which I know has a concave model, as reference. Where I found the $concave control and where to use it (later confirmed on the Valve dev wiki).

It sure seems that Valve don’t need to make a bone for every convex part, though.

https://dl.dropbox.com/u/8416055/ValveDontSeemToNeedToNayr.png

Make several convex shapes in one physmodel, but don’t connect them, that should do the trick
also make sure you smooth it
and flip normals (face>Reverse Vertex Order)

How exactly do you mean “but don’t connect them”? The four boxes in the physics model I made are just freefloating. I didn’t do anything to connect them or anything. Literally just drew the boxes, then selected them all and assigned them to the joint and exported.

As to the smoothing, I’m not sure how to do that in Milkshape 3D. :v:

I can do the normal flip, though. Let me see what that does with the current build. If it still causes issue, I’ll just remake the physics model and make the pieces obviously disconnected - as in with physical space between each box - and see what that does.

Thanks for all the help mate.

To smooth, hit ctrl-a, ctrl-w, then ctrl-m

Okay, that’s easy enough. A friend of mine said that each separate geometric object in the physmodel (each box) needs its own smoothing group, and I can just use the numbers in the “smoothing group” section of MS3D to do that.

I flipped the normals, and it almost fixed the issue. Now there’s just one little issue left. But it’s progress!

https://dl.dropbox.com/u/8416055/gm_construct0000%20(3).jpg

[editline]3rd August 2012[/editline]

Okay, well, I did what my friend suggested and put each box in its own smoothing group. That did the trick.

I also took his advice and made the blanket and pillow physboxes be a bit below the surface of their mesh, to allow models to clip into them a bit.

Thanks everyone. You’re all awesome.

https://dl.dropbox.com/u/8416055/gm_construct0001%20(2).jpg