Jump to content
  • Advertisement

Archived

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

goomyman

Anyone know of a demo or code i can look at for help....

This topic is 5730 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

I am using C++ and direct X. I am looking for a demo which can explain how to load a .3ds file and then move its parts by code. What i mean by that is say load a human mesh and then be able to move its body parts by pressing a button. For example press a button to lift his arm by rotating his skeleton not by playing keyframe animations. So the code will be something like "While button is pressed rotate shoulder" rather than "while button is pressed play arm animation." The less complicated the demo the better. Thank you so much anyone who can help. Even if you only know a really good .3ds file loading demo for directx that doesnt just load meshes but loads skeletal information too for the type of animation im thinking of ( unless .3ds doesnt do it that way and there is some other way to animate it the way i want ).

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
i went looking for something like this last week but came up empty. i did find a viewer app with source at http://hometown.aol.com/billybop7/index.htm . it''s really not written all that well (there''s a lot of hardcoded assumptions), and wouldn''t properly display my meshes, but it did seem to load the 3ds file data correctly; at least it''s log file matched up with the non-empty mesh object''s list that Deep Explorer showed.

the other thing i found was a fairly complete library called lib3ds, that i found at SourceForge. unfortunately there''s no docs with it that i could find but i might still give it a try. it has a sample app, that uses the library, that displays several pieces of info about a mesh and all of that matched up perfectly with Deep Explorer.

the thing i found out is that each mesh object representing mesh geometry will have a transformation matrix (TRI_LOCAL) along with it in the 3ds file. manipulating these matrices is how you would do "bone"-based animation. the key to this would be to render the mesh in a top down hierarchical fashion, concatenating the mesh matrices as you went, so that applying a rotation to a "shoulder" mesh object would properly rotate the entire arm''s objects as well.

Share this post


Link to post
Share on other sites
thanks for your help. Ive seen the same demos searching around google. I found them useful but for something as complicated as .3ds files I would like to find something more user friendly.

As far as loading the the meshes in a heiarchy i thought of that but it would be too hard to load any file that way ( for me atleast ). I am fairly sure that since .3ds files come with everything else they probably come with a skeleton for animation if the creator of the mesh made 1.

Anyone know if they do have bone animation info in .3ds files and how to read them?

Share this post


Link to post
Share on other sites
anyone ever use the function conv3ds in direct 3d?

Would it be easier and would it do the same thing using an xfile.


[edited by - goomyman on February 7, 2003 1:09:30 AM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!