Graph VectorField Generator

The Graph vector-field generator uses a PopcornFX nodegraph to compute the vector of each voxel from its UVW or integer coordinates.

Properties

Property name

Default value

Description

All common properties, see VectorField Generators

Seed

0

Random seed used to generate the vector-field

Animation

AnimationStart

0.0

When generating an animated vector-field, time in seconds of the start of the animation (on the first frame)

AnimationEnd

1.0

When generating an animated vector-field, time in seconds of the emd of the animation (on the last frame)

Vector Graph

The vector graph is run once per voxel of the final vector-field, to compute the value of this voxel’s vector.
The base vector graph consists of an input template VectorFieldGeneratorArgs, which outputs various useful properties such as the UVW coordinates of the voxel, and an output template VectorFieldGeneratorOutputs, which expects as an input the vector to write into the voxel.

Vector Graph

Current Limitations

  1. You cannot make local templates

  2. You cannot use custom attributes

  3. The simulation will be one-shot, it cannot be iterated over multiple frames to make a simulation converge using previous voxel values

Available Inputs

The VectorFieldGeneratorArgs template outputs the following values:

Property

Type

Description

UVW

float3

Normalized UVW coordinates of the center of the current voxel.

Coords

int3

Integer coordinates of the current voxel.

VoxelID

int

Flat index of the current voxel into the vector-field vector array.

Resolution

int3

Vector-field resolution.

CellSize

float3

Cell size in world units.

AnimationCursor

float

Animation time in seconds, between the AnimationStart and AnimationEnd values of the generator.

FrameRatio

float

Normalized animation cursor in the [0, 1] range.

FrameID

int

Integer frame number in an animated vector-field. For static vector-fields, this will always be 0.

FrameCount

int

Total number of frames in an animated vector-field. For static vector-fields, this will always be 1.

BoundsMin

float3

Min corner of the bbox, in world coordinates. Equal to the BoundsMin property of the generator.

BoundsMax

float3

Max corner of the bbox, in world coordinates. Equal to the BoundsMax property of the generator.

BBoxCenter

float3

Center of the vectorfield bbox.

BBoxSize

float3

Size of the vectorfield bbox.

Available Outputs

The VectorFieldGeneratorOutputs template takes the following values as inputs:

Property

Type

Description

Vector

float3

Current voxel vector