Houdini 21.0 Nodes VOP nodes

Karma Ray Import 2.0 VOP node

Imports the value of the specified variable from Karma.

On this page
Since 21.0

Tips

  • This node’s type parameter can be used to convert the type. For example, changing Type from Int to Vector2 for ray:objectid lets you connect directly to MtlX Cell Noise 2D, rather than having to always add a MtlX Convert and MtlX Combine 2.

  • ray:objectid and ray:primid may be useful for adding per-prim or per-element variation. A more reliable way to provide ID signals to a shader would be to author primvars directly, if possible.

Ray Imports

These are general variables based on rays tracking through the scene and the objects they hit.

Variable

Type

Description

ray:curveattribP

vector3

Position of curve at ray

ray:curveattribTanV

vector3

Tangent of curve at ray

ray:curveattribwidth

float

Width of curve at ray

ray:direction

vector3

Ray direction from the eye or camera into the scene

ray:dPdz

vector3

Distance of delta for current volume ray

ray:hitdist

float

World-space distance from ray:origin to ray:hitP

ray:hitN

vector3

Surface normal of hit surface

ray:hitN_facingratio

float

Facing ratio of hit surface (dot product of surface normal and incident ray)

ray:hitNg

vector3

Geometric normal of hit surface

ray:hitNg_facingratio

float

Geometric facing ratio of hit surface (dot product of geometric normal and incident ray)

ray:hitP

vector3

Position on hit surface

ray:hitPz

float

Hit end distance

ray:hituv

vector2

Parametric coordinates of hit surface

ray:isshadowray

bool

Indicates if the ray is shadow type

ray:level

integer

Number of bounces at the hit surface

ray:motionvector

vector3

Raster-space velocity of hit surface

ray:objectid

int

Individual gprims (i.e. Geometric Primitives) like Meshes, BasisCurves, Points, etc…

ray:backface

bool

Indicates if the hit surface is a backface

ray:origin

vector3

Ray origin at the eye or camera

ray:pixelsamples

integer

Number of pixel samples at ray

ray:primid

int

Polygon, point, and curve elements of each gprim

ray:time

float

Time stamp associated with ray

ray:velocity

vector3

Velocity at hit surface

VOP nodes