Ocean 2014 Cornell Box tutorial - part 2
The previous tutorial shown how to model a simple scene in SketchUp, import it in Ocean, define lighting and material properties, and render the image.
In this tutorial, you will learn:
- How to make a change in the SketchUp geometry and continue in Ocean without redefining the light and materials
- How to define a metallic material and use Ocean libraries
- How to choose the best rendering algorithm
Modifying the SketchUp scene
We will start from the previous scene. You can download it here : cornellbox.skp.
Open it in SketchUp, select the faces from the tall block. You can do it by selecting its top face, then Right click > Select > Connected faces. Create a new material named "mirror" and apply it to the tall block faces. On the screenshot, we set it to black, but this is not very important. Save your scene, the resulting SketchUp file can be downloaded here : cornellbox2.skp
Importing materials from last tutorial
Now open Ocean. Instead of opening the SketchUp file directly, and redefining all materials from scratch, we will first open the Ocean scene file from the last tutorial.
You may download it here : cornellbox.ocbin. In the Objects tool box, select the four materials. Right click and select Export. Save them under a name such as "cornellbox-materials.ocxml".
You can download it here : cornellbox-materials.ocxml
Now close the scene, and open cornellbox2.skp. Remove the environment, then click on "File", "Import", "Materials" and choose cornellbox-materials.ocxml. If you render the scene, you should have an image similar to this one, with correct materials except for the tall block, whose material "mirror" is not defined yet.
Adding the metallic material
Double click on the "mirror" material. Select the main element in the tree, right click, and choose Change type > reflective
Select the intlaw element in the tree, right click, and choose Change Type > cfresnel. This means we have set the materials optical interface law to Complex Fresnel, which is the Fresnel equation extended to complex refractive indices such as metals.
Select the medium element, right click, and choose Change Type > linked. A medium describes volume optical properties such as dielectric function and refractive index, linked means we will not define it directly, but rather link it to an existing medium from a library. Keep the medium element selected.
Go to the Libraries tool box, expand the library ocean-metals. Drag the Ti medium to the target<tt> field of medium element editor. You may also type directly <tt>"ocean-metals::Ti" in this box, without using the libraries tool box. Click on "Apply" to validate the material changes.
Simulating the image
You may now render the scene again. As the metallic block will generate more complex light paths in the scene, it may be necessary to tune the render algorithm for faster noise convergence. You may increase the Light path depth setting to something like 16, and switch Metropolis on. These settings do not affect the final image after a very long rendering time, but may significantly change the convergence speed. Increasing the light path depth generally helps with localized light sources, while metropolis helps finding difficult light paths. They may also decrease efficiency on simple lighting cases.
The final rendered image, after setting the white point to 0.4367 and 0.4174 as in the previous tutorial, can be seen below:
The final Ocean scene can be downloaded here : cornellbox2.ocbin
This second tutorial is finished. You may try the many materials and light options, waiting for the full documentation. The next tutorial will deal with exporting objects, defining a smooth metallic material, and rendering algorithms.
There are other material examples in the "examples" folder of the Ocean installation directory. Don't hesitate to contact us for more help in testing the software.