system
March 2, 2010, 4:01pm
1
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
marcus
March 8, 2010, 11:57am
2
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.
<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.