Houdini 20.0 Nodes VOP nodes

Global Variables VOP node

Provides outputs that represent all the global variables for the current VOP network type.

On this page

This operator provides outputs that represent all the global variables for the current VOP network type. There are no inputs to this operator.

The variables available from this operator will almost always include all of the input variables provided in the Output Variables operator. The difference between these two operators is that the Output Variables operator only provides inputs for those global variables that can be changed.

Every VOP network type has a set of global variables associated with it. These are the variables inherent to the VEX context that the VOP network operates in. For shading contexts (such as Surface and Displacement) these will be variables like the position of the point on the geometry being shaded (P), or the normal of the surface at the point being shaded (N). For SOP or POP Operator networks, these variables include the position of the point being manipulated (P), and the point number of the point being manipulated (ptnum).

Parameters

Context Type

Specifies the shader context in which the node is active. The shader context can be Surface, Fog, Light, or Displacement.

A Material Shader Builder SHOP can contain several shaders, each defined by a portion of the VOP network the builder SHOP contains. There will be nodes for several shader context types inside. For example, surface and displacement to define a material that assigns color and perturbs the surface geometry.

Other SHOPs, such as Surface Shader Builder or Displacement Shader Builder contain only one type of context. The VOP nodes inside can specify only that context type, so this parameter will be disabled.

Output A Single Variable

When enabled, it shrinks the number of outputs to one and outputs only the global variable chosen from the menu below. This option is very useful when the operator is part of a subnetwork that needs to be accessed by different contexts.

Variable Name

Menu of all available global variables. It works in conjunction with the toggle above it.

Inputs

None.

Outputs

The list of available outputs depends on the current VOP network type. The number of outputs depends on whether Output A Single Variable is enabled.

When found in a VEX Surface SHOP Type network, Outputs include the following.

Cf

Surface Color.

Of

Surface Opacity.

Af

Surface Alpha.

P

Surface Position.

Pz

Surface Depth.

I

Direction from Eye (camera) to Surface.

dPds, dPdt

Directions or Derivatives of surface.

N

Surface Normal.

Ng

Surface Geometric Normal.

Eye

Position of Eye (camera).

s, t

Parametric s and t coordinate (u, v).

Time

Shading Time.

dPdz

Change in Position with depth.

SID

Sample Identifier. A sample id to be used with the nextsample() VEX function to generate consistent random samples that don’t change when re-rendering or between frames.

See also

VOP nodes