# Render settings toolbox¶

Render settings control global simulation parameters, such as simulation algorithm, halt condition, selected environment and instrument. You may find this toolbox in the tools menu.

## Algorithm¶

The algorithm parameters control how the software computes the result image. They do not change the final result if you wait for a very long time, until the noise has fully disappeared. But they may significantly impact the speed at which noise decreases, depending on how the light behaves in the scene.

### Light Path Depth¶

Ocean uses a bidirectional ray-tracing algorithm : light paths are generated from instrument and light sources simultaneously. This parameters controls the maximum number of bounces for the paths starting from light sources. Increasing it will help when light sources are narrow and generate caustics, for instance with direct sun or light bulbs. On the other hand, with diffuse light sources such as overcast sky, it will decrease the overall efficiency.

The maximum value is 64, but increasing it above 10-15 has generally no significant impact. The minimum value is 1, best for overcast sky simulations.

If you do not want to optimize the simulation time, we recommend letting it on 16. Setting a low value such as 1 will decrease simulation times by 50% in good cases, but may multiply it by 100 or more in the worst ones.

### Metropolis¶

When checked, Ocean will perform a Metropolis integration instead of a classical Monte-Carlo integration. This means that when it finds an interesting light path, it will try looking at similar paths instead of picking a new random one. This is very efficient for difficult scenes, where only a tiny fraction of rays contribute to the final image. On the other hand, the noise generated by the Metropolis algorithm is coarser, and will require more samples to be visually acceptable.

It is recommended to enable this option only in scenes where rays have a low probability of going from the sources to the instruments.

### Double precision mesh¶

For mesh geometries, ray/surface collisions can be computed using single or double floating-point precision. Double precision increases accuracy, while slowing down simulation speed by 5% to 10%. Single precision may cause artifacts revealing the meshing with needle triangles (very small width/length ratio), or errors when important geometry details are very small compared to the mesh size.

## Halt Condition¶

Ocean performs a statistical integration to compute the result. This means, that he never finishes, but only gets closer and closer to the ideal solution.

It’s up to the user to stop the simulation, when the error reaches an acceptable level. This can be done by clicking on the “stop” button, or by setting a halt condition.

### Halt Time¶

This sets the number of seconds before the simulation stops

### Halt SPP¶

This sets the maximum sample per pixel value before the simulation stops

## Environment¶

You can choose here which environment lighting will be used for the simulation, if you defined several ones. For instance, with an outdoor building simulation, you can set up multiple environments corresponding to various weather conditions : overcast, cloudy, clear sky, and night time. It is then very easy to select one in this list before starting the render.

Please read object list toolbox for more details on how to create, edit and remove environments in your scene.

## Instrument¶

You can choose here which instrument will be used for the simulation, if you defined several ones. Multiple instrument may be set, for instance to simulate various camera views.

Please read object list toolbox for more details on how to create, edit and remove instruments in your scene.

The target image dimensions are usually set in the instrument definitions. However, you may override them with the “Width” and “Height” controls. If only one is set, the other one is updated accordingly, to keep the instrument’s aspect ratio constant.

## Ocean XML 3.0 example¶

This is an example on how render settings are described in Ocean XML format:

<globalsettings>
<prm lightpathdepth="16"/>
<prm metropolis="true"/>
<prm halttime="-1"/>
<prm haltspp="-1"/>
<prm xresolution="-1"/>
<prm yresolution="-1"/>
<prm activeinstrument="Perspective"/>
<prm activeenvironment="environment"/>
<prm meshcollider="double"/>
</globalsettings>