Examples

Add Point to Group

GroupPainted Example for Add Point to Group VOP node

This example demonstrates how to take a painted attribute and build a point group from that attribute using the Add Point to Group VOP and the Create Point Group VOP.

VOPpointgroup Example for Add Point to Group VOP node

Example of building point Groups in a VOP SOP where every other point is added to a new group.

Only point groups are supported in VOPs.

The VOPs you need to learn are:

Add Point To Group VOP, Create Point Group VOP, and Point In Group VOP

Curvature

WornMetal Example for Curvature VOP node

This example shows how the curvature vop can be added to a shader network to add a worn or distressed look to your material.

/nodes/vop/for

curveSegmentRotations

This is a method for applying rotations to curve segments. It utilizes the For Loop Vex Node to compute segments and apply rotations and position, according to point numbers.

Fuzzy Defuzz

Fuzzy Logic Obstacle Avoidance Example Example for Fuzzy Defuzz VOP node

This example shows agent obstacle avoidance and path following implemented using a fuzzy logic controller.

Fuzzy Logic State Transition Example Example for Fuzzy Defuzz VOP node

This example shows a crowd setup where the state transition is triggered on a fuzzy network setup.

/nodes/vop/if

ST_Colour

This is a simple example of using the If-Then Block VOP with the “true” value coming from outside the If-Then subnet, and the “false” value also coming from outside the If-Then subnet.

A Condition VOP is used based on the “t” Global Variable. When “t” is less then .5, the If-Then gets a “false” Condition, and when “t” is equal to or greater than .5, the If-Then gets a “true” Condition.

In this example, the red color is used if the value fed into the condition is not True, and blue if the condition being fed in is True.

SimpleInsideSubnet

This is a very simple example of using the If-Then Block VOP with the “true” value coming from outside the If-Then subnet, and the “false” value coming from inside the If-Then subnet.

In this example, the red color is used if the value fed into the condition is not True, and blue if the condition being fed in is True.

SimpleOutsideSubnet

This is a very simple example of using the If-Then Block VOP with the “true” value coming from outside the If-Then subnet, and the “false” value also coming from outside the If-Then subnet.

In this example, the red color is used if the value fed into the condition is not True, and blue if the condition being fed in is True.

Inline Code

CrinkleSphere Example for Inline Code VOP node

This example demonstrates the use of an Inline Code node that allows you to write VEX code that is put directly into your shader or operator definition.

Layer Mix

Layeredshader Example for Layer Mix VOP node

This example shows how to layer shaders together using the layermix node when one of the textures has an embedded alpha. A similar process can be used with the layercomp node.

Meta-Loop Import

SimpleMetaImport Example for Meta-Loop Import VOP node

This example demostrates how to use the Meta-Loop Start, Meta-Loop Next and Meta-Loop Import VOPs.

It calculates the sum of the densities of all metaballs in some input geometry, and uses that total to create an image in a Composite Network.

Parameter

RampParameter Example for Parameter VOP node

This example shows how to control the particle colours using the temperature attributes from a pyro simulation using a Ramp Parameter VOP node.

Point Cloud Iterate

PointCloudIterateAverage Example for Point Cloud Iterate VOP node

This example shows how the pciterate vop can be used to average together points returned by pcopen. First, a point cloud is generated with a floating point “check” channel initialized to 1 inside a circle in the x-z plane. Then, the points are filtered in a shader by looping using the pciterate vop and averaging the value of the “check” channel. The point cloud used in the example is stored inside the asset as points.pc.

PointCloudLookup Example for Point Cloud Iterate VOP node

This example shows how to accomplish point cloud lookups for volumes using pcfilter and pciterate. It demonstrates how to iterate over and import values returned by a query.

Point Cloud Write

PointCloudWrite Example for Point Cloud Write VOP node

This example shows how the pcwrite vop can be used to write out points to a point cloud file. Render the mantra1 ROP to generate the point cloud, then view the point cloud with gplay. The distribution of points will depend on where mantra shaders are executed - in this case, the mantra ROP is configured to shade hidden surfaces allowing the back faces of the sphere to generate points.

Ray Trace

RaytraceVopShader Example for Ray Trace VOP node

This example demonstrates a simple ray traced shader using a vop vex network. To modify the shader properties, create a properties shader in the material and connect it to the output shaders node. You can then add rendering parameters to the properties node. For example to control the number of reflection bounces, you would add the reflect limit parameter.

Sensor Panorama Create

SensorDeform Example for Sensor Panorama Create VOP node

Example demonstrating sensor creation and how depth information can be extracted using the cone command. This allows the centre sphere to be deform by observed sphere.

Node examples

Examples by node type