WARNING : This site is outdated and the PopcornFX team will no longer answer your questions here.
For all support questions please go to our Discord server
0 like 0 dislike
Hello! I recently started to play with the PopcornFX and liked it a lot so far. But i'm not having a general feeling of the entire pipeline grasp to my UE4 project yet. So if you do not mind me asking, here are my questions.

Assuming that i'll have to work with the Niagara, how hard it would be for me to translate variables from the PopFX into the in-engine parameters so i could adjust them there?

How hard would it be to work for the scripting part, assuming that i'm more of an artist than the coder (i do know JS though)? I noticed that the script functions library is massive, and most likely i won't be able to hold the entire index in my head to get the right ideas on the fly. How it would be better for me to make a right, or even correctly working script without spending hours in the documentation for the every small step?

Pondering on some real examples. Not asking to be spoon fed, just for the general tips, or if it's even possible or not, but why then. Though the links to some decent and preferably short tutorials, or even the solution-ready script libraries (paid or not) would be greatly appreciated. How would you approach the work on the next examples:

1) There is a "SelectiveMovement" example. The effect is applied to an image (ChemistryCat) looking like a snow falling down, and the image is presented converted to the solid color. How hard would it be, or is it even possible to change the effect so it would allow the picture to have it's original color palette, while the particle colors would interpolate to it dynamically? Should it be possible to substitute the 2d image with the 3d mesh for the same effect? Like transferring the effect (or making similar) from the linear image colors base example - to the vertex colors.

2) A "TestNoise_Character" example. Should i be able to make a similar effect for another mesh, like the burning dried tree? Where the burn emitters would follow the, either: the tree's mesh vertices, or the bones in case if it's rigged. And with the effect of dissolving the burned path into nothingness (probably something like: interpolate Alpha 0-1, so the burned parts would turned completely translucent/masked).

Thanks in advance!
by Indiedude (160 points)

1 Answer

2 like 0 dislike
Best answer

Hi Indiedude,

I'm not sure about your question about Niagara, do you mean you want to export PopcornFX parameters to Niagara ? Or just work straight up with PopcornFX and just expose parameters inside UE4 ? For the latest, you just have to use Attributes, they'll then be usable inside Blueprints for example.

For the scripting part, if you're already familiar with script languages it shouldn't be hard to get used to PopcornFX. It's basically the same flow as with other scripting languages, I'd say it's even simplier than most of them. Define variables, use built-in functions, combine everything with some synthax and feed your particle data with all that. It's simple as "Position = MyVariable + (A * B);" for instance. As for the large function library, don't worry about knowing every one of them, you'll just need to find the ones you need for what you want to achieve ! Want to sample a position on a mesh ? Just look for Shape related functions to see which one gives you the positions (spoiler : it's the [YourShapeSamplerName].samplePosition() function).

Now, for your specific cases:

1) The "SelectiveMovement" example shows how you can sample a texture's density (values of black and white in each RGBA channels) to control velocity/acceleration. Of course, you can also sample directly the RGBA values as a float3/float4 variable and use that as your particle Color. For what you want to achieve: Calculate your UVs once (at spawn) and then use the [YourImageSamplerName].sample() function every frame (at evolve) to retrieve the colors for your particles.
As for your '3D mesh' question, I'm not sure of what you want exactly, but they are functions allowing you to sample vertex colors on a mesh if you want (the [YourShapeSamplerName].sampleColor() function).

2) Of course, from what I understand you need a classic "dissolve" effect, the tricky thing will be to match you dissolving mask value with the dissolving particles spawn. You don't actually "follow the vertices" or the bones for that, you just animate a mask texture value based on your UVs. So just like with the ChemistryCat, what you can do is actually sample your mask density to make your particles appear where you mask has it's threshold (the value which makes the separation on your mesh, between visible and invisible). By animating the mask inside your shader + animating your density parameter for your particles, both in sync, you'll be able to spawn and animate particles exactly where your mask is dissolving your mesh.

Let me know if everything I just said helps a bit, or seems just like complete nonsense to you ;)

by PierrePK (1.3k points)
Thank you for such a detailed and decent answer! It pretty much cleared the most part of my questions.