Tangent Interpolation
up vote
0
down vote
favorite
I am currently working on an Colladae(.dae) loader for LWJGL which loads full scene information in one class. One of the elements I find it hard to decode is animation.
So basically I want my animator to support any type of animation. Right now it supports Matrix interpolation i.e I extract my translation,rotation,scale values from my matrices and interpolate's them.
The one animation I don't know how to implement is tangent animation. For example
One of samplers has this following structure
<sampler id="Cube_location_X-sampler">
<input semantic="INPUT" source="#Cube_location_X-input"/>
<input semantic="OUTPUT" source="#Cube_location_X-output"/>
<input semantic="INTERPOLATION" source="#Cube_location_X-interpolation"/>
<input semantic="IN_TANGENT" source="#Cube_location_X-intangent"/>
<input semantic="OUT_TANGENT" source="#Cube_location_X-outtangent"/>
</sampler>
<channel source="#Cube_location_X-sampler" target="Cube/location.X"/>
So The
"INPUT" is nothing but my animation timings(0 to 1)
"OUTPUT" is nothing but my xlocations at every key frame
"INTERPOLATION" for me is always Linear so I don't read that data
"IN_TANGENT" And "OUT_TANGENT" is what I have no idea on what to do with them
When the data is viewed
This is how the "IN_TANGENT" Data looks like
<source id="Cube_location_X-intangent">
<float_array id="Cube_location_X-intangent-array" count="2">0 -1.061734</float_array>
<technique_common>
<accessor source="#Cube_location_X-intangent-array" count="1" stride="2">
<param name="X" type="float"/>
<param name="Y" type="float"/>
</accessor>
</technique_common>
</source>
And this is how the "OUT_TANGENT" Data looks like
<source id="Cube_location_X-outtangent">
<float_array id="Cube_location_X-outtangent-array" count="2">0.08333331 -1.061734</float_array>
<technique_common>
<accessor source="#Cube_location_X-outtangent-array" count="1" stride="2">
<param name="X" type="float"/>
<param name="Y" type="float"/>
</accessor>
</technique_common>
</source>
Right now both my Tangent data is 2D because I was just moving my cube in one plane in blender but I assume it can be 3D as well(Or maybe not?)
I feel I could use this data for smoother animation but I don't know the mathematics or algorithm to in co-operate this data in my Animator
The Tangents are also available for my rotation as well but again I don't know what to do with them
Eg:
<sampler id="Cube_rotation_euler_Z-sampler">
<input semantic="INPUT" source="#Cube_rotation_euler_Z-input"/>
<input semantic="OUTPUT" source="#Cube_rotation_euler_Z-output"/>
<input semantic="INTERPOLATION" source="#Cube_rotation_euler_Z-interpolation"/>
<input semantic="IN_TANGENT" source="#Cube_rotation_euler_Z-intangent"/>
<input semantic="OUT_TANGENT" source="#Cube_rotation_euler_Z-outtangent"/>
</sampler>
If not Code an bit of mathematics or ideas on what do with these values would be very usefull.
Thank U
lwjgl
add a comment |
up vote
0
down vote
favorite
I am currently working on an Colladae(.dae) loader for LWJGL which loads full scene information in one class. One of the elements I find it hard to decode is animation.
So basically I want my animator to support any type of animation. Right now it supports Matrix interpolation i.e I extract my translation,rotation,scale values from my matrices and interpolate's them.
The one animation I don't know how to implement is tangent animation. For example
One of samplers has this following structure
<sampler id="Cube_location_X-sampler">
<input semantic="INPUT" source="#Cube_location_X-input"/>
<input semantic="OUTPUT" source="#Cube_location_X-output"/>
<input semantic="INTERPOLATION" source="#Cube_location_X-interpolation"/>
<input semantic="IN_TANGENT" source="#Cube_location_X-intangent"/>
<input semantic="OUT_TANGENT" source="#Cube_location_X-outtangent"/>
</sampler>
<channel source="#Cube_location_X-sampler" target="Cube/location.X"/>
So The
"INPUT" is nothing but my animation timings(0 to 1)
"OUTPUT" is nothing but my xlocations at every key frame
"INTERPOLATION" for me is always Linear so I don't read that data
"IN_TANGENT" And "OUT_TANGENT" is what I have no idea on what to do with them
When the data is viewed
This is how the "IN_TANGENT" Data looks like
<source id="Cube_location_X-intangent">
<float_array id="Cube_location_X-intangent-array" count="2">0 -1.061734</float_array>
<technique_common>
<accessor source="#Cube_location_X-intangent-array" count="1" stride="2">
<param name="X" type="float"/>
<param name="Y" type="float"/>
</accessor>
</technique_common>
</source>
And this is how the "OUT_TANGENT" Data looks like
<source id="Cube_location_X-outtangent">
<float_array id="Cube_location_X-outtangent-array" count="2">0.08333331 -1.061734</float_array>
<technique_common>
<accessor source="#Cube_location_X-outtangent-array" count="1" stride="2">
<param name="X" type="float"/>
<param name="Y" type="float"/>
</accessor>
</technique_common>
</source>
Right now both my Tangent data is 2D because I was just moving my cube in one plane in blender but I assume it can be 3D as well(Or maybe not?)
I feel I could use this data for smoother animation but I don't know the mathematics or algorithm to in co-operate this data in my Animator
The Tangents are also available for my rotation as well but again I don't know what to do with them
Eg:
<sampler id="Cube_rotation_euler_Z-sampler">
<input semantic="INPUT" source="#Cube_rotation_euler_Z-input"/>
<input semantic="OUTPUT" source="#Cube_rotation_euler_Z-output"/>
<input semantic="INTERPOLATION" source="#Cube_rotation_euler_Z-interpolation"/>
<input semantic="IN_TANGENT" source="#Cube_rotation_euler_Z-intangent"/>
<input semantic="OUT_TANGENT" source="#Cube_rotation_euler_Z-outtangent"/>
</sampler>
If not Code an bit of mathematics or ideas on what do with these values would be very usefull.
Thank U
lwjgl
You do know that LWJGL 3 comes with Assimp, which handles loading of many file formats, including COLLADA?
– httpdigest
Nov 7 at 21:03
True but u see I built an specific framework around my project and am basically building things from bottom up.Im trying to figure out stuff my self
– R VISHAL
Nov 8 at 3:49
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am currently working on an Colladae(.dae) loader for LWJGL which loads full scene information in one class. One of the elements I find it hard to decode is animation.
So basically I want my animator to support any type of animation. Right now it supports Matrix interpolation i.e I extract my translation,rotation,scale values from my matrices and interpolate's them.
The one animation I don't know how to implement is tangent animation. For example
One of samplers has this following structure
<sampler id="Cube_location_X-sampler">
<input semantic="INPUT" source="#Cube_location_X-input"/>
<input semantic="OUTPUT" source="#Cube_location_X-output"/>
<input semantic="INTERPOLATION" source="#Cube_location_X-interpolation"/>
<input semantic="IN_TANGENT" source="#Cube_location_X-intangent"/>
<input semantic="OUT_TANGENT" source="#Cube_location_X-outtangent"/>
</sampler>
<channel source="#Cube_location_X-sampler" target="Cube/location.X"/>
So The
"INPUT" is nothing but my animation timings(0 to 1)
"OUTPUT" is nothing but my xlocations at every key frame
"INTERPOLATION" for me is always Linear so I don't read that data
"IN_TANGENT" And "OUT_TANGENT" is what I have no idea on what to do with them
When the data is viewed
This is how the "IN_TANGENT" Data looks like
<source id="Cube_location_X-intangent">
<float_array id="Cube_location_X-intangent-array" count="2">0 -1.061734</float_array>
<technique_common>
<accessor source="#Cube_location_X-intangent-array" count="1" stride="2">
<param name="X" type="float"/>
<param name="Y" type="float"/>
</accessor>
</technique_common>
</source>
And this is how the "OUT_TANGENT" Data looks like
<source id="Cube_location_X-outtangent">
<float_array id="Cube_location_X-outtangent-array" count="2">0.08333331 -1.061734</float_array>
<technique_common>
<accessor source="#Cube_location_X-outtangent-array" count="1" stride="2">
<param name="X" type="float"/>
<param name="Y" type="float"/>
</accessor>
</technique_common>
</source>
Right now both my Tangent data is 2D because I was just moving my cube in one plane in blender but I assume it can be 3D as well(Or maybe not?)
I feel I could use this data for smoother animation but I don't know the mathematics or algorithm to in co-operate this data in my Animator
The Tangents are also available for my rotation as well but again I don't know what to do with them
Eg:
<sampler id="Cube_rotation_euler_Z-sampler">
<input semantic="INPUT" source="#Cube_rotation_euler_Z-input"/>
<input semantic="OUTPUT" source="#Cube_rotation_euler_Z-output"/>
<input semantic="INTERPOLATION" source="#Cube_rotation_euler_Z-interpolation"/>
<input semantic="IN_TANGENT" source="#Cube_rotation_euler_Z-intangent"/>
<input semantic="OUT_TANGENT" source="#Cube_rotation_euler_Z-outtangent"/>
</sampler>
If not Code an bit of mathematics or ideas on what do with these values would be very usefull.
Thank U
lwjgl
I am currently working on an Colladae(.dae) loader for LWJGL which loads full scene information in one class. One of the elements I find it hard to decode is animation.
So basically I want my animator to support any type of animation. Right now it supports Matrix interpolation i.e I extract my translation,rotation,scale values from my matrices and interpolate's them.
The one animation I don't know how to implement is tangent animation. For example
One of samplers has this following structure
<sampler id="Cube_location_X-sampler">
<input semantic="INPUT" source="#Cube_location_X-input"/>
<input semantic="OUTPUT" source="#Cube_location_X-output"/>
<input semantic="INTERPOLATION" source="#Cube_location_X-interpolation"/>
<input semantic="IN_TANGENT" source="#Cube_location_X-intangent"/>
<input semantic="OUT_TANGENT" source="#Cube_location_X-outtangent"/>
</sampler>
<channel source="#Cube_location_X-sampler" target="Cube/location.X"/>
So The
"INPUT" is nothing but my animation timings(0 to 1)
"OUTPUT" is nothing but my xlocations at every key frame
"INTERPOLATION" for me is always Linear so I don't read that data
"IN_TANGENT" And "OUT_TANGENT" is what I have no idea on what to do with them
When the data is viewed
This is how the "IN_TANGENT" Data looks like
<source id="Cube_location_X-intangent">
<float_array id="Cube_location_X-intangent-array" count="2">0 -1.061734</float_array>
<technique_common>
<accessor source="#Cube_location_X-intangent-array" count="1" stride="2">
<param name="X" type="float"/>
<param name="Y" type="float"/>
</accessor>
</technique_common>
</source>
And this is how the "OUT_TANGENT" Data looks like
<source id="Cube_location_X-outtangent">
<float_array id="Cube_location_X-outtangent-array" count="2">0.08333331 -1.061734</float_array>
<technique_common>
<accessor source="#Cube_location_X-outtangent-array" count="1" stride="2">
<param name="X" type="float"/>
<param name="Y" type="float"/>
</accessor>
</technique_common>
</source>
Right now both my Tangent data is 2D because I was just moving my cube in one plane in blender but I assume it can be 3D as well(Or maybe not?)
I feel I could use this data for smoother animation but I don't know the mathematics or algorithm to in co-operate this data in my Animator
The Tangents are also available for my rotation as well but again I don't know what to do with them
Eg:
<sampler id="Cube_rotation_euler_Z-sampler">
<input semantic="INPUT" source="#Cube_rotation_euler_Z-input"/>
<input semantic="OUTPUT" source="#Cube_rotation_euler_Z-output"/>
<input semantic="INTERPOLATION" source="#Cube_rotation_euler_Z-interpolation"/>
<input semantic="IN_TANGENT" source="#Cube_rotation_euler_Z-intangent"/>
<input semantic="OUT_TANGENT" source="#Cube_rotation_euler_Z-outtangent"/>
</sampler>
If not Code an bit of mathematics or ideas on what do with these values would be very usefull.
Thank U
lwjgl
lwjgl
asked Nov 7 at 12:50
R VISHAL
297
297
You do know that LWJGL 3 comes with Assimp, which handles loading of many file formats, including COLLADA?
– httpdigest
Nov 7 at 21:03
True but u see I built an specific framework around my project and am basically building things from bottom up.Im trying to figure out stuff my self
– R VISHAL
Nov 8 at 3:49
add a comment |
You do know that LWJGL 3 comes with Assimp, which handles loading of many file formats, including COLLADA?
– httpdigest
Nov 7 at 21:03
True but u see I built an specific framework around my project and am basically building things from bottom up.Im trying to figure out stuff my self
– R VISHAL
Nov 8 at 3:49
You do know that LWJGL 3 comes with Assimp, which handles loading of many file formats, including COLLADA?
– httpdigest
Nov 7 at 21:03
You do know that LWJGL 3 comes with Assimp, which handles loading of many file formats, including COLLADA?
– httpdigest
Nov 7 at 21:03
True but u see I built an specific framework around my project and am basically building things from bottom up.Im trying to figure out stuff my self
– R VISHAL
Nov 8 at 3:49
True but u see I built an specific framework around my project and am basically building things from bottom up.Im trying to figure out stuff my self
– R VISHAL
Nov 8 at 3:49
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53189799%2ftangent-interpolation%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You do know that LWJGL 3 comes with Assimp, which handles loading of many file formats, including COLLADA?
– httpdigest
Nov 7 at 21:03
True but u see I built an specific framework around my project and am basically building things from bottom up.Im trying to figure out stuff my self
– R VISHAL
Nov 8 at 3:49