Results 1 to 2 of 2

Thread: animated camera example

  1. #1
    chemical187
    Guest

    animated camera example

    hello,

    I am working on getting an animated camera described in collada.

    the example I am starting from is

    <camera id="camera" type="perspective" yfov="0.927292" ymag="0" znear="0.01" zfar="1000" position="15.5, 9.5, 47" direction="0, 0, -2" up="0, 1, 0"/>

    I am hoping that the "position="15.5, 9.5, 47"" could be replaced with animation calls.

    but I am not sure how to go about that.

    so help. thank you very much.

    ken mcall

  2. #2
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

    Re: animated camera example

    Your example would be split between a COLLADA <camera> and a <node>. The camera orientation is defined with the lens looking down the -Z axis, with +Y up. Any node transforms can reorient and position it, typically with a <lookat> transform.

    Code :
    <library_cameras>
     <camera id="camera">
      <optics>
       <technique_common>
        <perspective> 
         <znear>0.01</znear> 
         <zfar>1000.0</zfar> 
        </perspective> 
       </technique_common> 
      </optics> 
     </camera> 
    </library_cameras>
    <library_nodes>
     <node>
      <translate sid="position">15.5 9.5 47</translate>
      <instance_camera url="#camera"/>
     </node>
    </library_nodes>

    Your yfov and ymag attributes don't translate to <perspective> so I'll let you ponder that.

Posting Permissions

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