PopcornFX v2.11

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
  1. Home
  2. Docs
  3. PopcornFX v2.11
  4. Baking
  5. Resource ovens
  6. Oven: Particle

Oven: Particle


Used for PopcornFX’s Particle effect files.
Applied to: *.pkfx

Property nameDefault valueDescription
All common properties, see COvenBakeConfig_Base
BakeModeBinaryCan be any of the following:

  1. LeaveAsIs : performs a straight copy from the source to the target pack without changing anything
  2. Text : forces conversion to text format
  3. Binary : forces conversion to binary format
EndiannessLittleEndianOnly used when ‘BakeMode’ is set to ‘Binary’. Can be any of the following:

  1. LittleEndian : writes the binary HBO file to little-endian format (native format for PC / PS4 / Xbox-One)
  2. BigEndian : writes the binary HBO file to big-endian format (native format for X360 / PS3 / PS-Vita / ARM / etc…)

Note that if the endianness does not match the target platform, the runtime will still be able to load the files, but will take a bit more time in order to swap all the values to the platform’s format.

RemoveEditorNodestrueIf set to true, will remove all nodes unknown to the asset-baker (Usually editor-specific nodes).
ExtensionsRemap<empty>Array of extensions remaps. The baker will replace the extensions in all file-paths in the currently baked file.
For example, here’s how you would remap source .fbx paths to .pkmm, and .png + .tga to a .dds runtime format, if you’ve setup the texture ovens to convert all pngs and tgas to dds:

ExtensionsRemap =
CompiletrueWhen enabled, will compile all layers into runtime IRs and store them in the effect file.
RemoveSourcetrueWhen enabled, will strip all source nodegraphs and scripts from the effect file. Cannot remove source if ‘Compile’ is not ‘true’: Would produce a useless, empty effect with neither sources, nor compiled bytecodes.
BuildVersions<empty>Build versions: contains the list of build version tags
CompilerSwitches<empty>String containing a series of nodegraph compiler & optimizer switches. See below for the list of supported switches
BackendCompilers<empty>List of backend configuration structures of type ‘COvenBakeConfig_ParticleCompiler‘ (see below)



The particle compiler bake config is referenced by the ‘BackendCompilers’ array of the particle config object.
It allows you to setup specific command-lines to build the bytecode objects of the various backends. It is mainly used for the GPU D3D backends, where you can specify the commandline to send to d3dcompiler / fxc

Property nameDefault valueDescription
TargetCPUSpecifies the target backend

  1. CPU : CPU VM backend
  2. D3D11 : GPU D3D11 backend (desktop)
  3. D3D12 : GPU D3D12 backend (desktop)
  4. D3D11X : GPU D3D11 backend (Xbox One)
  5. D3D12X : GPU D3D12 backend (Xbox One)
  6. D3D12XS : GPU D3D12 backend (Xbox Series X)
BakeBytecodeCommandLine_Windows<empty>On Windows, bytecode bake command line. Usually to a d3dcompiler or fxc binary
BakeBytecodeCommandLine_Linux<empty>On Linux, bytecode bake command line
BakeBytecodeCommandLine_MacOsX<empty>On Macosx, bytecode bake command line

See the COvenBakeConfig_Base documentation page for command-line structure.

Compiler switches

This is a string containing a space-separated list of switches allowing control over the graph compiler and optimizer

COvenBakeConfig_Particle    $DDECD857
    BakeTarget = "Desktop";
    CompilerSwitches = "--determinism --determinism-mod=0x1234 --user-debug --geo-passes=2";


Here are all currently available compiler switches:

