Results 1 to 3 of 3

Thread: Splitting up euler angles in a single float_array

  1. #1
    Junior Member
    Join Date
    Jun 2008
    Posts
    12

    Splitting up euler angles in a single float_array

    I have an animation that is using euler angles for rotation. Would it be possible to generate a single source array that is accessed by three different samplers in three different ways so I can channel three different outputs to three transform elements?

    Example:
    Code :
    		<animation id="animation_1">
    			<source id="euler_input">
    				<float_array id="euler_input_array" count="4">0 3 4 5</float_array>
    				<technique_common>
    					<accessor count="4" source="#euler_input_array">
    						<param name="TIME" type="float"/>
    					</accessor>
    				</technique_common>
    			</source>
    			<source id="euler_interpolation">
    				<Name_array id="euler_interpolation_array" count="4">LINEAR LINEAR LINEAR LINEAR</Name_array>
    				<technique_common>
    					<accessor count="4" source="#euler_interpolation_array">
    						<param name="INTERPOLATION" type="name"/>
    					</accessor>
    				</technique_common>
    			</source>
    			<source id="euler_output">
    				<float_array id="euler_output_array" count="12">0 0 0 0 0 0 -1.5708 0 0 -1.5708 0 0</float_array>
    			</source>
    			<source id="euler_output_X">
    				<technique_common>
    					<accessor count="4" source="#euler_output_array" stride="3">
    						<param name="ANGLE" type="float"/>
    						<param type="float"/>
    						<param type="float"/>
    					</accessor>
    				</technique_common>
    			</source>
    			<source id="euler_output_Y">
    				<technique_common>
    					<accessor count="4" source="#euler_output_array" stride="3">
    						<param type="float"/>
    						<param name="ANGLE" type="float"/>
    						<param type="float"/>
    					</accessor>
    				</technique_common>
    			</source>
    			<source id="euler_output_Z">
    				<technique_common>
    					<accessor count="4" source="#euler_output_array" stride="3">
    						<param type="float"/>
    						<param type="float"/>
    						<param name="ANGLE" type="float"/>
    					</accessor>
    				</technique_common>
    			</source>
    			<sampler id="euler_sampler_X">
    				<input semantic="INPUT" source="#euler_input"/>
    				<input semantic="OUTPUT" source="#euler_output_X"/>
    				<input semantic="INTERPOLATION" source="#euler_interpolation"/>
    			</sampler>
    			<sampler id="euler_sampler_Y">
    				<input semantic="INPUT" source="#euler_input"/>
    				<input semantic="OUTPUT" source="#euler_output_Y"/>
    				<input semantic="INTERPOLATION" source="#euler_interpolation"/>
    			</sampler>
    			<sampler id="euler_sampler_Z">
    				<input semantic="INPUT" source="#euler_input"/>
    				<input semantic="OUTPUT" source="#euler_output_Z"/>
    				<input semantic="INTERPOLATION" source="#euler_interpolation"/>
    			</sampler>
    			<channel source="#euler_sampler_X" target="AnimatedNode/rotateX.ANGLE"/>
    			<channel source="#euler_sampler_Y" target="AnimatedNode/rotateY.ANGLE"/>
    			<channel source="#euler_sampler_Z" target="AnimatedNode/rotateZ.ANGLE"/>
    		</animation>

    The coherency test fails with the following error (three times):

    CHECK_count Failed: expected=0, result=0
    (type=source,id=euler_output_X)
    accessor_stride >= accessor_size but array_count != accessor_count * accessor_size
    I fail to understand what this message is trying to tell me.

    According to the spec an accessor may access an external array source with interleaved data. What am I doing wrong?

  2. #2
    Member
    Join Date
    Feb 2005
    Location
    San Jose, CA
    Posts
    63

    Re: Splitting up euler angles in a single float_array

    I fixed this problem in the new release of coherencytest 1.3.
    Please check out the new release here.
    https://sourceforge.net/project/showfil ... _id=653612

    Your animation passed the new coherencytest.

    Herbert

  3. #3
    Junior Member
    Join Date
    Jun 2008
    Posts
    12

    Re: Splitting up euler angles in a single float_array

    Ok, thanks for the fix.

    Will the improved coherencytest also be available as conditioner?

    Roland

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •