Previous
MATERIALs
blend
Allows to compose multiple materials together using
a pattern. The materials are placed in a gradient which
associates materials to real values. Then the output value of
the pattern is used to index this gradient at each point. The
result is a smooth transition between various elements.
- string "pattern", pattern regula
Specify the pattern that is to be used to interpolate between
materials, that is to say to index the gradient.
- string "gradient", { float x, material left, material right }
Specify the material gradient.
diffuse
This material describes surfaces that reflect light
diffusely, using Lambert's Law.
For example it may be used to model whitewash.
Since it has not ray-traced reflections and refractions it is
also particularly fast to render.
- string "ka", vector3 / pattern ka
Specify the ambient color.
This component is used as auto-illumination, to make the
dark regions of the material brighter. This feauture has a
historical background, since it has been used to fake the
ambiental light that now can be computed with radiosity techniques.
Thus it is not recommended to use it, unless radiosity takes
too much time for your rendering projects.
- string "kr", vector3 / pattern kr
Specify the diffuse reflection factor.
- string "displacement", pattern dispacement
Specify the displacement pattern that is used to alter geometry.
- string "bump", pattern bump
Specify the bump pattern that is used to fake a geometric
displacement by altering the normals to the surface.
- string "shadowing", float factor
Specify the opaqueness of shadows that are produced by this
material.
A value of 0 means no shadows. A value of 1 means physical shadows.
The default value is 1.
- string "visibility", int depth
Specify the tracing depth at which the objects made from this
material start to be visible.
This is useful to make objects appear only in the reflections,
for example to create rich environments though mantaining a
black background.
The default value is 0.
general
This material is made for the most general uses.
Instances of this type may be used to model liquids like water,
metals, glasses, rocks, woods, surrealistic plastics, and more.
- string "ka", vector3 / pattern ka
Specify the ambient color.
This component is used as auto-illumination, to make the
dark regions of the material brighter. This feauture has a
historical background, since it has been used to fake the
ambiental light that now can be computed with radiosity techniques.
Thus it is not recommended to use it, unless radiosity takes
too much time for your rendering projects.
- string "kdr", vector3 / pattern kdr
Specify the diffuse reflection factor.
- string "kdt", vector3 / pattern kdt
Specify the diffuse transmission factor.
- string "ksr", (vector3 ksrN, [vector3 ksrT]) | pattern ksr
Specify the specular reflection factor.
It may be specified in various ways:
if two colors are given they are interpreted as the
normal and the tangent components, that is to say the
reflection color at incident angles, and the one at grazing
angles. If only one color is specified it is used both for the
normal and the tangent components. If a pattern is specified
it is used to modulate the final reflection color, no matter how
many components where specified.
- string "kst", (vector3 kstN, [vector3 kstT]) | pattern kst
Specify the specular transmission factor.
It may be specified in various ways:
if two colors are given they are interpreted as the
normal and the tangent components, that is to say the
transmission color at incident angles, and the one at grazing
angles. If only one color is specified it is used both for the
normal and the tangent components. If a pattern is specified
it is used to modulate the final transmission color, no matter how
many components where specified.
- string "kr", vector3 / pattern kr
Specify the ray-traced reflection factor.
The higher this value the longer the computation times.
- string "kt", vector3 / pattern kt
Specify the ray-traced transmission factor.
The higher this value the longer the computation times.
- string "kd", float / pattern kd
Specify the amount of diffusion.
This value usually goes from 0 (no diffusion, maximum
specularity) to 1 (perfect diffusion).
This value does not affect ray-traced reflections and
transmissions. It only affects the ratio between diffuse and
specular components instead.
In practice the diffuse component is multiplied by kd, while
the specular one is multiplied by (1 - kd).
- string "km", float / pattern km
Specify the specular smoothness.
This value influences the specular reflections and
transmissions.
When the value tends to 0 the surface tends to
become perfectly polished, and when the value tends to 1 the
surface becomes very smooth and the spots of light grow in width.
- string "kb", float kb, int samples = 3
Specify the ray-traced reflection and transmission blurring.
If the reflections look grainy the number of samples should be
increased.
Note that non zero values of kb increase the computation time.
The default value is 0.
- string "IOR", float ior
Specify the index of refraction.
The default value is 1.0.
- string "fresnel", int switch, float r=0, float t=0
Specify the use of the Fresnel's effect, which makes the
reflection to transmission ratio vary accordingly to the
viewing angle and the index of refraction.
It is very useful to model real-looking glasses and
metals.
The switch parameter may be 0 to indicate the effect is turned
off, or 1 to indicate it is turned on.
If switch is 1 two parameters may be set:
r is the minimal amount of reflection and
t is the minimal amount of transmission.
The default value for switch is 0.
- string "shinyness", float shinyness
Specify the shinyness of the surface.
This value goes from 0 to 1. The higher it is the brighter
will look the specular spots of light.
The default value is 0.
- string "radiosity", int switch
Turn on / off the computation of radiosity.
This value strongly affects the rendering times (when rendering with
radiosity techniques).
The default value is 1.
- string "transmission", int switch
Turn on / off the simulation of fake caustics with transparent
shadows.
Note that if you render the scene with radiosity, you have not
to use transmission, otherwise fake caustics will overlap to
real ones.
The default value is 0.
- string "caustics", int ref_switch, int trn_switch
Turn on / off the production of real caustics.
This feature is only used when the scene method
radiosity() is called before rendering.
There are actually two switches, one for reflection caustics
and one for transmission caustics.
The default values are 1.
- string "shadowing", float factor
Specify the opaqueness of shadows that are produced by this
material.
A value of 0 means no shadows. A value of 1 means physical shadows.
The default value is 1.
- string "visibility", int depth
Specify the tracing depth at which the objects made from this
material start to be visible.
This is useful to make objects appear only in the reflections,
for example to create rich environments though mantaining a
black background.
The default value is 0.
matte
This material allows to create matte objects, that are made by a
uniform color.
- string "kc", vector3 / pattern kc
Specify the color of the matte.
- string "alpha", float / pattern alpha
Specify the alpha channel of the matte. It is useful to create
holes in an image that is to be composed with something else
in a 2d graphics program.
- string "shadowing", float factor
Specify the opaqueness of shadows that are produced by this
material.
A value of 0 means no shadows. A value of 1 means physical shadows.
The default value is 1.
- string "visibility", int depth
Specify the tracing depth at which the objects made from this
material start to be visible.
This is useful to make objects appear only in the reflections,
for example to create rich environments though mantaining a
black background.
The default value is 0.
physical
This material may be used to model everything using physical properties.
- string "ka", vector3 / pattern ka
Specify the ambient color.
This component is used as auto-illumination, to make the
dark regions of the material brighter. This feauture has a
historical background, since it has been used to fake the
ambiental light that now can be computed with radiosity techniques.
Thus it is not recommended to use it, unless radiosity takes
too much time for your rendering projects.
- string "kr", vector3 / pattern kr
Specify the reflection color.
Note that this value is used both for diffuse, specular and
ray-traced reflections.
- string "kt", vector3 / pattern kt
Specify the transmission color.
Note that this value is used both for diffuse, specular and
ray-traced transmissions.
- string "kd", float / pattern kd
Specify the amount of diffusion.
This value usually goes from 0 (no diffusion, maximum
specularity) to 1 (perfect diffusion).
It actually controls the ratio of diffuse to specular and
ray-traced reflections (and transmissions).
In practice the diffuse component is multiplied by kd, while
the specular and ray-traced ones are multiplied by (1 - kd).
- string "km", float / pattern km
Specify the specular smoothness.
This value influences the specular reflections and
transmissions.
When the value tends to 0 the surface tends to
become perfectly polished, and when the value tends to 1 the
surface becomes very smooth and the spots of light grow in width.
- string "kb", float kb, int samples = 3
Specify the ray-traced reflection and transmission blurring.
If the reflections look grainy the number of samples should be
increased.
Note that non zero values of kb increase the computation time.
The default value is 0.
- string "IOR", float ior
Specify the index of refraction.
The default value is 1.0.
- string "fresnel", int switch, float r=0, float t=0
Specify the use of the Fresnel's effect, which makes the
reflection to transmission ratio vary accordingly to the
viewing angle and the index of refraction.
It is very useful to model real-looking glasses and
metals.
The switch parameter may be 0 to indicate the effect is turned
off, or 1 to indicate it is turned on.
If switch is 1 two parameters may be set:
r is the minimal amount of reflection and
t is the minimal amount of transmission.
The default value for switch is 0.
- string "shinyness", float shinyness
Specify the shinyness of the surface.
This value goes from 0 to 1. The higher it is the brighter
will look the specular spots of light.
The default value is 0.
- string "radiosity", int switch
Turn on / off the computation of radiosity.
This value strongly affects the rendering times (when rendering with
radiosity techniques).
The default value is 1.
- string "transmission", int switch
Turn on / off the simulation of fake caustics with transparent
shadows.
Note that if you render the scene with radiosity, you have not
to use transmission, otherwise fake caustics will overlap to
real ones.
The default value is 0.
- string "caustics", int ref_switch, int trn_switch
Turn on / off the production of real caustics.
This feature is only used when the scene method
radiosity() is called before rendering.
There are actually two switches, one for reflection caustics
and one for transmission caustics.
The default values are 1.
- string "shadowing", float factor
Specify the opaqueness of shadows that are produced by this
material.
A value of 0 means no shadows. A value of 1 means physical shadows.
The default value is 1.
- string "visibility", int depth
Specify the tracing depth at which the objects made from this
material start to be visible.
This is useful to make objects appear only in the reflections,
for example to create rich environments though mantaining a
black background.
The default value is 0.
standard
This material provides all the features that are present in the
standard rendering packages.
- string "ka", vector3 / pattern ka
Specify the ambient color.
This component is used as auto-illumination, to make the
dark regions of the material brighter. This feauture has a
historical background, since it has been used to fake the
ambiental light that now can be computed with radiosity techniques.
Thus it is not recommended to use it, unless radiosity takes
too much time for your rendering projects.
- string "kc", vector3 / pattern kc
Specify the reflection color.
Note that this value is used both for diffuse and specular reflections.
- string "kr", vector3 / pattern kr
Specify the ray-traced reflection color.
- string "kt", vector3 / pattern kt
Specify the transmission color.
Note that this value is used both for diffuse, specular and
ray-traced transmissions.
- string "kd", float / pattern kd
Specify the amount of diffusion.
This value usually goes from 0 (no diffusion, maximum
specularity) to 1 (perfect diffusion).
It actually controls the ratio of diffuse to specular reflections.
In practice the diffuse component is multiplied by kd, while
the specular one is multiplied by (1 - kd).
In the case of transmissions it also affects the ray-traced
component, while for reflections this is not true.
- string "km", float / pattern km
Specify the specular smoothness.
This value influences the specular reflections and
transmissions.
When the value tends to 0 the surface tends to
become perfectly polished, and when the value tends to 1 the
surface becomes very smooth and the spots of light grow in width.
- string "kb", float kb, int samples = 3
Specify the ray-traced reflection and transmission blurring.
If the reflections look grainy the number of samples should be
increased.
Note that non zero values of kb increase the computation time.
The default value is 0.
- string "IOR", float ior
Specify the index of refraction.
The default value is 1.0.
- string "fresnel", int switch, float r=0, float t=0
Specify the use of the Fresnel's effect, which makes the
reflection to transmission ratio vary accordingly to the
viewing angle and the index of refraction.
It is very useful to model real-looking glasses and
metals.
The switch parameter may be 0 to indicate the effect is turned
off, or 1 to indicate it is turned on.
If switch is 1 two parameters may be set:
r is the minimal amount of reflection and
t is the minimal amount of transmission.
The default value for switch is 0.
- string "shinyness", float shinyness
Specify the shinyness of the surface.
This value goes from 0 to 1. The higher it is the brighter
will look the specular spots of light.
The default value is 0.
- string "radiosity", int switch
Turn on / off the computation of radiosity.
This value strongly affects the rendering times (when rendering with
radiosity techniques).
The default value is 1.
- string "transmission", int switch
Turn on / off the simulation of fake caustics with transparent
shadows.
Note that if you render the scene with radiosity, you have not
to use transmission, otherwise fake caustics will overlap to
real ones.
The default value is 0.
- string "caustics", int ref_switch, int trn_switch
Turn on / off the production of real caustics.
This feature is only used when the scene method
radiosity() is called before rendering.
There are actually two switches, one for reflection caustics
and one for transmission caustics.
The default values are 1.
- string "shadowing", float factor
Specify the opaqueness of shadows that are produced by this
material.
A value of 0 means no shadows. A value of 1 means physical shadows.
The default value is 1.
- string "visibility", int depth
Specify the tracing depth at which the objects made from this
material start to be visible.
This is useful to make objects appear only in the reflections,
for example to create rich environments though mantaining a
black background.
The default value is 0.
transparent
This material allows to create transparent objects. It is
usefult in conjunction with interiors, so that only the
volumetric shading is performed, for example to model a gas.
- string "alpha", float / pattern alpha
Specify the alpha channel of the matte. It is useful to create
holes in an image that is to be composed with something else
in a 2d graphics program.
- string "shadowing", float factor
Specify the opaqueness of shadows that are produced by this
material.
A value of 0 means no shadows. A value of 1 means opaque shadows.
The default value is 0.