0 like 0 dislike

Attribute samplers can now be sampled at evolve.

And yet, even after placing my SamplerImage inside Attribute Samplers, checking AttributeSamplerAtEvole and even make sure PageLocalization is ON (in case of multiple instances which is not the case here)

.sampleDensity() still doesn't seem to take any image changes in account inside the UNITY plugin 2.9p7 ( 1.12.1) while working as intended inside the Editor (

Did I made a mistake ?

It's pretty easy to reproduce the case by customizing the cat ParticleFX named "SelectiveMovement2" and replicate the above procedure.

by Michaël (180 points)

1 Answer

0 like 0 dislike
Hi Michael,

The sampleDensity() function relies on a pretty heavy precomputation, that we only perform once at load-time. Image attribute samplers (no matter if they're at evolve or at spawn) will only lookup the initial (non-overridden) image density lookup table.

I noticed the documentation does not mention this, so I've just updated it.
There's a task to implement this in our backlog. If you drop us a mail at support at popcornfx dot com, we can notify you when it has made it into a build.

(On a side-note, attribute-samplers at evolve should work even without PageLocalization. Enabling PageLocalization will just help performance if you have multiple instances of the effect).
by Julien (32.8k points)
It makes sense.

Thank you for the feedback.

In my case I switch images in between scenes so any slow down wouldn't be noticeable if I could force the precomputation of that table lookup.

As a work around I just duplicate that effect with the required texture but lately I was tempted to use a procedurally generate one so I will follow this feature on your Roadmap.

Thanks again Julien !