XML:TRAM: Difference between revisions

1,688 bytes added ,  2 May 2019
Interpolation drifting: taking notes and removing link to script as it does't work (important: set no offset for frame 0 but all other, frame 8 and onwards)
(<Interpolation><End> notes)
(Interpolation drifting: taking notes and removing link to script as it does't work (important: set no offset for frame 0 but all other, frame 8 and onwards))
Line 813: Line 813:
s10k has created a XmlTools patch that allow the speedup of any existing TRAM (by removing frames). More information and download [http://mods.oni2.net/node/354 here.]
s10k has created a XmlTools patch that allow the speedup of any existing TRAM (by removing frames). More information and download [http://mods.oni2.net/node/354 here.]


==Compensate interpolation drifting==
==Interpolation drifting==
For unknown reasons some interpolated animations have a start position that is more different than it should be.
===Issue===
[[Image:chr_debug_characters_shows_interpolated_animations.jpg|thumb|200px|right|5th line: current interpolation frame/total interpolation frames, TRAM name, current frame/total frames]]


To compensate this phenomenon you can add an z position offset to the pelvis while editing the animation inside a 3D editor.
For unknown reasons some animations are unexpectedly interpolated.


There is an XSI script that can do this: http://mods.oni2.net/node/358  
So far this has been observed with transitions from '''<u>i</u>dle <u>t</u>o <u>o</u>ther''' animations (any attack or movement).
 
: chr_debug_characters = 1
: Use slowmotion cheat "carousel" or single step frame progression in developer mode for better visibility
 
Normally, '''interpolations are encoded in TRAM''' files.
 
:Example in XML, KONCOMidle1:
        <Interpolation>
            <End>0</End>
            <Max>65535</Max>
        </Interpolation>
 
Despite the fact that idle interpolation is set to 0, ITO will always force an interpolation, most often it is '''8 frames''' long.
 
Example in character debug display, KONCOMidle1 to KONCOMpunch_fw transition:
0/8 KONCOMpunch_fw 0/37
 
When you let the character perform an animation via command line or scripting the transition will not happen which makes us think that ITO interpolations behavior is hardcoded.
 
chr_animate 0 KONCOMpunch_fw
 
KONCOMpunch_fw 0/37
 
 
===Proposed solution===
To compensate this phenomenon you can add a Z position offset to the pelvis either manually or by script.
 
The offset would be applied to each keyframed Z position that is higher than 7 frames, create Z keyframe at frame 8 if necessary.
 
By changing the later positions by the same amount only the delta value of frame 0 to frame 8 will increase - compensating z translation ITO shortens.
 
 
===ToDo===
* create easy repeatable test setup
* determine type of interpolation (is it linear?)
** record and compare positions of each frame of OTI and programmatically played animation
* write script to alter the Z keyframes (8 to last)
* finetune the script if necessary by taking into account interpolation type
 
 
 
<!--
There is an XSI script that can do this: http://mods.oni2.net/node/358 -->




{{XML}}
{{XML}}
8,018

edits