3.4. Environment Node: Configuration File

The configuration file defines, for each scene, the elements that control the rendering of the scene whether interactive or not. The configuration file consists either of a single environment node, or of an interpolated environment node in order to enable environment variation during the course of scene rendering. The values of the attributes of the elements included in the environment node define the values of the elements that control the rendering of a scene in VC.

The remaining of this chapter presents the elements in an environment node that define the elements of a configuration file. In addition to the environment node, a configuration file can also include empty set macro-commands that define parameter values (see Chapter 4). In this case, the scope of the parameter is the whole scene.

<environment> ‐ The scene rendering environment

3.4.1. Attributes

NameTypeDefaults
idSTRINGEmpty string

3.4.2. Description

This element is a content node for defining the characteristics of a rendering environment.

3.4.3. Expected content

This element expects the following elements: composition_output_file, display, frame_rate, gravity, interpolation, log_file, max_values, povray_rendering_file, renderman_rendering_file, scene_schedule, sound_play, sound_server, texture_display, tiff_rendering_file, video_rendering_file, trace, udp_hosts, and windows.

3.4.4. Example

The example below defines an interpolated environment node.

<node id="interpolator_configuration">
  <interpolator id="interpolator_configuration" type="node" size="2">
    <schedule begin="0" dur="300" repeatCount="100000" mode="sinus-periodic" fill="freeze"/>

    <!-- CONFIGURATIONS #1 3 5 7 9 -->
    <node id="configuration_node_1">
      <environment id="environment_node">
        <composition_output_file id="worlds-out.xml" 
                default_print_file="VC-out.xml"/>
        <log_file id="fr-main.log"/>
        <windows size="1">
          <window id="main" width="360" height="288"/>
        </windows>
        <povray_rendering_file begin="5140" end="7450" step="1" id="" 
                head="bib/povray/composition-head-nolight-nosky.pov" 
                tail="bib/povray/composition-tail.pov" 
                shots="pov-files/P5_Metro/p52/"/>
        <renderman_rendering_file begin="0" end="0" step="1" id=""/>
        <tiff_rendering_file begin="6300" end="7450" step="1" id="" 
                 shots="tmp/"/>
        <video_rendering_file begin="200" end="1500" step="1" id=""/>
        <frame_rate crowd_step="1" minimal_interframe_latency="40" 
                 interpolation_refreshing_variation="0.03"/>
        <udp_hosts nb_udp_local_servers="1" nb_udp_remote_clients="1">
          <udp_local_server id="" local_port="1979" 
                 UDP_message_acknowledgement="false" UDP_message_trace="true" 
                 input_message_stack_depth="300" receive_format="Plain" 
                 receive_prefix="sound " acknowledge_prefix="graphic " 
                 offset_UDP_message_received="0"/>
          <udp_remote_client id="" remote_ip="127.0.0.1" 
                 remote_port="1980" UDP_message_acknowledgement="false" 
                 first_UDP_message_number="0" maximal_UDP_message_delay="0.10000" 
                 UDP_message_trace="true" output_message_stack_depth="300" 
                 send_format="Plain" send_prefix="graphic " send_ID="true"/>
        </udp_hosts>
        <sound_server azimut_refreshing_variation="10" 
                 elevation_refreshing_variation="10" 
                 distance_refreshing_variation="10" sound_spat_head="1033" />
        <trace trace_input_file="false" trace_output_frame_number="false" 
                 trace_time="false" first_frame_number="0" 
                 last_frame_number="1000000000"/>
        <display  with_splash_screen="false" splash_screen_encoding="pnga" 
                 splash_screen_file="textures/splash_screen-petit.png" 
                 success_screen_encoding="pnga" 
                 success_screen_file="textures/success_screen.png" 
                 defeat_screen_encoding="pnga" 
                 defeat_screen_file="textures/defeat_screen.png" 
                 with_screen_time_display="false" full_screen="false" 
                 echo="0.0"/>
        <scene_schedule initial_time="-2" time_step="0.0281" 
                 real_time="false" />
        <texture_display texture_displayed="true" shader_displayed="true" 
                 shader_cg_programs="bib/foule/"/>
        <sound_play sound_played="true"/>
        <max_values max_textures="100" max_displays="8" 
                 max_path_components="100" 
                 max_embedded_parameters="32" max_scenes="100" />
      </environment>
    </node>

    <!-- CONFIGURATIONS #2 4 6 8 10 -->
    <node id="configuration_node_2">
      <environment id="environment_node">
        <composition_output_file id="worlds-out.xml" 
                 default_print_file="VC-out.xml"/>
        <log_file id="fr-main.log"/>
        ...
      </environment>
    </node>

  </interpolator>
</node>

3.4.5. Access to Children Attributes

The attribute values of the environment node elements can be accessed through the sequence node:element:attribute in which node is the ID of the root node (the root of the scene graph), element is the ID of an environment element, and attribute is the attribute of the corresponding element.

The example below accesses the x attribute of the gravity environment element.

<action>
  <write_console value="G ({$conf_node:gravity:x})" />
</action>

In the next example, the name of the tiff output file and its directory name are written to the console. They correspond to the id and shots string attributes of the tiff_rendering_file environment element. In this example, conf_node is the ID of the environment node. The attributes of the POVray Rendering File, Renderman Rendering File, and Video Rendering File elements can also be accessed in a similar way.


<action>
  <write_console value="Frame No: (currentFrame), 
                        file: ({$conf_node:tiff_rendering_file:id}),
                        directory ({$conf_node:tiff_rendering_file:shots})" />
</action>