Archived

This topic is now archived and is closed to further replies.

OklyDokly

Need help understanding half life MDL files

Recommended Posts

Hi I''m programming a skeletal animation system using half-life models in DirectX, and am also there, but there is one aspect of the MDL files I don''t understand. I''m using Mete Ciragan''s half-life model viewer to help me out, but I think the structures he uses are created by Valve. Anyway inside the file there are lots of animation frames looking like this:
// animation frames

typedef union mstudioanimvalue_t
{
	struct {
		byte	valid;
		byte	total;
	} num;
	short		value;
} mstudioanimvalue_t;
I''m having trouble understanding what the valid and total members mean... Can anyone help, or point me in the right direction?

Share this post


Link to post
Share on other sites
If you download the HLSDK it has full source code to an mdl viewer, alas in openGL.
I still think you can benefit from it though.

Share this post


Link to post
Share on other sites
Just downloaded the half life SDK and the source in the model viewer seems to be exactly the same.

I still can''t find any information on what the value and the total members are.

Share this post


Link to post
Share on other sites
focus on 3d models
pick that book up for like $20 used on amazon
good book
imho


"A soldier is a part of the 1% of the population that keeps the other 99% free" - Lt. Colonel Todd, 1/38th Infantry, Ft. Benning, GA

Share this post


Link to post
Share on other sites
quote:
Original post by ncsu121978
focus on 3d models
pick that book up for like $20 used on amazon
good book
imho


Except that it doesn''t cover MDL files, it just says they''re "too complex" (which they''re not) and to look at the SDK code (which is incomplete and poorly written).

---

Did you figure out how they are used OklyDokly? I''m also writing an MDL interpreter (just started a few days ago), although I''m still just one step behind you. I''d hate to hijack your thread, but perhaps we could help each other out. Do you know what the mstudioseqgroup_t.cache and mstudioseqgroup_t.data fields are used for? They seem to be zero in all the MDLs I''ve looked at so far, but they must still have a purpose..

Share this post


Link to post
Share on other sites