1. Home
  2. Docs
  3. PopcornFX v2
  4. Rendering
  5. Materials
  6. Rendering interface

Rendering interface

Overview

PopcornFX projects define a standalone renderer interface, that describes the set of rendering capabilities supported in the project:

renderer interface

That list can be customized per project: this ensures FX artists only work with the set of features the game engine supports. This provides a constrained environment for particle materials, defined by the project lead(s).

 

In most cases, that default list provided with a new default project doesn’t represent what a game engine might support or would want to add (ie. Motion blur, UV scrolling, ..), however we limit that list to a set of features we know can be supported by most game engines.

 

Note: In future PopcornFX versions this list will be extended to support more built-in features supported by all integrations (ie. vertex animation, optical flow maps for atlas blending, ..).

 

Default rendering features

Note: Incompatible renderer feature musn’t be added together in a feature set

 

GeometryBillboard

Compatible renderers: Billboard renderer
Compatible renderer features: Lit, Transparent, Opaque, Diffuse, SoftParticles, CastShadows, Distortion, AlphaRemap, Atlas, FlipUVs

 

Mandatory to add when creating a feature set for a billboard renderer, describes the billboard’s position, size, rotation, billboarding mode and optional billboarding axes.

 

GeometryRibbon

Compatible renderers: Ribbon renderer
Compatible renderer features: Lit, Transparent, Opaque, Diffuse, SoftParticles, CastShadows, Distortion, CorrectDeformation, AlphaRemap, Atlas, CustomTextureU, TextureUVs, TextureRepeat

 

Mandatory to add when creating a feature set for a ribbon renderer, describes the ribbon’s position, size, billboarding mode and optional billboarding axes.

 

GeometryMesh

Compatible renderers: Mesh renderer
Compatible renderer features: Lit, Transparent, Opaque, Diffuse, SoftParticles, CastShadows, Distortion, AlphaRemap

 

Mandatory to add when creating a feature set for a mesh renderer, describes the mesh’s position, scale, orientation, mesh path and sub mesh ID.

 

GeometryLight

Compatible renderers: Light renderer
Compatible renderer features: Light, LightAttenuation, LightTranslucent

 

Mandatory to add when creating a feature set for a light renderer, describes the light’s position.

 

GeometrySound

Compatible renderers: Sound renderer
Compatible renderer features: Sound, SoundAttenuation, Doppler

 

Mandatory to add when creating a feature set for a sound renderer, describes the sound’s position.

 

Lit

Compatible renderers: Billboard renderer, Ribbon renderer, Mesh renderer
Compatible renderer features: GeometryBillboard, GeometryRibbon, GeometryMesh, Transparent, Opaque, Diffuse, SoftParticles, CastShadows, CorrectDeformation, AlphaRemap, Atlas, CustomTextureU, TextureUVs, FlipUVs, TextureRepeat

 

Optional feature, this renderer will be lit.

 

Transparent

Compatible renderers: Billboard renderer, Ribbon renderer, Mesh renderer
Compatible renderer features: GeometryBillboard, GeometryRibbon, GeometryMesh, Lit, Diffuse, SoftParticles, CastShadows, CorrectDeformation, AlphaRemap, Atlas, CustomTextureU, TextureUVs, FlipUVs, TextureRepeat

 

Mandatory to add with either GeometryBillboard, GeometryRibbon or GeometryMesh, indicates that those particles are non-opaque (Additive, Alpha Blended or Premultiplied Alpha).

 

Opaque

Compatible renderers: Billboard renderer, Ribbon renderer, Mesh renderer
Compatible renderer features: GeometryBillboard, GeometryRibbon, GeometryMesh, Lit, Diffuse, SoftParticles, CastShadows, CorrectDeformation, AlphaRemap, Atlas, CustomTextureU, TextureUVs, FlipUVs, TextureRepeat

 

Mandatory to add with either GeometryBillboard, GeometryRibbon or GeometryMesh, indicates that those particles are opaque (Solid or Alpha tested).

 

Diffuse

Compatible renderers: Billboard renderer, Ribbon renderer, Mesh renderer
Compatible renderer features: GeometryBillboard, GeometryRibbon, GeometryMesh, Lit, Transparent, Opaque, SoftParticles, CastShadows, CorrectDeformation, AlphaRemap, Atlas, CustomTextureU, TextureUVs, FlipUVs, TextureRepeat

 

Optional feature (although often added as required feature), allows to specify a diffuse map and per particle color.

 

SoftParticles

Compatible renderers: Billboard renderer, Ribbon renderer, Mesh renderer
Compatible renderer features: GeometryBillboard, GeometryRibbon, GeometryMesh, Lit, Transparent, Diffuse, CastShadows, CorrectDeformation, AlphaRemap, Atlas, CustomTextureU, TextureUVs, FlipUVs, TextureRepeat

 

Optional feature, allows particle to be depth-faded based on a softness distance.

 

CastShadows

Compatible renderers: Billboard renderer, Ribbon renderer, Mesh renderer, Light renderer
Compatible renderer features: GeometryBillboard, GeometryRibbon, GeometryMesh, GeometryLight, Lit, Transparent, Opaque, Diffuse, CorrectDeformation, AlphaRemap, Atlas, Light, LightAttenuation, LightTranslucent, CustomTextureU, TextureUVs, FlipUVs, TextureRepeat

 

