Author Topic: CHRONO CROSS MODEL PROJECT THREAD  (Read 14961 times)

Dark Serge

  • Time Traveler (+800)
  • *
  • Posts: 882
  • Now, let love bleed...
    • View Profile
Re: CHRONO CROSS MODEL PROJECT THREAD
« Reply #75 on: March 17, 2009, 09:09:05 am »
What application do you use to open those files?

Luminaire85

  • Guru of Time Emeritus
  • Chronopolitan (+300)
  • *
  • Posts: 311
    • View Profile
    • Chrono Cinema
Re: CHRONO CROSS MODEL PROJECT THREAD
« Reply #76 on: March 17, 2009, 10:17:19 am »
Use my model import script (version 0.4.0) in Blender. If that's troublesome then I can upload the .blend files, but not until at least this evening.

Dark Serge

  • Time Traveler (+800)
  • *
  • Posts: 882
  • Now, let love bleed...
    • View Profile
Re: CHRONO CROSS MODEL PROJECT THREAD
« Reply #77 on: March 17, 2009, 12:48:54 pm »
I can't really get it to work, so I'll wait for the Blender files

HyperGeek

  • Architect of Kajar
  • Earthbound (+15)
  • *
  • Posts: 24
  • The "Hare Hare YuKid" guy
    • View Profile
Re: CHRONO CROSS MODEL PROJECT THREAD
« Reply #78 on: March 17, 2009, 02:43:37 pm »
Not sure if I saved them right, but try these, Dark Serge.

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: CHRONO CROSS MODEL PROJECT THREAD
« Reply #79 on: March 17, 2009, 02:52:07 pm »
Darn. I've re-attached Luminaire's script to the first post for better visibility. Thanks for the models Hyper. I'm going to return to this in May and help figure out the animation format. Then we can hopefully compile an archive of all the Chrono Cross models.

Dark Serge

  • Time Traveler (+800)
  • *
  • Posts: 882
  • Now, let love bleed...
    • View Profile
Re: CHRONO CROSS MODEL PROJECT THREAD
« Reply #80 on: March 17, 2009, 05:30:05 pm »
Not sure if I saved them right, but try these, Dark Serge.

Seems to be working, at least I get the shape in pink in Blender.

I'm not really a Blender wiz, so I wanna ask, how do I take pictures of the model like those that were posted here?

HyperGeek

  • Architect of Kajar
  • Earthbound (+15)
  • *
  • Posts: 24
  • The "Hare Hare YuKid" guy
    • View Profile
Re: CHRONO CROSS MODEL PROJECT THREAD
« Reply #81 on: March 21, 2009, 03:22:58 am »
I think I've just about got the animation format whipped.  (Actually animating...not so much.  :))  The format doesn't actually seem very complicated, but it doesn't look like anyone's posted a full explanation yet, so I'll do that tomorrow.  Sorry, I'd do it tonight, but it's late and I'm likely to mess up if I'm this tired.  For now I'll leave you with a little demo I spent the last couple of days working on.  It was supposed to be something silly and simple to see how well I really understood the animation format...and it ended up eating three days whole and not looking half as good as I'd have liked.  Well, at least it's something.  Enjoy.

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: CHRONO CROSS MODEL PROJECT THREAD
« Reply #82 on: March 21, 2009, 03:34:47 am »
You, sir, get the kickass award for the day. And it was a pretty kickass day overall, so that's saying lots. Definitely post your understanding of the animation format after getting some rest. I wasn't going to get around to it till sometime in May.



HyperGeek

  • Architect of Kajar
  • Earthbound (+15)
  • *
  • Posts: 24
  • The "Hare Hare YuKid" guy
    • View Profile
Re: CHRONO CROSS MODEL PROJECT THREAD
« Reply #83 on: March 21, 2009, 02:35:01 pm »
Alrighty, then.  After a good night's sleep and with my blood/caffeine ratio well on its way to zero, I'm ready to try writing up what I know about the animation format.  Some of this has already been mentioned in this thread, but I'll go ahead and write it up again (or use copy and paste, hehe) so it's all in one place.  Let me know if any of this is unclear, contradictory, needs further explaining, etc.  Here goes.

Animation format:

Number of frames (4 bytes)

Pretty self-explanatory

Animated articulation identifier (? bytes)

Just a placeholder name since I don't know what to call these.  The length of this part seems to be dependent on the model, possibly the first multiple of 4 that allows it to contain two bits for every articulation in the model.  (I'll look into that.  I didn't notice that it was different for Serge and Kid until just now.)  Serge has 8 bytes here, Kid has 0xC.  This set of bytes tells the game which of the character's articulations will be animated by commands in frames after the first.  I'll use Serge's idle animation (which has 5665600015150000 for this segment) as an example of how to read them.

First read the bytes in little endian order, so they become 0000151500606556.  Then convert them to binary, which makes them
0000000000000000000101010001010100000000011000000110010101010110.

This is much easier to work with if you reverse the order and put the least significant bit on the left, making it
0110101010100110000001100000000010101000101010000000000000000000.

From here, I generally split them into two rows, with even-numbered bits on top and odd-numbered bits on bottom.  The set we're working with looks like this:

ABCDEFGHIJKLMNOPQRSTUVW
01111101000100001110111000000000
10000010001000000000000000000000


The letters I've placed above the binary there represent which of Serge's articulations each column applies to.  A 1 in the top row indicates that that articulation will be given rotation commands in later frames of the animation, while a 1 in the bottom row indicates that it will be given translation commands.  In other words, articulations B, C, D, E, F, H, L, Q, R, S, U, V, and W will be rotated in the animation, and A, G, and K will be translated.

