1. Home
  2. Docs
  3. PopcornFX v2.3
  4. Plugins
  5. UE4 plugin
  6. Effects

Effects

Overview

A PopcornFXEffect is the UE4 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 UE4 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).

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 UE4 plugin chooses UE4 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 nameParameter typeDescriptionRenderer type(s)
DiffuseTextureTextureDiffuse mapBillboard / Ribbon / Mesh
NormalTextureTextureNormal map if LegacyLit is enabledBillboard / Ribbon / Mesh
SpecularTextureTextureSpecular map if LegacyLit is enabledBillboard / Ribbon / Mesh
AlphaRemapperTextureAlpha-remap map if AlphaRemap is enabledBillboard / Ribbon / Mesh
PopcornFX_SoftnessDistanceScalarSoftness distance if SoftParticles is enabledBillboard / Ribbon / Mesh

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

Node nameDescriptionRenderer type(s)
Texcoord 0UVs already built with the atlas definition (if any).Billboard / Ribbon
VertexColorRenderer’s Color inputBillboard / Ribbon
Texcoord 1If Linear is set as the blending mode of Atlas, second set of texcoordsBillboard / Ribbon
DynamicParameter0.XIf Linear is set as the blending mode of Atlas, TextureID for lerping between texture samplesBillboard / Ribbon
DynamicParameter0.YIf AlphaRemap is enabled, AlphaCursor used to determine the alpha remapBillboard / Ribbon
DynamicParameter0Renderer’s Input0 input if ShaderInput0 is enabledMesh
DynamicParameter1Renderer’s Input1 input if ShaderInput1 is enabledBillboard / Ribbon / Mesh
DynamicParameter2Renderer’s Input2 input if ShaderInput2 is enabledBillboard / Ribbon / Mesh
DynamicParameter3Renderer’s Input3 input if ShaderInput3 is enabledBillboard / 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 effectif their values aren’t overriden.

Attributes can either be set from here, or in realtime via C++ or Blueprint.

Still stuck? Contact us
Was this article helpful to you? Yes No

How can we help?