Kodewerx

Our culture has advanced beyond all that you could possibly comprehend with one hundred percent of your brain.
It is currently Thu Mar 28, 2024 10:20 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sun Nov 21, 2010 1:40 pm 
Offline
Kommunist
Kommunist

Joined: Sun Nov 21, 2010 1:34 pm
Posts: 1
Title: The uncannist
Video.

Link's animations are what I like to call "decompressed." You will see why. From 0x2310 to 0x34F8 in gameplay_keep in any OoT version are animation headers for Link. Example, the one at 0x2A60 ("Alpha Jump Strike"):

00 0B 00 00 07 10 1A 70

0xB is the frame count.
0x101A70 is the offset within link_animetion that the animation is located at.

An animation's size in link_animetion is 0x86 times the number of frames it has. 0x86 * 0xB = 0x5C2. As you may have figured, every 0x86 bytes of an animation here is one frame. A frame is broken into three parts:

-XYZ Translation-

The first 6 bytes of the frame, 3 signed 16-bit values (XX XX YY YY ZZ ZZ). This is the translation for Link's entire model JUST for the frame you're looking at, relative to Link's current coordinates on a map.

-Limb Rotations-

The next 0x7E bytes of the frame. It's Link's limb count times 6 in size (0x15 * 6 = 0x7E). This is why I call Link's animations decompressed, no rotation index; each 6 bytes of this part of the frame is the XYZ rotation for one of Link's limbs for the current frame, 16-bit unsigned values.

-Animated Texture Properties-

The last two bytes of an animation frame (6 + 0x7E + 2 = 0x86). They change Link's facial expression for the current frame. A 16-bit unsigned value. This is the part I spoke of that needs more research. But the first two chunks of an animation frame in link_animetion are very simple! Regardless, this is enough information to port animations from MM Link's animation file to OoT's.

P.S. Here's the first 0x12 bytes of the first frame of the "Alpha Jump Strike" animation:

0054 00D6 0096 /* XYZ Translation for Link's model for this frame */

C000 FBAC C000 /* XYZ rotation for Link's first limb for this frame */
0000 0000 0000 /* XYZ rotation for Link's second limb for this frame */

Have fun.


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 21, 2010 10:52 pm 
Offline
Krew (Admin)
Krew (Admin)
User avatar

Joined: Sun Oct 01, 2006 9:46 pm
Posts: 2331
Location: *poof*
Title: The Mad Hacker
Wind Waker animations are done similarly.

_________________
Image


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 122 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group