Frame pointers (4 bytes each)

The pointers are relative to the start of the animation header.  Not much else to be said about them.

Frames of animation (Variable length.  See below.)

Would you believe this is the easy part?  The commands given to articulations in the animation are basically identical to the way that the model's "skeleton" was set up in Section 2. Each command will be 6 bytes long, 2 bytes for each axis.  The order of the axes is probably XYZ, as it was in section 2, but I have a hard time thinking in 3D, so anyone's welcome to double check that.  The values the command can take range between 0xF000 and 0xFFF, or -4096 to 4095.  In the case of rotations, 4096 means 360 degrees.

First frame of animation ( (0xC * # of articulations in the model) bytes)

The first frame of the animation gives two commands to each articulation of the model, presumably in the order that the articulations were defined in Section 2 of the model.  Each articulation has 0xC bytes of commands given to it here - 6 bytes of rotation commands followed by 6 bytes of translation commands.  The rotations and translations are relative to the model's "default" position as it was set in Section 2.

Other frames of animation ( (6 * # of 1s in the binary of the animated articulation identifier) bytes each)

For each frame after the first, the animation contains only the commands that were defined in the animated articulation identifier, starting with articulation A's rotation, then its translation, then B's rotation, then its translation, etc.  For the example of Serge's idle animation given above, the first command in each frame in this section will be the translation command for articulation A, the second command will be the rotation for articulation B, the third command will be the rotation for articulation C, and so on.  Note that each command is still relative to the positioning of the articulation in the model's default position (how it was set in Section 2).  They are NOT relative to the position of the model in the first frame of the animation or the previous frame of the animation.

Assorted notes

The animations in game don't ever seem to give an articulation both rotations and translations in a given animation.  In addition, it seems that any articulation that was translated or rotated at all in the first frame of an animation is always marked in the animated articulation identifier, and therefore always appears in frames of animation after the first.  Both of these appear to be quirks of either convention or whatever program Square was using to animate the models.  The game's engine doesn't seem to have a problem with articulations receiving both rotation and translation commands, and it's very possible to set an articulation's position in the first frame of animation and lock it there for the duration of the animation by not marking it in the animated articulation identifier.  I used the second trick pretty frequently in my demo video.

EDIT: I accidentally gave my explanation of the articulation identifier as though Serge's was 0xC bytes long, when it's actually 8.  Way too many zeroes in there.  Corrected.
« Last Edit: March 22, 2009, 12:09:10 am by HyperGeek »

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: CHRONO CROSS MODEL PROJECT THREAD
« Reply #84 on: March 21, 2009, 03:40:10 pm »
Great Scott, that's amazing! You're a hero Hyper. Now I can get straight to putting this in the Chrono Cross File Structure wiki later.

Dark Serge

  • Time Traveler (+800)
  • *
  • Posts: 882
  • Now, let love bleed...
    • View Profile
Re: CHRONO CROSS MODEL PROJECT THREAD
« Reply #85 on: March 25, 2009, 07:05:48 pm »
Hahah awesome vid dude.

+9000

HyperGeek

  • Architect of Kajar
  • Earthbound (+15)
  • *
  • Posts: 24
  • The "Hare Hare YuKid" guy
    • View Profile
Re: CHRONO CROSS MODEL PROJECT THREAD
« Reply #86 on: March 27, 2009, 12:30:47 pm »
Hahah awesome vid dude.

*bow* Glad you enjoyed it!

Alright, here's something just a tad more practical than (if, perhaps, not as much fun as) my last video.  I decided to try moving a couple of animations from Serge over to Kid.  Aside from copying the data, this required inserting additional commands into the first frame so that the commands from Serge would be applied to the proper articulations on Kid's model.  (For example, Kid's hair, including the braid, has nine articulations which have no corresponding part on Serge's model.  0xC bytes of extra commands for each articulation had to be inserted at the correct spot in the first frame to prevent these articulations from getting commands intended for the arms.)  I also had to modify the animated articulation identifier (which needs a name that's easier to type, dang it!) so that the commands in later frames would apply to the proper parts of Kid's model.  This generally meant sticking extra zeroes in the binary anywhere I had to put extra commands in the first frame.

This experiment falls fully under the heading of "stuff I do because I want to see if I can do it," but I feel like it's a decent demonstration of the sort of stuff we can do with our current knowledge of the animation format anyways.

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: CHRONO CROSS MODEL PROJECT THREAD
« Reply #87 on: March 27, 2009, 03:04:40 pm »
OMG, Hyper, what you've got to try doing next is apply Enemy Lynx's or Dark Serge's standing and weapon animations to Guile's model. That would be a huge addition to the Magus/Magil patch. You are truly the animation mastah!

HyperGeek

  • Architect of Kajar
  • Earthbound (+15)
  • *
  • Posts: 24
  • The "Hare Hare YuKid" guy
    • View Profile
Re: CHRONO CROSS MODEL PROJECT THREAD
« Reply #88 on: March 27, 2009, 03:12:42 pm »
I'll certainly give it a shot!

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: CHRONO CROSS MODEL PROJECT THREAD
« Reply #89 on: March 27, 2009, 03:28:30 pm »
The Compendium has a "Magus Unmasked" patch you can apply to your ISO on the Fan Projects page, though don't worry about it if it's incompatible with the format of your game image. It shouldn't really matter for testing because the weapon models seem to be practically generic sticks for purposes of animating. If you can get Guile to swing his staff like Lynx does his scythe, that should transfer over perfectly to a scythe-armed Guile.