Graph Mesh Generator

The Graph mesh generator uses a PopcornFX nodegraph to compute the properties of each vertex on a source mesh (either procedural from a list of builtin shape types, or from an external mesh asset).

Properties

Property name

Default value

Description

All common properties, see Mesh Generators

SourceType

Plane

Source mesh type

  • Plane: One or more planes

  • Cube: A cube

  • Disk: A disk that can be parametrically deformed into an hemisphere

  • Cylinder: A cylinder

  • Sphere: A sphere

  • Mesh: An external mesh asset, which can be another .pkgo file to chain multiple layers of generation

Scale

1.0

Size of the final mesh

VertexColor

1, 1, 1, 1

Constant color set on all vertices

PlaneCount

1

When SourceType is set to Plane, number of cross-planes to generate

SubdivisionsWidth

1

Number of horizontal subdivisions, when SourceType is Plane, Cube, or Disk

SubdivisionsHeight

1

Number of vertical subdivisions, when SourceType is Plane, Cube, or Cylinder

SubdivisionsTheta

16

Number of subdivisions along the horizontal shape angle, when SourceType is Disk, Cylinder, or Sphere

SubdivisionsPhi

8

Number of subdivisions along the vertical shape angle, when SourceType is Sphere

DiskUVMode

Flat

UV generation mode when SourceType is Disk

  • Flat: UVs are projected from the top onto the disk

  • Polar: UVs are generated from the polar coordinates on the disk

Hemisphere``

0.0f

When SourceType is Disk, interpolation factor between a flat disk (0.0), and a hemisphere (1.0)

SourceMeshPath

<empty>

Mesh asset to use as the source mesh when SourceType is Mesh

RebuildNormals

false

When enabled, all the normals will be automatically recomputed from the mesh geometry.
The Normals output of the texture graph will be ignored.

RebuildTangents

false

When enabled, all the tangents will be automatically recomputed from the normals & UVs.
The Tangents output of the texture graph will be ignored.

SmoothAcrossUVSeams

false

When enabled, normals will be smoothed across UV seams.

Seed

0

Random seed used to generate the vector-field

Vertex Graph

The vertex graph is run once per vertex of the base generated mesh, to compute the new properties of this vertex.
The base vertex graph consists of an input template MeshGeneratorArgs, which outputs the various properties of the vertex, and an output template MeshGeneratorOutputs, which expects as an input all the properties to rewrite into that vertex. Pins that are not wired will keep the original property of the vertex.

Vertex 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 vertex values

Available Inputs

The MeshGeneratorArgs template outputs the following values:

Property

Type

Description

Position

float3

Vertex position

Normal

float3

Vertex normal

Tangent

float4

Vertex tangent in the xyz components, sign of bitangent in the w component

UV

float2

Vertex UV channel 0

UV1

float2

Vertex UV channel 1

UV2

float2

Vertex UV channel 2

UV3

float2

Vertex UV channel 3

UV4

float2

Vertex UV channel 4

UV5

float2

Vertex UV channel 5

UV6

float2

Vertex UV channel 6

UV7

float2

Vertex UV channel 7

UV8

float2

Vertex UV channel 8

UV9

float2

Vertex UV channel 9

Color

float2

Vertex Color channel 0

Color1

float2

Vertex Color channel 1

Color2

float2

Vertex Color channel 2

Color3

float2

Vertex Color channel 3

Color4

float2

Vertex Color channel 4

Color5

float2

Vertex Color channel 5

Color6

float2

Vertex Color channel 6

Color7

float2

Vertex Color channel 7

Color8

float2

Vertex Color channel 8

Color9

float2

Vertex Color channel 9

LODLevel

int

LOD Level of the current submesh being processed

SubmeshID

int

ID of the current submesh being processed

Available Outputs

The MeshGeneratorOutputs template takes the following values as inputs:

Property

Type

Description

Position

float3

Vertex position

PositionEnabled

bool

Whether or not the position should be written

Normal

float3

Vertex normal

NormalEnabled

bool

Whether or not the normal should be written

Tangent

float4

Vertex tangent in the xyz components, sign of bitangent in the w component

TangentEnabled

bool

Whether or not the tangent should be written

UV

float2

Vertex UV channel 0

UVEnabled

bool

Whether or not the UV channel 0 should be written

UV1

float2

Vertex UV channel 1

UV1Enabled

bool

Whether or not the UV channel 1 should be written

UV2

float2

Vertex UV channel 2

UV2Enabled

bool

Whether or not the UV channel 2 should be written

UV3

float2

Vertex UV channel 3

UV3Enabled

bool

Whether or not the UV channel 3 should be written

UV4

float2

Vertex UV channel 4

UV4Enabled

bool

Whether or not the UV channel 4 should be written

UV5

float2

Vertex UV channel 5

UV5Enabled

bool

Whether or not the UV channel 5 should be written

UV6

float2

Vertex UV channel 6

UV6Enabled

bool

Whether or not the UV channel 6 should be written

UV7

float2

Vertex UV channel 7

UV7Enabled

bool

Whether or not the UV channel 7 should be written

UV8

float2

Vertex UV channel 8

UV8Enabled

bool

Whether or not the UV channel 8 should be written

UV9

float2

Vertex UV channel 9

UV9Enabled

bool

Whether or not the UV channel 9 should be written

Color

float4

Vertex Color channel 0

ColorEnabled

bool

Whether or not the Color channel 0 should be written

Color1

float4

Vertex Color channel 1

Color1Enabled

bool

Whether or not the Color channel 1 should be written

Color2

float4

Vertex Color channel 2

Color2Enabled

bool

Whether or not the Color channel 2 should be written

Color3

float4

Vertex Color channel 3

Color3Enabled

bool

Whether or not the Color channel 3 should be written

Color4

float4

Vertex Color channel 4

Color4Enabled

bool

Whether or not the Color channel 4 should be written

Color5

float4

Vertex Color channel 5

Color5Enabled

bool

Whether or not the Color channel 5 should be written

Color6

float4

Vertex Color channel 6

Color6Enabled

bool

Whether or not the Color channel 6 should be written

Color7

float4

Vertex Color channel 7

Color7Enabled

bool

Whether or not the Color channel 7 should be written

Color8

float4

Vertex Color channel 8

Color8Enabled

bool

Whether or not the Color channel 8 should be written

Color9

float4

Vertex Color channel 9

Color9Enabled

bool

Whether or not the Color channel 9 should be written