Triangle

Overview

triangle renderer node
triangle renderer node

Triangle renderers displays the particles as triangles.
You can specify the position, color, normal, and UVs of each vertex of the triangle and have a full control over the shape and transformation of the triangle.
This renderer is not yet supported in all our public integrations.

Triangle renderer sample

Triangle custom normals

If your triangles are lit, you might want to specify custom normals for each vertex of the triangle renderer. By default, the triangle renderer can generate its own normal and tangent.
Here is an effect that reconstructs a mesh using the triangle renderer, showing the result with and without providing per-vertex normals to the renderer.

Mesh reconstruction triangle renderer
The "Custom Normals" feature is not enabled here, you can see that the triangles are "flat": There is a single triangle normal, auto-generated from the vertex positions.
Mesh reconstruction with custom normals
The "Custom Normals" feature is enabled, the triangle renderer takes the actual vertex normal of the mesh as input. This creates a "smooth" lighting on the mesh.

You can also use the "Normal Bending Factor" that will curve the normals and tangents depending on the barycenter of the triangle.

Triangle custom UVs

You can also specify a per-vertex UV coordinate on the triangle renderer using the "Triangle Custom U V s" feature. The tangent of the triangle will be automatically computed depending on the UVs and normals set as inputs.
The default value for the vertices UVs when the "Triangle Custom U V s" feature is disabled are (0, 0), (1, 0), (0, 1).

Geometry inputs

Property

Type

Description

TriangleCustomNormals

bool

Enables the Triangle Custom Normals rendering feature:
Allows to specify a distinct normal for each triangle vertex. When disabled, each vertex will use the normal of the triangle plane.

TriangleCustomUVs

bool

Enables the Triangle Custom UVs rendering feature:
Allows to specify a custom UV coordinate for each triangle vertex.

Position1

float3

Position of the first triangle vertex in world coordinates

Position2

float3

Position of the second triangle vertex in world coordinates

Position3

float3

Position of the third triangle vertex in world coordinates

+ all common renderer properties

Editor Materials:

  • Triangle_Transparent/Legacy_Default_Triangle: Regular transparent triangle (additive, alpha-blended, or premultiplied-alpha)

  • Triangle_Opaque/Legacy_Opaque_Triangle: Opaque triangle, depth tested. Alpha-testing can be used for cutouts

  • Triangle_Distortion/Legacy_Distortion_Triangle: Triangle drawing in the distortion pass, useful for heat-shimmering effects

Render-features

Lit

Lights the particle with the scene lights.

Property

Type

Description

CastShadows

bool

Can cast shadows

Roughness

float

Material roughness (PBR). A roughness of 0.0 represents a mirror, a roughness of 1.0 represents a purely diffuse surface.

Metalness

float

Material metalness (PBR). A metalness of 0.0 represents a pure nonmetal, a metalness of 1.0 represents a pure metal.
Affects the color of the reflections.

Type

enum

  • Solid

  • Transparent

Input pins

NormalMap

String

Texture map representing tangent-space normals to be used for lighting.

RoughMetalMap

String

Roughness ® and Metalness (G) packed in an RGBA texture

LitMaskMap

String

TriangleCustomNormals

Allows to specify a distinct normal for each triangle vertex. When disabled, each vertex will use the normal of the triangle plane.

Property

Type

Description

Normal1

float3

Normal of the first triangle vertex in world coordinates

Normal2

float3

Normal of the second triangle vertex in world coordinates

Normal3

float3

Normal of the third triangle vertex in world coordinates

TriangleCustomUVs

Allows to specify a custom UV coordinate for each triangle vertex.

Property

Type

Description

UV1

float2

UV coordinates of the first triangle vertex

UV2

float2

UV coordinates of the second triangle vertex

UV3

float2

UV coordinates of the third triangle vertex