Decal

Overview

decal renderer node
decal renderer node

Decal renderers display the particles as decals on the opaque geometry of the scene.
A decal is a box that projects a texture on the geometry inside of it.
In PopcornFX, the texture is projected from the top face of the box.

By default, the decal renderer is invisible and you need to enable the "diffuse" or the "emissive" feature to actually see it. There are three different controls over the decal rendering:

  • Fade Top: fade the decal depending on the distance to the bottom of the box: the closer it is the the bottom, the more faded is gets.
    0 means no fade and 1 means "start to fade as soon as the geometry is closer to the bottom face than to the center of the box"

  • Fade bottom: same as "Fade Top" but for the opposite face of the box.

  • Fade Angle: not implemented yet. Should fade depending on the angle between the projected geometry and the box orientation.

Decal renderer sample

Decal fading

Geometry inputs

Property

Type

Description

FadeTop

float

Incorrectly named! Should be FadeBottom !
Start of the fade on the bottom section of the decal box volume.

  • 1.0 starts fading linearly at the box center, all the way to the bottom.

  • 0.5 starts fading linearly halfway between the center and the bottom.

  • 0.0 has no fade and the decal abruptly stops at the bottom of the box.

FadeBottom

float

Incorrectly named! Should be FadeTop !
Start of the fade on the top section of the decal box volume.

  • 1.0 starts fading linearly at the box center, all the way to the top.

  • 0.5 starts fading linearly halfway between the center and the top.

  • 0.0 has no fade and the decal abruptly stops at the top of the box.

FadeAngle

float

Reserved, not yet implemented

Position

float3

Decal projection box center in world coordinates

Scale

float3

Decal projection box size

Orientation

orientation

Decal projection box orientation

+ all common renderer properties

Render-features

Diffuse

Exposes a diffuse map and diffuse color.

Property

Type

Description

Input pins

DiffuseMap

String

Texture map used for the diffuse lighting component

Color

float4

Diffuse color, multiplied with the diffuse map color.

Emissive

Exposes an emissive map to use as a purely emissive color in addition to the regular diffuse component.

Property

Type

Description

Input pins

EmissiveMap

String

Texture map used for the emissive lighting component.

EmissiveColor

float3

Emissive color, multiplied with the emissive texture

Atlas

Allows to use a sprite-sheet as the diffuse texture, and control which subset of the texture is used using a per-particle TextureID input.

Property

Type

Description

Source

enum

  • External: Atlas tiles are defined in an external .pkat atlas file. Their topology can be arbitrary.

  • Procedural: The number of tiles along the U and V axes are specified by the SubDiv property.

SubDiv

int2

Subdivision count

Blending

enum

Frame blending type

  • None: No interpolation between frames

  • Linear: Linear blending

  • MotionVectors: Use the MotionVectorsMap texture as the interpolation vectors to blend between frames

DistortionStrength

float

Multiplier over the uv distortion
Distortion strength to apply for Houdini exported maps is: -(1.0 / FPS / ColRow).

Input pins

Definition

String

Atlas definition (.pkat)

MotionVectorsMap

String

Motion vectors texture, used to blend between frames when Blending is set to MotionVectors

TextureID

float

Index of the sub-rect to use inside the atlas