Optional feature, indices that particles will cast shadows.

 

Distortion

Compatible renderers: Billboard renderer, Ribbon renderer, Mesh renderer
Compatible renderer features: GeometryBillboard, GeometryRibbon, GeometryMesh, Diffuse, CorrectDeformation, AlphaRemap, Atlas, Light, LightAttenuation, LightTranslucent, CustomTextureU, TextureUVs, FlipUVs, TextureRepeat

 

Optional feature (although often added as required feature), allows to specify a distortion map and per particle color.

 

CorrectDeformation

Compatible renderers: Ribbon renderer
Compatible renderer features: GeometryRibbon, Lit, Transparent, Opaque, Diffuse, SoftParticles, CastShadows, Distortion, AlphaRemap, Atlas, CustomTextureU, TextureUVs, FlipUVs, TextureRepeat

 

Optinal feature, tries to correct the perspective deformation in the fragment shader when ribbons have a non-uniform size.

 

AlphaRemap

Compatible renderers: Billboard renderer, Ribbon renderer, Mesh renderer
Compatible renderer features: GeometryBillboard, GeometryRibbon, GeometryMesh, Lit, Transparent, Opaque, Diffuse, SoftParticles, CastShadows, Distortion, CorrectDeformation, Atlas, CustomTextureU, TextureUVs, FlipUVs, TextureRepeat
Required features: Diffuse or Distortion

 

Optional feature, powerful fragment shader feature that remaps the final alpha from a source alpha remap texture.

Pseudo-shader looks like:

newAlpha = AlphaRemapper.sample(float2(Diffuse_color.a, AlphaCursorField)).r;

AlphaCursorField is the Billboard’s “Cursor” input pin.

 

Atlas

Compatible renderers: Billboard renderer, Ribbon renderer
Compatible renderer features: GeometryBillboard, GeometryRibbon, Lit, Transparent, Opaque, Diffuse, SoftParticles, CastShadows, Distortion, CorrectDeformation, AlphaRemap, CustomTextureU, TextureUVs, FlipUVs, TextureRepeat
Required features: Diffuse or Distortion

 

Optional feature, provides atlasing control over a diffuse or distortion map. Atlas can be procedural based on texture subdivision (ie. 2×2 or 3×4) or external (.pkat file).

 

Light

Compatible renderers: Light renderer
Compatible renderer features: GeometryLight, CastShadows, LightAttenuation, LightTranslucent

 

Optional feature (although often added as a required feature), allows to specify a per particle light color.

 

LightAttenuation

Compatible renderers: Light renderer
Compatible renderer features: GeometryLight, CastShadows, Light, LightTranslucent

 

Optional feature (although often added as a required feature), allows to specify a light range and attenuation steepness.

 

LightTranslucent

Compatible renderers: Light renderer
Compatible renderer features: GeometryLight, CastShadows, Light, LightAttenuation

 

Optional feature, indicates that this light will light translucent geometry.

 

Sound

Compatible renderers: Sound renderer
Compatible renderer features: GeometrySound, SoundAttenuation, Doppler

 

Optional feature (although often added as required feature), allows to indicate a sound data path and volume.

 

SoundAttenuation

Compatible renderers: Sound renderer
Compatible renderer features: GeometrySound, Sound, Doppler

 

Optional feature (although often added as required feature), allows to specify a sound range and attenuation model (Linear or InverseLinear).

 

Doppler

Compatible renderers: Sound renderer
Compatible renderer features: GeometrySound, Sound, SoundAttenuation

 

Optional feature, allows to specify a doppler factor and particle velocity.

 

CustomTextureU

Compatible renderers: Ribbon renderer
Compatible renderer features: GeometryRibbon, Lit, Transparent, Opaque, Diffuse, SoftParticles, CastShadows, Distortion, CorrectDeformation, AlphaRemap, Atlas, TextureUVs, TextureRepeat

 

Optional feature, allows to specify a UVs ‘U’ coordinate (ie. to stretch/scroll a map over the entire ribbon).

 

TextureUVs

Compatible renderers: Ribbon renderer
Compatible renderer features: GeometryRibbon, Lit, Transparent, Opaque, Diffuse, SoftParticles, CastShadows, Distortion, CorrectDeformation, AlphaRemap, Atlas, CustomTextureU, TextureRepeat

 

Optional feature, provides additional UV controls (FlipU, FlipV, RotateTexture)

 

FlipUVs

Compatible renderers: Billboard renderer
Compatible renderer features: GeometryBillboard, Lit, Transparent, Opaque, Diffuse, SoftParticles, CastShadows, Distortion, AlphaRemap, Atlas

 

Optional feature, allows to flip UVs.

 

TextureRepeat

Compatible renderers: Ribbon renderer
Compatible renderer features: GeometryRibbon, Lit, Transparent, Opaque, Diffuse, SoftParticles, CastShadows, Distortion, CorrectDeformation, AlphaRemap, Atlas, CustomTextureU, TextureUVs

 

Optional feature, indicates that the texture wrap mode will be Repeat instead of clamp.

 

Was this article helpful to you? Yes No

How can we help?