Creating custom uv-anims with KwasTools: Difference between revisions
Appearance
Created the page and saved because my internet malfunctioned and I dont want to write it all over again |
Added example XML files for both HE1 and HE2 |
||
Line 1: | Line 1: | ||
{{Notice|type=info|content=This guide uses <i><b>he_anim_tool</b></i> from [https://hedgedocs.com/index.php/KwasTools_(Hedgehog_Engine) KwasTools] package.}} | {{Notice|type=info|content=This guide uses <i><b>he_anim_tool</b></i> from [https://hedgedocs.com/index.php/KwasTools_(Hedgehog_Engine) KwasTools] package.}} | ||
== Brief | == 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. | '''Uv-anims''' are used to animate textures inside of material files. The most common usage would be the animation of eyes in cutscenes. | ||
{| class="wikitable" | {| class="wikitable" | ||
|+Types of transformations | |+Types of transformations | ||
Line 36: | Line 35: | ||
|✔️ | |✔️ | ||
|} | |} | ||
{| class="wikitable" | |||
|+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 <code>2</code> | |||
* One uv-anim can animate only one texture in the material | |||
* Only position animation is possible (types <code>0</code> and <code>1</code>) | |||
=== 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 == | |||
<syntaxhighlight lang="xml" line="1"> | |||
<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> | |||
</syntaxhighlight> | |||
== Example XML for HE2 == | |||
<syntaxhighlight lang="xml" line="1"> | |||
<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> | |||
</syntaxhighlight> |
Latest revision as of 16:15, 3 August 2025
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.
Type | Value | HE1 | HE2 |
---|---|---|---|
Position X | 0 | ✔️ | ✔️ |
Position Y | 1 | ✔️ | ✔️ |
Rotation | 2 | ❌ | ✔️ |
Scale X | 3 | ❌ | ✔️ |
Scale Y | 4 | ❌ | ✔️ |
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
and1
)
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>