Jump to content

Creating custom uv-anims with KwasTools

From HedgeDocs
Revision as of 16:15, 3 August 2025 by Kwasior (talk | contribs) (Added example XML files for both HE1 and HE2)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Info
This guide uses he_anim_tool from KwasTools package.


Brief description of the format

Uv-anims are used to animate textures inside of material files. The most common usage would be the animation of eyes in cutscenes.

Types of transformations
Type Value HE1 HE2
Position X 0 ✔️ ✔️
Position Y 1 ✔️ ✔️
Rotation 2 ✔️
Scale X 3 ✔️
Scale Y 4 ✔️
Types of interpolation
Type Value
Linear 0
Constant 1

Differences between HE versions

Hedgehog Engine 1

  • Data version in the mirage header is set to 2
  • One uv-anim can animate only one texture in the material
  • Only position animation is possible (types 0 and 1)

Hedgehog Engine 2

  • Data version in the mirage header is set to 3
  • Multiple textures animated in one uv-anim
  • All transformation types available
  • Assignment of one animation to multiple textures

Example XML for HE1

<UVAnimation data_version="2" material_name="sonic_example_mat" texture_name="sonic_example_mat-0000">
    <Animation name="default" frame_rate="60" start_frame="0" end_frame="60">
        <KeyframeSet type="0" flag2="0" interpolation="0" flag4="0">
            <Keyframe index="0" value="0"/>
            <Keyframe index="61" value="1"/>
        </KeyframeSet>
    </Animation>
</UVAnimation>

Example XML for HE2

<UVAnimation data_version="3" material_name="sonic_example_mat" texture_name="none">
    <Animation name="sonic_example_mat-0000/sonic_example_mat-0001" frame_rate="60" start_frame="0" end_frame="60">
        <KeyframeSet type="0" flag2="0" interpolation="0" flag4="0">
            <Keyframe index="0" value="0"/>
            <Keyframe index="61" value="1"/>
        </KeyframeSet>
    </Animation>
</UVAnimation>
Cookies help us deliver our services. By using our services, you agree to our use of cookies.