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

Is it possible to change a mesh's shape dynamically?

Note: We are on PopcornFX v1.12; unfortunately we aren't able to upgrade to PopcornFX v2.x.

Specifically, we're trying to make the laser VFX in this video:



1) The mesh starts off fat, then rapidly gets skinnier.

2) Meanwhile, the texture is scrolling

Is #1 possible?

And my understanding is #2 is difficult with PopcornFX v1.x, but any creative ideas to get a similar look would be appreciated!

Thank you!

by Lisk (250 points)

1 Answer

0 like 0 dislike


so, scaling the mesh should be pretty easy. If you select the mesh renderer you'll see a "ScaleField" property. This is empty by default, but you can type in the name of a float3 particle field storing a non-uniform scale for the mesh.

You can then add an evolve script that does something like this:

Scale = float3(1 - LifeRatio, 1, 1);

Here the scale along the 'x' axis will start at 1 and end at 0 when the particle is at the end of its life.

You can also plug a curve in there if you prefer:

Scale = float3(myCurve.sample(LifeRatio), 1, 1);

Regarding the UV scrolling thing, with v1 I don't see any reasonable solution really.

If your mesh looks like the video (mostly flat and stretched out?) you could probably get away with a ribbon instead, which will support scrolling through the "TextureUField" property

Otherwise, you can always use a custom material in the final game engine ? of course you won't get the proper preview in the popcorn editor itself. Which engine are you using?

by Julien (35.3k points)
Thanks for the reply. The ScaleField did the trick!

For the UV scrolling, thanks for the idea. Do you happen to have an example particle I could look at that uses TextureUField? I'm not quite sure how it would work.

I am using Unity. Thank you!