General Guidelines

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:

3DelightOther Systems
surface glass
    [[ string help = "Simple dielectric material" ]]
(
    float Ks = 1,
    color Cs = 1,
    float eta = 1.5
  )
{
    Ci = Ks * reflection(N, eta) + Cs * refraction(N, eta);
}
surface glass
    [[ string help = "Simple dielectric material" ]]
(
    float Ks = 1,
    color Cs = 1,
    float eta = 1.5
  )
{
	float _eta = backfacing() ? 1/eta : eta;
	Ci = Ks * reflection(N, _eta) + Cs * refraction(N, _eta);
}

 

 

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. 

Supported Closures

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.

 

ClosureDescriptionRay Types
microfacet – ggxModels isotropic or anisotropic GGX BRDF. This model can handle reflection, refraction or both at the same time.reflection, refraction, glossy
microfacet – gtrModels 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 – cooktorranceModels an anisotropic Cook-Torrance BRDF.reflection, glossy
microfacet – blinnModels a Blinn specular BRDFreflection, glossy
oren_nayarModels a diffuse reflector based on the Oren-Nayar model.diffuse
diffuseModels 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
refractionModels a refraction. Fresnel factor is included by 3Delight.refraction
hairModels a Marschner BRDF for hair. Simulates the R, TT and TRT lobe as suitable for a monte carlo simulation.reflection, refraction, glossy.

 

Unified Budgeted Sampling

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 Samples1664256256
AA Samples2x22x22x24x4
Number of Rays12.7 millions48.7 millions191 millions194 millions
Time6.5 seconds26.5 seconds100 seconds108 seconds
CommentsDraft renderNotice 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 lights. Consider the following two renders. One is done using 3Delight the other is using PrMan.