Friday, 31 October 2014

on Leave a Comment

Max Mental Ray BSP

BSP tree stands for Binary Space Partition tree.

The default BSP ray trace acceleration method is often used for small/medium Max scenes (i.e. less than one million triangles/polygons).Users often press the hotkey 7 to determine the number of polygons/faces/triangles in the scene. The default BSP ray trace acceleration method is often used for small/medium Max scenes (i.e. less than one million triangles/polygons). Users often press the hotkey 7 to determine the number of polygons/faces/triangles in the scene. It is worth noting that although the BSP parameters are under the ray tracing group, it only affects the geometry, as oppose to reflections, etc. 

This ray trace acceleration method essentially helps mental ray to cast rays in a speedy matter by creating an imaginary bounding box around the entire scene, with subdivisions. These subdivided patches/cells inside the bounding box are technically designated as voxels.Mental ray usually splits all voxels of the scene in three axes (i.e. X; Y; Z); in almost equal number of triangles, until depth is reached.

The "Size" and "Depth" parameters help mental ray to determine the total number of triangles (i.e.leafs)to be processed for ray casting/testing. The higher the depth values, the fewer the voxels will be. Fewer voxels equals faster rendering times, as mental ray will use fewer voxels to test the rays against.The default Size value of 10 sets the minimum number of objects to be found in the scene before a voxel is split (in all three axes (i.e. X; Y; Z). Smaller values equates to more voxels and slower rendering times.

When shooting a ray there are 2 phases

a) whilst checking/hitting voxels, it will touch triangles (i.e. leafs) in the process. If perchance there are 1000 triangles (i.e. leafs) in a voxel; each will be tested 40 times (i.e. default depth value). Subsequently the rendering times will be slow. If there are only 10 triangles (i.e. leafs), the process will be faster.With this in mind, the user’s goal should be to reduce the number of average and maximum leafs in the BSP tree.The total rendering time is a combination of the time it takes to create the voxels, move down the tree depth (i.e. pre processing/translation); and the final time to check/split the triangles (i.e. leafs) during the rendering time.

b) Moving down the BSP tree depth whilst checking/hitting all axis of each voxel. To have a visual representation of the BSP process, simply go to the mental ray processing parameters rollout. Under "diagnostics" parameters, enable the “visual” group:

This visual group consists of the following:

1-Sampling rate

2-coordinate space

3-Photon

4-BSP

5-Final Gather

The BSP visual diagnostics is divided by three different colors: Blue, Green and Red.Blue areas represent the lower areas of subdivision (i.e. less computation)
Green areas represent the middle areas of subdivision (i.e. intermediate computation)
Red areas represent greater areas of subdivision (i.e. high computation).

Production companies prefer to have a mix of all three colors in their diagnostics; which is an indication that mental ray is efficiently choosing the areas of the geometry to subdivide and otherwise. To fine-tune the BSP values, simply use a nice/simple texture or colour in "material override" toggle at a small resolution (i.e. 500x500 pixels).
The "material override" function has been covered in detail

0 comments :

Post a Comment

Powered by Blogger.