RenderSetup XML
- Last UpdatedApr 10, 2025
- 1 minute read
These are some RenderSetup XML file specifications by examples.
Basic example
A basic example of the RenderSetup XML file.
<?xml version="1.0" encoding="utf-8" ?>
<renderSetup version="1.0">
<Viewport name="MainViewport">
<hwnd index="0"/>
<pos value="0 0"/>
<!-- in window unit coordinates [0..1] (the window where the layer/viewport will be rendered) -->
<size value="0.8 0.7"/>
<!-- in window unit coordinates [0..1] (the window where the layer/viewport will be rendered) -->
<outputLayer value="SceneLayer"/> <!-- must always be present -->
<layers>
<Layer name="SceneLayer" type="sceneDefault">
<sceneName value="_all_"/>
<cameraName value="Camera001"/>
</Layer>
</layers>
</Viewport>
</renderSetup>
Multiviewport-multicontext example
A basic example of the RenderSetup XML file using two viewports with different Visual Contexts.
<?xml version="1.0" encoding="utf-8" ?>
<renderSetup version="1.0">
<Viewport name="DEFAULT_VIEWPORT">
<hwnd index="0"/>
<pos value="0 0"/>
<size value="1 1"/>
<outputLayer value="DEFAULT_2D_LAYER"/>
<layers>
<Layer name="DEFAULT_SCENE_LAYER" type="sceneFGI">
<fgiConfig file="./GameData/hdr/fgi_default.xml"/>
<postProcess id="DEFAULT_POSTPROCESS" file="./GameData/hdr/post_process_default.xml"/>
<sceneName value="_all_"/>
<cameraName value="ft_Camera01"/>
<visualContextName value="vc01" />
</Layer>
<Layer name="DEFAULT_2D_LAYER" type="2dOverlay">
<layer2DName value="DEFAULT_2D_LAYER_MAIN"/>
<input1 value="DEFAULT_SCENE_LAYER"/>
</Layer>
</layers>
</Viewport>
<Viewport name="SECONDARY_VIEWPORT">
<hwnd index="0"/>
<pos value="0.6 0.6"/>
<size value="0.4 0.4"/>
<outputLayer value="SECONDARY_2D_LAYER"/>
<layers>
<Layer name="SECONDARY_SCENE_LAYER" type="sceneFGI">
<fgiConfig file="./GameData/hdr/fgi_default.xml"/>
<postProcess id="DEFAULT_POSTPROCESS" file="./GameData/hdr/post_process_default.xml"/>
<sceneName value="_all_"/>
<cameraName value="ft_Camera02"/>
<visualContextName value="vc02" />
</Layer>
<Layer name="SECONDARY_2D_LAYER" type="2dOverlay">
<layer2DName value="SECONDARY_2D_LAYER_MAIN"/>
<input1 value="SECONDARY_SCENE_LAYER"/>
</Layer>
</layers>
</Viewport>
</renderSetup>
Oculus Rift example
To enable the Oculus Rift, add the <oculus> node inside the Viewport node.
<Viewport name="MainViewport">
<...>
<...>
<oculus value="true"/>
OpenVR example
To enable the OpenVR, add the <openvr> node inside the Viewport node.
<Viewport name="MainViewport">
<...>
<...>
<openvr value="true"/>