dribble custom shaders

While dribble can interpret many common trueSpace materials and convert them into RenderMan equivalents, some effects are only activated when a custom shader is applied to an object.

How to use

You select the shaders like any other shader, be they color, reflectance, transparency, or displacement - most custom dribble shaders will be reflectance shaders.  If you have other trueSpace renderers installed, such as V-Ray, you may have to switch back to Lightworks to ensure all custom shaders are accessible.  When you have selected a shader, open up the parameters, change as necessary, and then paint your object.  You should note that when using the trueSpace material editor, an accurate preview of the final RenderMan shader will not be shown in the preview panel, only an approximation.

dribble sub-surface scattering (drbSimpleSSS) - reflectance

While you can quickly get a sub-surface scattering (SSS) effect by using the regular translucent plastic shader, applying this shader gives you total control over the SSS properties of a surface.  The nature of a surface's SSS is described by two values - how light is scattered and how light is absorbed - together with the standard index of refraction.  Note that SSS calculations are very dependent on the scale of your geometry, so it is important to experiment with the shade rate and scale properties in particular if you are not getting the results you expect.

- luminance, diffuse, shininess, specular, specular color, reflection, refraction These values have the same meaning as in any other material.  Warning: Using reflections (i.e. setting reflection more than 0) on an SSS object can greatly slow down rendering!  Also note that even though there is an index of refraction parameter, there is no "transmission" parameter as that is replaced by the SSS parameters below

- scattering This is how the material treats scattered light, specified as red, green, and blue values

- absorption Likewise, this controls how light is absorbed, again specified as red, green, and blue values.

- shade rate Like the overall shading rate or the global illumination shading rate, the shading rate controls the detail of the SSS calculations, where smaller is more accurate but slower.  Because of the nature of most SSS surfaces, we can use very large shading rates (even around 64 or so) to reduce render time and memory usage but with very little visible difference in output.  See the examples below.

- scale All SSS calculations are done in millimeters, and this does not usually fit well with exported dribble scenes, so you may need to change the scale if you're seeing an unexpected result.  See below for examples, and how scale ties in with shading rate.

Shading Rate and Scale Examples

As was noted earlier, getting good SSS results and keeping render times down demands experimentation with the shading rate and scale values.  The defaults will give the most accurate and predictable results, but they are not necessarily the fastest for your particular scene.

For highly scattering surfaces (usually softer, like potatoes or wax) you can bump up the scale and the shading rate and still get good results, just faster (note that all render times refer to the original, larger renders):

Shade Rate 1, rendered in 114 seconds Shade Rate 64, rendered in 78 seconds

For harder surfaces, to get the most accurate result you need to set the scale correctly.  The default of 0.01 matches the default trueSpace unit size (meters), but let's see what different scale values do to our results:

Scale of 1, Shade Rate 16, rendered in 59 seconds
This doesn't look like a hard surface at all
Scale of 0.01, Shade Rate 16, rendered in 86 seconds
The correct scale gives us what we're looking for, but with ugly artefacts
Scale of 0.01, Shade Rate 1, rendered in 116 seconds
Reducing the shading rate removes the artefacts, so we get the accurate result, but slower

How do I find good values for scattering and absorption?

Experiment!  However, because the values needed can be so specific, here's a list of materials to get you started, taken from the academic paper that the SSS calculations were based on.  The "color" column is what you should use for your color shader, in RGB values.

Scattering Absorption Refraction Color
Apple 2.29  2.39  1.97 0.0030  0.0034  0.046 1.3 217  214  135
Chicken 1 0.15  0.21  0.38 0.015  0.077  0.19 1.3 79 38 26
Chicken 2 0.19  0.25  0.32 0.018  0.088  0.20  1.3 82 41 26
Cream 7.38  5.47  3.15 0.0002  0.0028  0.0163 1.3 250 230 186 
Ketchup 0.18  0.07  0.03  0.061  0.97  1.45 1.3 41 3 0
Marble 2.19  2.62  3.00 0.0021  0.0041  0.0071 1.5 212 201 191
Potato 0.68  0.70  0.55 0.0024  0.0090  0.12 1.3 196 158 54
Skim milk 0.70  1.22  1.90 0.0014  0.0025  0.0142 1.3 207 207 176
Skin 1 0.74  0.88  1.01 0.032  0.17  0.48 1.3 112 56 33
Skin 2 1.09  1.59  1.79 0.013  0.070  0.145 1.3 161 112 87
Spectralon 11.62  0.41  4.9 0.00  0.00  0.00 1.3 255 255 255
Whole Milk 2.55  3.21  3.77 0.0011  0.0024  0.014 1.3 232 224 194