Model Animations

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by Cuber456, Feb 1, 2015.

  1. Cuber456
    OP

    Cuber456 Member

    Newcomer
    28
    10
    May 19, 2012
    United States
    I'll keep my post simple.

    I'm working on a model viewer for Virtue's Last Reward(3DS). I can render models decently enough.

    I want to try and tackle animations now. My question I want to know is how would I go about doing this? What am I to look out for in files and how can animations, in the general case, be stored in files?

    I have no idea what to expect for animations (how they are stored and how they actually manipulate models). Any sort of advice is appreciated.

     
    Tomato Hentai likes this.
  2. Tomato Hentai

    Tomato Hentai snart

    Member
    3,675
    5,810
    Oct 30, 2014
    Canada
    actually north korea. please send help
    I'm not 100% sure about how animations are stored in any 3DS game, but I've had a tiny bit of experience with the format of some animation project's animation files.
    I can't remember which program this was, but how it worked was:

    • It saved it's data frame by frame
    • It stored bone name + global position (X,Y,Z)
    There is a possibility that it may work somewhat like that, bu I'm not 100% sure, as I've had no experience with 3D models and animation in any format used on the Nintendo 3DS.
     
    Cuber456 likes this.
  3. NCDyson

    NCDyson Hello Boys...

    Member
    271
    113
    Nov 9, 2009
    United States
    I've seen them stored many ways, it usually depends on the file format. Sometimes it's by frame, sometimes it's by bone. Sometimes it's world space coordinates(if you're lucky) and sometimes it's parent space coordinates (I hate those).
     
    Cuber456 and Tomato Hentai like this.
  4. piratesephiroth

    piratesephiroth I wish I could read

    Member
    2,841
    1,387
    Sep 5, 2013
    Brazil
    Hahah, so those VLR models really don't have legs
     
  5. Reisyukaku

    Reisyukaku Onii-sama~

    Member
    1,183
    2,291
    Feb 11, 2014
    United States
    Does that game use BCH?
     
  6. Cuber456
    OP

    Cuber456 Member

    Newcomer
    28
    10
    May 19, 2012
    United States
    It's a slow process trying to figure this stuff out from hex since I'm not sure what to look specifically for at times. I played with character files and was able to pin point the basic location of where bone data is stored. Someone else who has more experience than me on this stuff generously gave me an idea as to what specific data could be stored in these locations. Bones appear to be stored separately from the model files although some model files do contain string references to bones so I am not sure what bigger part they play at the present time. One problem I need to overcome is that bones are stored relative to previous/parent bones vs being stored in absolute space. There must be a master list or hierarchy list of how the bones get attached somewhere. I need to do more digging and testing.

    Trying to get the bones to move should be stored in a file type called MOTION. That is something I will need to play with to figure out how to properly read them and move a bone structure. The big issue I see at the center of all this is that I'm not exactly sure how the model/mesh connects to the bones. I would think that a group of points on the mesh would be attached to a bone and by moving said bone I would also move the points. That is going to be interesting to try to figure out.

    Oh well. I'll work it out slowly.

    Short answer is yes. Long answer is that the models don't generally have anything below the thighs. Makes sense I suppose since there isn't a need to pan the camera down there. Why model stuff the player is never going to see?

    [​IMG]

    If BCH is a file type then no, VLR doesn't use it.
     
  7. Reisyukaku

    Reisyukaku Onii-sama~

    Member
    1,183
    2,291
    Feb 11, 2014
    United States
    Yes, it's a fairly common model file type for 3DS.. so what does this game use? bcmdl or w/e?
     
  8. Cuber456
    OP

    Cuber456 Member

    Newcomer
    28
    10
    May 19, 2012
    United States
    Nope, it doesn't use bcmdl either which is a shame. Chunsoft decided to create their own model formats for some reason (I couldn't find any info about the formats on the web unless I just suck at searching). VLR has two different types of model files. There is the BM format and BSM format. The BM format stores just a basic model (points,polygons and how to texture) but BSM also store information that appears to be related to animation. An overwhelming majority of model files are BM format (for rooms and similar things). BSM files only appear with character data.

    All of that kind of sucks because I doubt VLR's model formats are going to be used elsewhere which means my model viewer is specific to this game. It is what it is. I'd be lying if I said I didn't enjoy trying to figure out how these files work though.
     
    NCDyson likes this.