General optimization control
-O0No optimizations
-O1Instruction optimizations enabled, no storage or global effect optimizations (similar to editor’s ‘Editor’ optimization level)
-O2All optimizations enabled, user debug not removed (similar to editor’s ‘Shipping’ optimization level)
-O3All optimizations enabled, user debug removed (default level when baking)
Fold constant samplers (default: ON)
Enable or disable user debug, for example constructs coming from the ‘debug’ nodegraph or script namespace, such as “debug.warning” or “debug.assert” (default: OFF)
Feature control
Enable or disable determinism for this effect (default: OFF)
--determinism-mod=<n>Seed modifier applied on the deterministic seed of each layer of the effect (default: 0)
Ex: --determinism-mod=0x1234
Enable/disable explicit effect visibility toggles from the SDK (default: Enabled) [v2.7.0]
When this is disabled, effect.isVisible() will always constant-fold to true
Enable/disable explicit effect time-scaling from the SDK (default: Enabled) [v2.7.0]
When this is disabled, effect.timeScale() will always constant-fold to 1.0, and effect.dt() will always equal scene.dt
Enable/disable effect teleport detection (default: Enabled) [v2.7.0]
When this is disabled, effect.isTeleporting() will always constant-fold to false
Resource optimizer pass
Enable/disable resource optimization (default: ON)
Dead resource elimination (default: ON)
Instruction optimizer pass
Load-store forwarding (default: ON)
Copy propagation (default: ON)
Constant folding (default: ON)
Constant folding, aggressive (default: ON)
Common sub-expression elimination (default: ON)
Instruction combining (default: ON)
Value-range propagation (default: ON) (new: v2.3)
Dead code elimination (default: ON)
Dead code elimination, aggressive (default: ON)
--ins-fcmpulps=<n>Number of ULPs below which two floating-point values are considered the same, when performing constant-folding fuzzy compares (default: 2) [v2.7.0]
This can be seen as an “epsilon” value, used test values against specific constants such as 0.0 or 1.0 to perform instruction simplifications.
Set to zero to disable.
Ex: --ins-fcmpulps=64
Storage optimizer pass
Load-store path merge (default: ON)
Constant folding (default: ON)
Constant storage detection (default: ON)
Constant storage removal (default: ON)
Value-range propagation (default: ON)
--sto-vrp-changes=<n>Maximum number of times a storage value-range limit can be modified before being bumped to max-range (default: 4)
Ex: --sto-vrp-changes=8
--sto-vrp-passes=<n>Maximum number of storage value-range propagation passes (default: 16)
Ex: --sto-vrp-passes=4
Redundant storage removal (default: ON)
Unused storage removal (default: ON)
Load-store path removal (default: ON)
Useless renderer removal (default: ON) [v2.7.0]
Removes all renderers whose Enabled pin has been constant-folded to false
Fixed-time optimization (default: ON)
Payload optimizer pass
Enable/disable payload optimization (default: ON)
Global effect optimizer pass
Disconnected layer removal (default: ON)
Useless layer removal (default: ON)
Value-range propagation on event payloads (in and out of layers) (default ON)
--geo-vrp-changes=<n>Maximum number of times an event value-range limit can be modified before being bumped to max-range (default: 4)
Ex: --geo-vrp-changes=8
--geo-vrp-passes=<n>Maximum number of event value-range propagation passes (default: 16)
Ex: --geo-vrp-passes=4
Number of global effect optimization passes (default: 4)
Ex: --geo-passes=2



Here is an example of a possible setup in the config file:

COvenBakeConfig_Particle $00001234
    BakeTarget = "Desktop";
    CompilerSwitches = "--geo-passes=6";
    BackendCompilers = {
COvenBakeConfig_ParticleCompiler $00000042
	Target = D3D11;
	BakeBytecodeCommandLine_Windows = "\"{FXC}\" -T cs_5_0 -E Root -WX -Ges -O3 -nologo -Fo \"$(TargetPath)\" \"$(InputPath)\"";
COvenBakeConfig_ParticleCompiler $00000043
	Target = D3D12;
	BakeBytecodeCommandLine_Windows = "\"{FXC}\" -T cs_5_1 -E Root -WX -Ges -O3 -nologo -all_resources_bound -Fo \"$(TargetPath)\" \"$(InputPath)\"";


This will also compile the GPU sim bytecodes for the D3D11 and D3D12 backends, and store them in the baked pkfx.
Without this step, the GPU sim will have to compile the bytecodes on the fly at load time, which is not always possible depending on the platform, and which you most likely do not want to do considering how slow it is to compile with fxc.

Was this article helpful to you? Yes No

How can we help?