11
$\begingroup$

What processes comprise a Cycles render? I was watching the top of the render view and watching the progress messages:

  • Synchronizing Object | ObjectName
  • Updating Mesh | Computing Normals
  • Updating Scene BVH | Building BVH
  • Packing BVH Nodes
  • Path Tracing Sample 1/xxx

There were a couple others I missed because they happened so quickly. But this got me wondering what actually is happening underneath the hood and I thought you guys might know.

I am especially interested in finding out what BVH is, since I've heard of BVH data being imported/exported between 3D applications.

$\endgroup$
2

1 Answer 1

15
$\begingroup$

I can't provide explanations of all the steps, but I can explain a few and do some research of my own.

BVH:

BVH stands for Bounding Volume Hierarchy. It is a method of grouping up the parts of your scene into bounding volumes so that Cycles only has to be concerned with objects within a BV that the current ray intersects. This speeds up render times by eliminating unnecessary collision checking. It does add a very small amount of extra time at the beginning of the render though to build the BVH (i.e. split up the objects).

For more on BVH check out this answer.


Path [Ray] Tracing:

Ray tracing is the actual rendering, all the previous steps are simply getting the scene ready to render. Ray tracing is the process of calculating the paths of light photons (called rays or sometimes paths) through the scene.

Cycles is what is called a backwards ray tracing engine. This is because instead of tracing the rays trough the scene starting a the light source, cycles traces the rays backwards starting from the camera. This eliminates having to waste time calculating rays that never hit the camera.

To visualize how this works say we are rendering a 16 x 9 px image. Now imagine that a 16 x 9 pixel grid is overlaid over the camera view. The way cycles computes the final render is by shooting a ray at the center of each pixel.

enter image description here

The path of this ray is then traced through the scene, interacting with the surfaces or volumes of the objects in the scene according to their shaders.

enter image description here

The path will stop when either 1. the ray has hit a lamp or emission shader, 2. the ray will not hit any more objects on it's current trajectory, or 3. the ray has completed a maximum number of bounces. Cycles will then compute the color of that pixel based on the emission strength and color of the final medium it hit, the colors of the mediums it interacted with along the way, and the length of the ray.

However, if cycles only shot one ray per pixel you would end up with a pretty terrible looking result. After all, if a surface is 50% diffuse and 50% glossy, that one ray can't act both ways, it has to choose one. Not to mention more complicated shader node trees, or even the fact that many shaders (like diffuse) introduce a random element to the bounce of a ray. This is solved by sending multiple rays per pixel and averaging the RGB values of each ray. You can change the number of rays cycles shoots per pixel by changing the number of samples.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .