| Context(s) | fog light shadow surface |
int rayimport(string name, <type>&value)
int rayimport(string name, <type>&value[])
Extracts information any passed when the surface is hit by a ray fired by the gather.
name
The variable name, as passed using a "send:‹name›", value argument pair in gather (without the send: prefix).
value
If the function can import the named variable, it overwrites this variable with the value.
Returns
1 if a value by the given name was successfully imported, or 0 otherwise.
Built-in queryable names v3 ¶
You can pass the following values to name to query built-in ray information (not sent from gather()).
ray:P (vector)
The origin of the ray.
ray:D (vector)
The direction vector of the ray.
ray:time (float)
The shutter time associated with the ray.
ray:hitstack (int[])
The hit-stack provided by the intersector.
ray:element (int)
The element provided by the intersector.
ray:hituv (vector)
The parametric coordinates provided by the intersector.
ray:Ng (vector)
The geometric normal from the intersector.
Note
Data provided by the Mantra 3 intersector is raw data and may not be meaningful, or may be different across platforms or versions.
| See also | |
| shading |
|