0 like 0 dislike
Hi PopcornFx team,

I've made a Fx with a sampler mesh attribute, and i want to fill this attribute with a generated mesh from DephtKit in Unity.
I'm using the sample code (mesh) in my script that i found here http://wiki.popcornfx.com/index.php/Effect_Attribute_Samplers_Animation

Mesh generated with DepthKit isn't static or skinned but vertex are animated, so i'm asking if you think it's possible to sample this sort of mesh into the Fx Attribute ?

1 Answer

0 like 0 dislike
Best answer


The only way would be to create an Unity mesh and fill it's vertices with those you get from DepthKit (like here : https://docs.unity3d.com/ScriptReference/Mesh.html) and call the function SetSampler() with this new mesh each frame.

But if it's an big mesh, it will really impact your performances.

Hope this helps

by Valentin (7.1k points)