SketchUp Cornell Box tutorial - part 2

Introduction

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

Tutorial

Modifying the SketchUp scene

../../_images/tuto2014cornell2-1.png

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

../../_images/tuto2017cornell2-2.png

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

../../_images/tuto2014cornell2-3.jpg

Now close the scene, and open cornellbox2.skp. Delete the default environment Environment in the object toolbox. 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

../../_images/tuto2017cornell2-4.png

Double click on the mirror material. Select the bsdf element in the tree, right click, and choose Change type > Reflective

../../_images/tuto2017cornell2-5.png

Select the intlaw element in the tree, right click, and choose Change Type > Complex Fresnel. 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. And change the roughness to Flat.

../../_images/tuto2017cornell2-6.png

Go to the Libraries toolbox, expand the library ocean-metals. Drag the Ti medium to the medium node. You may also switch Uniform to Linked of the medium element and 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. In the render settings, 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 in the output toolbox as in the previous tutorial, can be seen below:

../../_images/tuto2014cornell2-8.jpg