Difference between revisions of "Sonic Heroes/Texture Animation Editing"
From Sonic Retro
ShadowBlitz (talk | contribs) |
DeadlyFugu (talk | contribs) (Not actually a how-to) |
||
Line 1: | Line 1: | ||
{{SCHG SH}} | {{SCHG SH}} | ||
− | |||
The .txc format is used to define animated textures within stages. Within the .txd, animated textures have the form name.1; name.2; ... name.N where N is the amount of frames. | The .txc format is used to define animated textures within stages. Within the .txd, animated textures have the form name.1; name.2; ... name.N where N is the amount of frames. | ||
Line 29: | Line 28: | ||
Some animations may have a final frame with an invalid frameOffset (and textureID). No clue what this means. | Some animations may have a final frame with an invalid frameOffset (and textureID). No clue what this means. | ||
− | [[Category: | + | [[Category:Sonic Community Hacking Guide]] |
Revision as of 17:47, 2 March 2018
SCHG: Sonic Heroes |
---|
Main Article |
Mechanic Editing |
DOL Editing |
Model Editing |
Collision Format Model Format |
Level Editing |
Camera Editing |
Particle Editing |
Particle Editing |
Sound Editing |
Music List |
SCHG How-Tos |
Custom Object Material Effect Tutorial |
The .txc format is used to define animated textures within stages. Within the .txd, animated textures have the form name.1; name.2; ... name.N where N is the amount of frames.
Structure
struct { u32 frameCount; // total frames of animation u8 zero[516]; // god knows why this is here char firstFrameTexture[32]; // name of first frame in .txd (e.g. s3tk1.1) char animatedName[32]; // name of animated texture as a whole (e.g. s3tk1) struct { u16 frameOffset; // frame index u16 textureID; // texture for this frame } frames[...]; // repeated until 0xffffffff } animatedTextures[...]; // repeated until 0xffffffff
Each of the structs is repeated until the uint32 value 0xffffffff.
Interpretation
Each frame consists of two values, 'frameOffset' and 'textureID'. Texture ID refers to the number at the end of the texture's name within the .txd.
Frame Offset is the offset of the current frame within the animation. Note that it may seem that the first frame is index 1; but it most certainly isn't, some later stages use frameOffset 0.
Frame Count is the total amount of frames within the animation, and NOT the amount of frame structs below. Not every frame of the animation is stored in the file, missing ones are presumably 'interpolated' by using the previous frame. For example, if frame 1 is s3tk1.1 and frame 4 is s3tk1.2; then frames 2 and 3 are also s3tk1.1.
Some animations may have a final frame with an invalid frameOffset (and textureID). No clue what this means.