You should only have one $collisionmodel statement.  Studiomdl does not support 
aggregating those.

You didn't post any output.  studiomdl must be reporting an error if it's 
falling back to a single convex hull.  What is the error?  Post the output.

There are two likely cases:

1) The smoothing group suggestion.  There's a simple vertex welding algorithm 
in the collision model code that requires you to share normals at vertices to 
have those faces belong to a single convex.  This is why you have to set 
smoothing groups.

2) Too many convex pieces.  The default is 20 (I think 40 in l4d on).  This is 
a budget, the physics system can support large numbers but performance may be a 
problem.  Anyway, you can set this in your script with $maxconvexpieces:

$collisionmodel    "floor_stairs_floor_phys.smd"
{
    $concave
    $maxconvexpieces 100
}

Jay


> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of
> Aditya Gaddam
> Sent: Wednesday, March 04, 2009 5:15 AM
> To: Discussion of Half-Life Programming
> Subject: [hlcoders] Compiling a "complex" static prop - Weird
> collision boxes
>
> Hi,
>
> I am currently trying to compile a "complex" static prop. I
> say "complex"
> because it is basically the little stairway prop shown in
> this screenie:
>
> http://upload.pixelfaction.com/files/49ae7dad_stairs.jpg
>
> It is however being a PITA to export.
>
> Just exporting the same merged mesh as the ref, idle and phys
> smds didn't
> work out. I get a "shrinkwrapped" (as the wiki called it)
> collision model
> out of studiomdl.
>
> I then tried exporting the phys smd as several phys smds,
> each containing a
> piece of the model positioned from the origin in the right place. So I
> exported a stairs_floor_phys.smd, stairs_toprail_phys.smd etc and then
> changed the qc file to this:
>
> $modelname "map/walls/floor_stairs.mdl"
> $body "floor_stairs" "floor_stairs_ref.smd"
> $surfaceprop concrete
> $cdmaterials "models/map/walls/1/"
> $sequence idle "floor_stairs_idle.smd" loop fps 15
> $scale 1.0
> $collisionmodel    "floor_stairs_floor_phys.smd"
> {
>     $concave
> }
> $collisionmodel    "floor_stairs_toprail_phys.smd"
> {
>     $concave
> }
> $collisionmodel    "floor_stairs_bottomrail_phys.smd"
> {
>     $concave
> }
> $collisionmodel    "floor_stairs_stairs_phys.smd"
> {
>     $concave
> }
> $staticprop
>
> This didn't work out well either. Only the stairs seemed to
> get a collision
> mesh and it was funky (some of the stairs worked like stairs,
> others had
> holes in the mesh at random places (my grenades would go
> through to the
> floor) and others were just covered by a flat plane type
> collision mesh.
>
> What is the right way to go about these kinds of meshes? Any
> pointers would
> be appreciated. Tutorials I have seen online always work with
> very simple
> props like a barrel etc.
>
> Thanks,
> Aditya
>
> --
> http://www.pixelfaction.com
> AIM:ApeWithABrain
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list
> archives, please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to