Files
Mujoco_WASM/test/engine/testdata/vis_visualize/orthographic.xml
T
Yuval Tassa c7f5766345 Add frustum visualization for orthographic cameras.
PiperOrigin-RevId: 847698917
Change-Id: I13633e8ba2d4718b127a5838c404ab74c6180e3d
2025-12-22 03:43:54 -08:00

35 lines
1.1 KiB
XML

<!-- Test model for visual debugging of orthographic cameras. -->
<mujoco>
<visual>
<!-- free camera is orthorgaphic with a 5m vertical field-of-view -->
<global orthographic="true" fovy="5"/>
<scale camera="0.5"/>
</visual>
<asset>
<texture name="grid" type="2d" builtin="checker" width="512" height="512" rgb1=".8 .6 .4" rgb2=".2 .3 .4"/>
<material name="grid" texture="grid" texrepeat="10 10" texuniform="false" reflectance=".2"/>
</asset>
<default>
<camera projection="orthographic"/>
</default>
<worldbody>
<light pos="0 0 3"/>
<geom type="plane" size="10 10 .01" material="grid"/>
<body pos=".5 .5 .5">
<freejoint/>
<geom type="box" size=".5 .5 .5" pos="0 0 .5"/>
</body>
<!-- box should pefectly fit within field-of-view -->
<camera name="fovy = 1" pos=".5 .5 2" projection="orthographic" fovy="1" resolution="640 480"/>
<!-- 2 floor squares should pefectly fit within field-of-view -->
<camera name="fovy = 2" pos="0 0 3" fovy="2"/> <!-- inherits projection="orthographic" from defaults -->
</worldbody>
</mujoco>