In|Framez® Papers

Depth Tinting Analysis

By Homam Bahnassi


Even though XSI6's out-of-the-box hair system can be quite fast and stable in rendering, in some cases it can give considerable rendering times for frames with hundreds of thousands of hair strands with complex shading/shadowing options. For that, I spent some time figuring out different approaches for rendering hair in XSI including my own approach which I call “Depth Tinting”. Below are the results of the comparison between the possible techniques, in addition to rendered captures that show the rendering quality differences between the methods.


The Test

The test machine was chosen with quite-low configuration to emphasize the rendering time and show clear differences between the techniques. The test machine's specs are:

And these are the rendering settings used for the test:
AA Min-1
AA Max1
AA Sample filter typeTriangle
AA Sample filter size2
BSP Max Depth45
BSP Max Leaf Size10
ShadowMap Resolution1024
ShadowMap Sampling24
Volumic ShadowMap Sub-Sampling2
AreaLight U Sampling3
AreaLight V Sampling3




The Graphs

The following graphs show the rendering time for each method with different hair count. You’ll notice how “Depth Tinting” is an all-case winner. The rendering results produced are quite acceptable in comparison to the other methods with longer rendering times.

Rendering Results

Hair Count (strands)Ray-tracedArea LightShadow MapDepth Tinting
4000127.11704.5667.8445.29
8000274.661395.2699.1362.24
12000345.12149.26118.3574.36
16000421.932400.71138.2378.98
20000491.352926.08159.6985


Rendering Results Graph

In addition, we compute the percentage between each rendering technique and Depth Tinting. Notice that rendering more hair strands makes Depth Tinting more effective. The difference is clarified by computing the percentage between the rendering time for 20000 strands to 4000 strands:
Hair Count (strands)Ray-traced %Area Light %Shadow Map %
4000280.657981555.66149.790241
8000441.291772241.74159.270566
12000464.09362890.34159.15815
16000534.223853039.64175.018992
20000578.058823442.45187.870588
(20000/4000) %2.05965572.212851.25422449




Limitations

Although this technique has potential as a rendering time/quality balance, it still has limitations at the moment, which prevent it from being used widely in rendering hair in XSI or any similar package that depends on the “Hair & Shave Cut” hair system.
These limitations can be listed as the following…

This technique is still a prototype, the main algorithm at the moment is based on experimental mathematical equations for predicting hair & surface attributes. Replacing these equations with more clever equivalents is our next high-priority task.




Demo

For viewing an actual test drive of this technique, you can download the Querks demo that is based completely on this technique, each frame took about 45 secs on the mentioned test hardware and rendering settings.