...
Consider the following simplified "glass" shader and compare it to the "glass" shader distributed with OSL:
| 3Delight | Other Systems | |
|---|---|---|
| ||
| 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.
...
The following parameters are recognized recognised for the GGX and GTR micro-facet distributions:
| Parameter | DescriotionDescription |
|---|---|
color realeta | Real part of the index of refraction of the base layer. |
color complexeeta | Imaginary part of the index of refraction the base layer. |
| Note that the pair (realeta, complexeeta) replaces the eta parameter. One can still use 'eta' to describe non-metallic surfaces. | |
float thinfilmthickness | Thickness of the film on the surface. As an example, on metals, this corresponds to the thickness of the oxide. |
float thinfilmeta | The index of refraction of the film. As an example, on metals, this corresponds to the index of refraction of the oxide. |
float mediumeta | Index of refraction of the outside medium. Defaults to 1 (vacuum) if not specified. An example scenario where the this needs to be change: a varnish |
float gamma | Pass this to the GTR closure to control the tail of the specular highlight. Setting this value to 2 renders a GGX distribution exactly. |
...
Here is an example render of a steel sphere with a thin film of oxide ferum. It is rendered with varying roughness.
| R=0.05 | R=0.1 |
|---|---|
| R=0.2 | R=0.4 |
a |
Arbitrary Output Variables
...
| Info |
|---|
Note that AOVs can be output in any node of the OSL tree. If two different OSL nodes contribute to the specular_aov variable variable, 3Delight will correctly blend their contribution together in the final output and in the AOV. |
...
A remnant of the RenderMan way of doing things is the 'lockgeom' parameter which hints of symbolic linking of data defined on the geometry to parameters defined in the shader. From our point of view, this is feature is useless, as-is, in the OSL world:
- Symbolic linking is weak in that it is ill-defined : ; what happens if you have many parameters with the same name in an OSL network?
lockgeomcan be elegantly implemented by a ... connection (explicit linking).
...
| Code Block |
|---|
hair( dPdv, eta, absorption, sub-components , optional parameters ); |
Follows a description of each parameter of the hair closure:
...



