• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How to Export particles from Popcorn FX?

Status
Not open for further replies.
Level 8
Joined
Jun 26, 2019
Messages
318
Hello all. Hmmmm. Anybody here know how to export particles "pkfx" files from Popcorn FX to Reforged WC3 World Editor? Blizzard exported particles from Popcorn FX to Reforged WC3. I would like to know how they do that. I tried this way and it doesn't work, but it doesn't fail either. It just not showing any effects when I replaced the file with same pathing to match. I am testing with priest's heal. The original healing effects are gone, but it still not showing any effect from Blast.pkfx either. It just empty, but not showing any white textures either. It doesn't fail the load either. Weird. Maybe I miss something? Any idea?

Model: Blast.pkfx
Texture: BlastPack_Extended.dds
Pathing: abilities\spells\human\heal\healtarget.pkfx

upload_2020-7-27_17-4-21.png


upload_2020-7-27_15-45-40.png
 
Last edited:
Level 12
Joined
Jan 30, 2020
Messages
875
Hello there !

First I am no expert, nor have I PopcornFX installed.

But first thing to do in this case is find out how the models themselves use these emitters.
Looking at the MDX format definition, here is the part concerning them :
Code:
struct CORNEMITTER
{
  uint32 emitterSize;          // including this int
  MDLGENOBJECT object;
  C4Color colorMultiplier;    // the color is multiplied with the overall color of the particles
  C4Color teamColor;         // default is (1,1,1,0) turned off, changes the color of some of the particles of some emitters (e.g: Wisp)
  char filePath[260];          // the path to the .pkb file
  char popcornFlags[260];  // comma separated flags (e.g: "Always=on" for emitters that are always on and aren't activated by animation tracks)
  KPPA alphaMultiplier;
  KPPC colorMultiplier;
  KPPE emissionRateMultiplier;
  KPPL lifespanMultiplier;
  KPPS speedMultiplier;
  KPPV visibility;               // on/off
};

Chances are high that these values are used by the emitter itself.
If you made a custom pkb file, it might simply not properly use the parameters defined in the model for the original effect.

Moreover, if out of curiosity one opens the healtarget.pkb file, that is compiled thus binary, one can still notice these identifiers at the end of the file :

Code:
CParticleEffectCParticleAttributeListCParticleAttributeDeclarationGame.Global.SpawningCLayerGraphCompileCache!CLayerGraphCompileCache_EntrySlotRoot!CLayerGraphCompileCache_EventSlotSignalChildOnDeath!CLayerGraphCompileCache_LayerSlotCLayerCompileCacheCLayerCompileCacheFieldself.lifeRatioself.invLifeEffectIDSelfID   _DRandCtxPrevAge
EventAccumCLayerCompileCacheSamplerEventStream$CParticleNodeSamplerData_EventStreamCLayerCompileCacheEventCCompilerBlobCacheCCompilerBlobCacheExternalfloatint2CCompilerBlobCacheEntryPointscene.dtParticleContextSpCtxSParticleContextIpCtxIRandContextRandCtx
particleEventsamplerEventStreamCCCompilerBlobCacheFunctionDefgenerateCCompilerBlobCacheFunctionArgdurationinitPayloadintint3kickeffect.isRunning
effect.ageinternal_vr66_int2CLayerCompileCacheAttrib   n16__Axisn16__NormalAxisn16__SortValuesinternal_sr286_float
n16__Position   n16__Size
n16__Rotation
n16__Color__sampler_0CParticleNodeSamplerData_Curve__sampler_2CLayerCompileCacheEventPayloadEmittedCount
SpawnCountCLayerCompileCacheRenderer>Popcorn/Library/PopcornFXCore/Materials/Default_Billboard.pkma'CLayerCompileCacheRendererParticleInputColor"CLayerCompileCacheRendererPropertyGeometryBillboardTransparentDiffuseLit
SoftParticlesFlipUVs
AlphaRemapAtlas
NormalWrap   LegacyLitBillboardingModeTransparent.TypeTransparent.SortModeDiffuse.DiffuseMap._HD.w3mod/Textures/FX/Flare/FlareSimple_BW.tifSoftParticles.SoftnessDistancefloat3randsamplerCurve4CsamplerCurve1Cfloat4xform_maskedsample
n33__Rotation   n33__Axisinternal_sr238_float4internal_sr274_floatinternal_sr290_float3internal_sr246_floatinternal_vr223_float3internal_sr421_float3internal_sr290_float3_DCTZ1
n33__Position   n33__Size
n33__ColorCParticleNodeSamplerData_ShapeShape__sampler_1ColorControl__sampler_4*CURVE*(_HD.w3mod/Textures/FX/Flare/Flare_BW.tifsamplerShape_3CsamplePositionradians.rotaten22_8__Sizen22_8__Rotationn22_8__NormalAxisinternal_sr172_float3internal_vr83_float3internal_sr102_floatn22_8__Positionn22_8__Axisn22_8__ColorsamplerShape_2Crgb2hsvhsv2rgb

What this seems to indicate is that the pkb file is a script that creates the special effect according to some specific parameters thats the game (in our case Reforged) will be able to handle, and moreover that the game will probably be expecting in order to work properly.

As we have to current way of knowing how Blizzard actually "backes" these emitters, my only advice is to not try to make your custom pkfx emitters in PopcornFX as they have very little chance of working.


On the other hand, you could try to edit the parameters that are recognizable, like the textures used buy the emitter.

At first look, I can already identify 2
- "_HD.w3mod/Textures/FX/Flare/FlareSimple" (Diffuse Map)
- "_HD.w3mod/Textures/FX/Flare/Flare" (Curve)

But unfortunately, it would take a lot of experimenting (maybe create simple pkb files and see how the compiled version content translates into), trial and error, before being able to modify more. Also we don't know what parameters from these emitters the game actually accepts or uses.


Just out of curiosity, could you post as attachments both the Blast.pkfx file you made with the program, as well as the source script for this effect ?
 
Last edited:
Status
Not open for further replies.
Top