Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converter generates incorrect rotation key frames #244

Closed
pjcozzi opened this issue Feb 26, 2014 · 6 comments
Closed

Converter generates incorrect rotation key frames #244

pjcozzi opened this issue Feb 26, 2014 · 6 comments

Comments

@pjcozzi
Copy link
Member

pjcozzi commented Feb 26, 2014

A COLLADA model with the following animation (hand edited at this point) has five keyframes:

        <animation id="Geometry-mesh097_rotation098Z.ANGLE">
            <source id="Geometry-mesh097_rotation098Z.ANGLE-input">
                <float_array id="Geometry-mesh097_rotation098Z.ANGLE-input-array" count="5">0 0.5 1.0 1.5 2.0</float_array>
                <technique_common>
                    <accessor count="5" source="#Geometry-mesh097_rotation098Z.ANGLE-input-array" stride="1">
                        <param name="TIME" type="float" />
                    </accessor>
                </technique_common>
            </source>
            <source id="Geometry-mesh097_rotation098Z.ANGLE-output">
                <float_array id="Geometry-mesh097_rotation098Z.ANGLE-output-array" count="5">0 90 180 270 360</float_array>
                <technique_common>
                    <accessor count="5" source="#Geometry-mesh097_rotation098Z.ANGLE-output-array" stride="1">
                        <param name="ANGLE" type="float" />
                    </accessor>
                </technique_common>
            </source>
            <source id="Geometry-mesh097_rotation098Z.ANGLE-interpolations">
                <Name_array id="Geometry-mesh097_rotation098Z.ANGLE-interpolations-array" count="5">LINEAR LINEAR LINEAR LINEAR LINEAR</Name_array>
                <technique_common>
                    <accessor count="5" source="#Geometry-mesh097_rotation098Z.ANGLE-interpolations-array" stride="1">
                        <param name="INTERPOLATION" type="Name" />
                    </accessor>
                </technique_common>
            </source>
            <sampler id="Geometry-mesh097_rotation098Z.ANGLE-sampler">
                <input semantic="INPUT" source="#Geometry-mesh097_rotation098Z.ANGLE-input" />
                <input semantic="OUTPUT" source="#Geometry-mesh097_rotation098Z.ANGLE-output" />
                <input semantic="INTERPOLATION" source="#Geometry-mesh097_rotation098Z.ANGLE-interpolations" />
            </sampler>
            <channel source="#Geometry-mesh097_rotation098Z.ANGLE-sampler" target="Geometry-mesh097Node/rotation098Z.ANGLE" />
        </animation>

The rotation angles around Z are simply 0 90 180 270 360. However, the converter generates the following axis-angle rotations, which include an axis flip:

[1, 0, 0, 0]
[0, 0, 1, 1.5707963705062866]
[0, 0, 1, 3.1415927410125732]
[0, 0, -1, 1.5707963705062866]
[0, 0, -1, 0]

Adding more keyframes (with shorter deltas between the rotation angles) does not fix the problem nor does changing the domain from [0, 360] to [-180, 180].

@fabrobinet
Copy link
Contributor

Thanks for the test-case.

@pjcozzi pjcozzi changed the title Convert generates incorrect rotation key frames Converter generates incorrect rotation key frames Apr 28, 2014
@pjcozzi pjcozzi added this to the converter v1.0 milestone Apr 30, 2014
@pjcozzi
Copy link
Member Author

pjcozzi commented Jun 25, 2014

@fabrobinet any update here?

@fabrobinet
Copy link
Contributor

no, sorry, trying to wrap up spec changes first. I want to push these bugs early july.

@jdambruch
Copy link

I have the same problem here, any news on this?

@pjcozzi
Copy link
Member Author

pjcozzi commented Jul 18, 2015

@jdambruch no update yet AFAIK.

@pjcozzi
Copy link
Member Author

pjcozzi commented Dec 23, 2017

Replaced by KhronosGroup/COLLADA2GLTF#108

@pjcozzi pjcozzi closed this as completed Dec 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants