Effects

Overview

A PopcornFXEffect is the UE asset (.uasset) that will contain the sources of the PopcornFX Effect (.pkfx) (see Effect production pipeline).

Importing an effect

Effects are imported like any other UE asset:

  • Click the Import button

  • Simply drag & drop the source pkfx file into your project’s content browser.

Once the effect is imported, you should now see the PopcornFXEffect asset in your content browser with its associated thumbnail (see Capturing thumbnails).
image

Effect editor

A dedicated preview editor is available for effects, simply double-click a PopcornFXEffect asset:
UE4 plugin: Effect editor

  1. Effect dependency list (Textures, Meshes, Atlases, Sounds, ..)

  2. Material list

  3. Effect attributes for preview

Effect dependencies

You will find here everything the effect needs for update (simulation) and rendering.
All dependencies can be overridden by a custom asset as long as the new asset resides inside the Pack Mount Point.

Effect materials

By default, the UE plugin chooses UE materials compatible with the various renderers the effect uses.
Materials are grouped (batched) by their compatibility (same draw call).
You can override the default mapped material with a custom one.

Default materials

We provide default materials for every renderers, but you can override them globally, per project.

  • Under Edit >> Project Settings >> PopcornFX Editor >> Default Materials

UE4 Plugin: Default materials

Material parameters

The plugin maps the following renderer parameters to the material if they are available:

Parameter name

Parameter type

Description

Renderer type(s)

DiffuseTexture

Texture

Diffuse map

Billboard / Ribbon / Mesh

DiffuseTextureRamp

Texture

Diffuse Ramp map if DiffuseRamp is enabled

Billboard / Ribbon / Mesh

EmissiveTexture

Texture

Emissive map if Emissive is enabled

Billboard / Ribbon / Mesh

NormalTexture

Texture

Normal map if LegacyLit is enabled

Billboard / Ribbon / Mesh

SpecularTexture

Texture

Specular map if LegacyLit is enabled

Billboard / Ribbon / Mesh

AlphaRemapper

Texture

Alpha-remap map if AlphaRemap is enabled

Billboard / Ribbon / Mesh

MotionVectorsTexture

Texture

Motion Vectors map if Atlas blending mode is MotionVectors

Billboard / Ribbon

PopcornFX_SoftnessDistance

Scalar

Softness distance if SoftParticles is enabled

Billboard / Ribbon / Mesh

PopcornFX_MaskThreshold

Scalar

Alpha-test value threshold if material is Masked

Billboard / Ribbon / Mesh

PopcornFX_MVDistortionStrengthColumns

Scalar

MotionVectors distortion strength (columns)

Billboard / Ribbon

PopcornFX_MVDistortionStrengthRows

Scalar

MotionVectors distortion strength (rows)

Billboard / Ribbon

Also, some UE material nodes map to built-in PopcornFX parameters:

Node name

Description

Renderer type(s)

Texcoord 0

UVs already built with the atlas definition (if any).

Billboard / Ribbon

ParticleColor

Renderer’s Color input (previously was VertexColor)

Billboard / Ribbon / Mesh

Texcoord 1

If Linear is set as the blending mode of Atlas, second set of texcoords

Billboard / Ribbon

DynamicParameter0.X

If Linear is set as the blending mode of Atlas, TextureID for lerping between texture samples

Billboard / Ribbon

DynamicParameter0.Y

If AlphaRemap is enabled, AlphaCursor used to determine the alpha remap

Billboard / Ribbon

DynamicParameter0

Renderer’s Input0 input if ShaderInput0 is enabled

Mesh

DynamicParameter1

Renderer’s Input1 input if ShaderInput1 is enabled

Billboard / Ribbon / Mesh

DynamicParameter2

Renderer’s Input2 input if ShaderInput2 is enabled

Billboard / Ribbon / Mesh

DynamicParameter3

Renderer’s Input3 input if ShaderInput3 is enabled

Billboard / Ribbon

Note: We plan to have an automatic parameter of all renderer properties that would be available in a material.

Custom materials

Creating custom materials is possible, but requires that the following properties are enabled:

  • Material applied on Billboard/Ribbon renderers: check Used With Particle Sprites and set Material Domain to Surface

  • Material applied on Mesh renderers: check Used With Mesh Particles

Note: You can create a copy of materials provided with the plugin to start from a working material.

Effect attributes

This section will list all attributes and attribute samplers.
Tweaking attributes values in this section will override default values for every instance of this effect, if their values aren’t overriden.
Attributes can either be set from here, or in realtime via C++ or Blueprint.