- Joined
- Jun 30, 2021
- Messages
- 28
I should note that this is not a complete guide, but something of a starting point for creating custom PopcornFX particle effects. Purpose of this article is to show that this is possible. I still have many misunderstandings and questions, but I hope that there will be people in our community who can continue and complete this research
Unfortunately, we do not have any documentation or plugins for baking particles in Warcraft, so we have to check this experimentally.
One of the main questions is how to link particles with values from the game's graphics engine. For example, in pkb files you can find strings like:
Apparently, there are some special nodes for integrating popcorn into the game engine, it is unclear whether it is possible to reproduce them at our level.
Another one trouble is that without some optimization, quickly baked effects cause FPS drops (quality of particles must be reduced for use in game engine, as is done with models and textures). In addition I guess that it is necessary to take into account features of Reforged shader in order to obtain expected results.
Here are couple of simple examples, as well longer video of pkb importing process.

One of the main questions is how to link particles with values from the game's graphics engine. For example, in pkb files you can find strings like:
Code:
Game.SpeedMultiplier
War3
Game.ColorMultiplier
Game.TeamColor
Game.TargetPosition
Game.EmissionRateMultiplier
Game.LifespanMultiplier
Game.Scale
Another one trouble is that without some optimization, quickly baked effects cause FPS drops (quality of particles must be reduced for use in game engine, as is done with models and textures). In addition I guess that it is necessary to take into account features of Reforged shader in order to obtain expected results.
Here are couple of simple examples, as well longer video of pkb importing process.
Here I replaced the standard Impale effect with a custom Blast effect.
*This is an old clip, I did some unnecessary things there and didn't set up the axis system.
I'll try to explain what's going on here.- We know that Warcraft uses the popcornFX build 2.5.1.63447. That is, we need to bake particles intended for this version. We can download PopcornFX Editor here. It is free for personal, non-commercial use. Unfortunately, this particular build is not available for download, so I tried the two closest to it. We can download any of them and install on PC.
-
Next we need to create a project. Since I have no experience in creating VFX, I used samples available for download in the PK-Editor. They can be imported in one click into your project on the "Online Packages" tab.
- We need to set the baking settings in the project settings. Here is official documentation on how to do this. My example here on pic.
For some reason, the build version cannot be specified here. I mean in this menu it is possible to use Load option to set a custom .pkcf config file, where you can explicitly specify build version, but this will not work for quick baking, and the version of the output files will be the same as the version of PK Editor. - It is also necessary to set up the axis system. By default, project has YUp Right Hand enabled, for export to Warcraft it is necessary to set ZUp Right Hand. This can be set in the Scene section.
- We need to set the baking settings in the project settings. Here is official documentation on how to do this. My example here on pic.
-
Importing files into custom map. Here I will try to describe in more detail.
-
.PKFX. After baking we get a particle in binary format that Reforged can read. Particle was most likely baked in a different version than the Warcraft PopcornFX version, and if we open ile in hexadecimal format we can see that version does not match version specified in Blizzard's pkb files. This is shown in pic below.
BUT in this case you can do nothing about it, that is, even despite the slight difference in the build version, file will still be read, apparently there is some compatibility between builds. Optionally, you can replace the bytes responsible for the version.
Also, it is not necessary to change the extension from pkfx to pkb, game can read both. Optionally, you can also do this. This can be done in Windows Explorer, for example.
After baking particle can be used in the game. We can replace any default pkb by importing a custom file with the right path, or use it separately. To do this, I highly recommend using TRMS, which has GUI for editing PopcornFX nodes.
-
Textures. PK-Editor supports different image formats, but I think .dds is the best one to use for Reforged. Diffuse textures must be saved with BC3 compression. I'm not sure about other texture maps. Remember to use the correct path. That is, if the .pkfx file contains a path like "Textures/FX/Diffuse.dds", then we must import it into the map with same path.
-
.PKAT. This file format can also be read by Warcraft. Something like UV mapping stored in external file. Wiki. This is simple text file that does not require any changes and can be directly imported into Reforged.
-
.PKMA. These files cause me the most confusion. These are so-called Feature Sets. These are text files, similar to pkfx, and they also contain build version. I'm not sure if they need to be imported into the map. In general, the most of Blizzard particles have links to these files, and it in following format: “Popcorn/Library/PopcornFXCore/Materials/FILENAME.pkma”. In my custom effects baked in popcorn, these links are in the format "Library/PopcornFXCore/Materials/FILENAME.pkma". Yes, we can change this path in Editor project, but is it necessary? I hope that someone will look into this issue in more detail. According to my experiments, presence or absence of these files in map did not affect anything, the “wrong” path also did not prevent effects from working.
-
Sounds. mp3, flac, wav, etc. I couldn't get the particle sounds to work, maybe PopcornFX sound system is disabled in Warcraft.
-
Meshes. As you guys know Warcraft only supports mdx and mdl. Therefore, standard formats like .fbx or .obj must be converted to Warcraft formats. Haven't tested this much. By the way ball lightning reacted quite well to Riffleman mesh (you can see it in the video above).
-
-
It seems that PopcornFX particles cannot be used on their own and must be referenced in Warcraft MDX models.As it turns out, PopcornFX particles can be used directly in game as models. For example, you can explicitly specify pathtofile.pkb in the Art - Model File field of Object Editor for units or other object types. You can also create special effect instance by specifying path to pkb. For example, codeLua:AddSpecialEffect("sharedfx\\hero_glow\\hero_glow.pkb", 0, 0)
However, Blizzard preferred to link pkb to models using special nodes. As I said before, you can replace default pkb file or use TRMS to create your own links.
Test map is available for download. Good luck have fun!
Attachments
Last edited: