• Advertisement
Sign in to follow this  

MS3D Loader with animaion

This topic is 4861 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, Been trying to locate a source code example to load a Milkshape file with animation. I search this forum and most of the links to info are not relevent or are dead. Any example codes out there?

Share this post


Link to post
Share on other sites
Advertisement
If you can pick up the Focus on 3D Models book, it shows how to load various models including MS3D. If you can't find the book I would suggest looking at the Milkshape website to see if there is an SDK that gives you the file format specs, and then use that to create a Milkshape loader

Milkshape Homepage

I would also ask your question on the Milkshape website forum as well.

Share this post


Link to post
Share on other sites
My code is horribly commented and probably has some minor bugs. I have made no attempts to clean it up since I wrote it and it's really in horrible shape. Really all I can say is that the last time i checked it looked like it was working, but it should at least give you a start.

model-ms3d.h
model.h
model.cpp

Share this post


Link to post
Share on other sites
Hm it is hard to do skinning if you do not understand algebra.
But anyway. Try to avoid "mathlib" and borrow math functions from DirectX.
Take d3dx9math for example, you may just take out the calculation functions and it will work fine for you! Most MS3D functions are "stolen" form VALVEs HL1 SDK - model viewer example, which is very lasy and it lacks in code design. I belive it was written from scratch just to show how to load models from HL1. MS3D just copy/pasted the code and viola. There fore take some good and tested math functions!

Share this post


Link to post
Share on other sites
Quote:
Original post by Samurai Jack
Hm it is hard to do skinning if you do not understand algebra.
But anyway. Try to avoid "mathlib" and borrow math functions from DirectX.
Take d3dx9math for example, you may just take out the calculation functions and it will work fine for you! Most MS3D functions are "stolen" form VALVEs HL1 SDK - model viewer example, which is very lasy and it lacks in code design. I belive it was written from scratch just to show how to load models from HL1. MS3D just copy/pasted the code and viola. There fore take some good and tested math functions!


I do believe this is the opengl forum, and i dont know about others but i myself wont mix the two.

Share this post


Link to post
Share on other sites
Quote:
Take d3dx9math for example, you may just take out the calculation functions and it will work fine for you

i would definitly not do this, d3d is lefthanded/opengl is righthanded, youll get incorrect results (perhaps not straight away apparent).
theres a few math librarys on the web
eg magic software, one with boost (IIRC), etc do a search

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement