The variables in the next table are closely related to the previous. They describe the intersection of the ray with an object, and give information about that object and how it was hit.
type | name | content |
---|---|---|
miTag | refraction_volume | volume shader for refraction |
miUint | label | object label for label file |
miTag | instance | instance of object |
miTag | light_instance | instance of light |
miScalar [4] | bary | barycentric coordinates |
miVector | point | intersection (ray end) point |
miVector | normal | interpolated normal at point |
miVector | normal_geom | geometry normal at point |
miCBoolean | inv_normal | true if normals were inverted |
miScalar | dot_nd | dot prod of normal and dir |
double | dist | length of the ray |
miTag | material | material of hit primitive |
void * | pri | completely identifies the hit primitive |
double | shadow_tol | safe zone to prevent self-shadows |
miScalar | ior | index of refraction of medium |
miScalar | ior_in | index of refr. of previous medium |
miScalar | importance | importance of the current ray |
refraction_volume
refraction_volume
to
volume
(which is the shader that gets called when the
material shader returns) in the mi_trace_refraction
and mi_trace_transparent
functions. The material shader may decide that the ray is leaving and not
entering the object, and look in the state's parents for an outside
volume shader. This state variable is ignored in autovolume mode. label
instance
light_instance
bary
bary[0]
bary[1]
point
normal
normal_geom
scalp, and can be useful for certain shading models.
inv_normal
normal
and normal_geom
and sets
inv_normal
to miTRUE. This does not happen in
shadow shaders, where dot_nd
is undefined. dot_nd
dot_nd
is undefined because there is no surface
normal; however, mental ray constructs an artificial surface point to
return a useful dot_nd
value. dist
material
pri
pri
before sampling a light. Shaders other than volume
shaders should restore pri
before returning. When a visible
area light source is hit, pri
is set to NULL. Some mi_query modes do not work if
pri
has been modified. pri
has identified the object, and
pri_idx
was used to identify the primitive. The
pri_idx
is not available any more. In order to identify the
primitive, the mi_query
mode miQ_PRI_INDEX
can be used.shadow_tol
ior
"ray differentials"
is set to true.ior_in
ior
, this field helps the shader with inside/outside
calculations. It contains the "previous" index of refraction, in the medium the
ray was traveling through before the intersection. Like ior
,
the ior_in
field is neither set nor used by mental ray
except for computing ray differentials for refraction rays. It exists to
allow material shaders to inherit the previous index of refraction to
subsequent shaders. importance
Copyright © 1986, 2015 NVIDIA ARC GmbH. All rights reserved.