3Delight supports all the required functions to properly run OSL shaders. That being said, the philosophy of writing OSL shaders for 3Delight differs very slightly from other renderers. In a nutshell, the 3Delight rendering core is organized so that OSL shaders can remain as abstract as possible. For example, it is discouraged (and indeed wrong) to use functions such as backfacing()
to write shaders. Also, some shadeops have seen their definition slightly changed to simplify shader writing or to allow 3Delight make a better job at sampling the final image.
Consider the following simplified "glass" shader and compare it to the "glass" shader distributed with OSL:
3Delight | Other Systems | ||
---|---|---|---|
|
|
As you can see, there are no fresnel terms and no backfacing()
call. 3Delight will take the proper decision, based on many factors including the fresnel factors, to properly sample the surface.
3Delight supports all the most advanced closures. Some of the BRDF went through extensive research in order to extend them beyond the original specs. As an example, 3Delight's GTR can also model refractions, allowing to render realistic forested glass and other effects.
Closure | Description | Ray Types |
---|---|---|
microfacet – ggx | Models isotropic or anisotropic GGX BRDF. This model can handle reflection, refraction or both at the same time. | reflection, refraction, glossy |
microfacet – gtr | Models isotropic GTR BRDF. A "gamma" parameter can be supplied to control the "tail" of the highlight to model highly realistic materials. | reflection, refraction, glossy |
microfacet – cooktorrance | Models an anisotropic Cook-Torrance BRDF. | reflection, glossy |
microfacet – blinn | Models a Blinn specular BRDF | reflection, glossy |
oren_nayar | Models a diffuse reflector based on the Oren-Nayar model. | diffuse |
diffuse | Models a diffuse reflector. | |
reflection | Models a perfect reflector. Note that fresnel factor is automatically computed by 3Delight. If no fresnel component is wanted, one can pass 0 as the "eta" parameter. | reflection |
refraction | Models a refraction. Fresnel factor is included by 3Delight. | refraction |
hair | Models a Marschner BRDF for hair. Simulates the R, TT and TRT lobe as suitable for a monte carlo simulation. | reflection, refraction, glossy. |
For the first time, a renderer provides only one sampling control for all the lighting components: specular, diffuse and light. By adjusting only one "Shading Samples" value, the artist can reduce noise without having to fiddle around with per-material or per-component sampling. 3Delight uses space varying heuristics to select the best element to sample (specular, diffuse, light) by respecting the total allotted rays budget.
For the anti-aliasing component, 3Delight provides a non-multiplicative "PixelSamples" control. This control is detached from the "Shading Samples" parameter so that artists can control shading quality and anti-aliasing quality independently.
The following simple renders illustre how "Shading Samples" control the various lighting elements all at once. The scene is mostly matte (diffuse) with a GGX material applied to the tall cube.
Shading Samples | 16 | 64 | 256 | 256 |
AA Samples | 2x2 | 2x2 | 2x2 | 4x4 |
Number of Rays | 12.7 millions | 48.7 millions | 191 millions | 194 millions |
Time | 6.5 seconds | 26.5 seconds | 100 seconds | 108 seconds |
Comments | Draft render | Notice how diffuse, specular and shadows improve together. | High quality render with linear improvement in all lighting elements. | Increasing pixel samples do not affect render time since all the time is spent in shading. |
A very important feature of the Unified Budget Sampling is that sampling quality is independent of the number of area lights. Consider the following two renders. One is done using 3Delight the other is using PrMan. Parameters have been adjusted so that both renderers use the same number of light samples to render the image. (Load the different images in a flip book to better see the quality difference)
Renderer | 1 Area Light, 32 Light Samples | 7 Area Lights, 32 Light Samples |
---|---|---|
3Delight | ||
PrMan |
Both renderers have the same sampling quality for the single area light case. For the 7 area light case, PrMan degrades substencially. The reason for the difference is as follow: