3d Model file format

This is a discussion on 3d Model file format within the Game Programming forums, part of the General Programming Boards category; Hello, I want to implement a 3d model loader but unsure as to which file format I should go with. ...

  1. #1
    glo
    glo is offline
    Registered User
    Join Date
    May 2006
    Posts
    169

    3d Model file format

    Hello,

    I want to implement a 3d model loader but unsure as to which file format I should go with.

    I'm actually interested in animated models, like a walking man.
    Do I keep the animations inside the 3d model file? or rather, have two separate files for mesh and animation?

    All advice is welcome,
    Thanks!

  2. #2
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    Usually the mesh data and the keyframe information are stored in separate files. As to which ones you want to support will depend primarily on which file formats you can get your hands on.

    The easiest one to get a hold of is the X file format for Direct3D. However if you are using Direct3D they already have functions in the D3DX library that will load these types of models.

  3. #3
    glo
    glo is offline
    Registered User
    Join Date
    May 2006
    Posts
    169
    I also read there's either the skeletal animation approach or the keyframe based animation.
    I basically want it to be possible to attach items (user created 3d model) to the man's hands and/or clothing and armor to his body. Is skeletal animation what I'm looking for? If so, do file formats such as .obj support vertex weights, or where do I fit that?

    Thanks

  4. #4
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    The book im reading right now suggests that you use an array of mesh's just as you would with sprite animation and index into the array to choose which mesh to render. Im not sure how well it would work for more advanced techniques like motion blur, i havent gotten that far yet.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  5. #5
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    The book im reading right now suggests that you use an array of mesh's just as you would with sprite animation and index into the array to choose which mesh to render.
    That would be the naive approach which, at first, sounds good but doesn't bode all that well from a hardware standpoint. Since a frame of animation is in reference to the previous frame it is possible to store the transition information in a transformation matrix and use that as a keyframe. If you were to store each position as a mesh then you have tons of wasted space because perhaps not all vertices are affected and yet you reserve space for every one of them regardless of their part in the frame. This also means you have to push these vertices across the bus and on complex scenes with many characters this would slow to a halt.

    I would do some research on keyframe animation which does use a skeleton. I believe skeletal animation means the underlying skeleton reacts to its environment. In pure keyframe animation if a character dies the animation is the same regardless if the guy ends up with his head sticking through a rock. In skeletal based the guys head, neck, and other parts of the mesh would respond the presence of the rock and bend accordingly. So you would use keyframes up to the point that the mesh collided with the environment or another character and then would use some procedural skeletal animation.
    Spore, AFAIK, is the only game that uses pure procedural skeletal animation through and through. But even that is a question since there is video on my Making of Spore DVD that shows the modellers trying to get keyframes right for each body part and the various parts when connected together.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. problems with MD2 file format
    By scwizzo in forum Game Programming
    Replies: 3
    Last Post: 12-27-2008, 09:11 PM
  2. Replies: 5
    Last Post: 06-07-2007, 01:41 PM
  3. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  4. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  5. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21