The collision models built by the MDL/studiomdl path have the same
low-level features as the ones built in Hammer.  But the tools do not
put per-face materials on the collision models.  So you would have to
modify the model compiler or do this in a post-process in your mod.  At
runtime, there is a 7-bit material index available per triangle on any
collision model.  In vbsp, the world model compiler builds a table of
the different surfaceprops used by the world and stores an index into
that table on each triangle.  You could do the same for your models, but
currently our tools do not do this.

Jay


> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> [EMAIL PROTECTED]
> Sent: Saturday, September 03, 2005 8:53 AM
> To: [email protected]
> Subject: [hlcoders] Model Surface Properties
>
> I want to be able to group faces/triangles of a collision
> mesh in one of my models into separate groups.  Inside my
> mod, I want to be able to tell from a trace which group of
> faces was hit by the trace.  The closest thing I can see at
> doing that is by looking at the "surface" (csurface_t) of the
> trace.  This doesn't give me much information, but from there
> I can use "surface.surfaceProps" to get to surfacedata_t.
> From there, I can get to "surfacegameprops_t" which has an
> interesting variable named "material".
> I was hoping from that I could get information about the
> material assigned to the collision mesh's faces.
> Unfortunately, the entire model yields the same material no
> matter what texture is assigned to it, and it looks like it's
> intended for a material defined in Hammer.  I'd rather not
> use hitboxes, but I will if that's the only alternative.
>
> _______________________________________________
> 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