0 like 0 dislike
371 views
Hey Everyone;

   I've been slowly getting into the PopcornFX environment and one of the things that I do to try out certain things and just see how they run is to put them on the devices I am working on. Going through most of the PopcornFX particle effects that come with the editor I've come across one that really has me puzzled. The Plexus effect (spatial queries 7th example ), runs fine in both PopcornFX and Unity editors. However, deploying to Android device all the colors are not being applied. The particle nodes are white and the lines fade out in white only. The colors applied in the Popcorn editor are not applying. I've made sure I bake completely, run the Unity->PopcornFX index for deploying, etc, etc.

 

I am wondering if anyone has run into this? Or have any suggestions on the proper place to debug this. I did check the baked out format and the colors from the sampler are there correctly :)

 

Thanks,

   -Anthony
asked by AMerrill (290 points)

1 Answer

1 like 0 dislike
 
Best answer
Hello Anthony,

This is a difference between the way the colors are handled in the PopcornFx runtime between DirectX (for PC) and OpenGL ES (for Android). The colors saturate way more easily on Android as it uses unsigned bytes to store the colors on the GPU vs floats with DirectX.

So what you can do to avoid that is to change the Sampler Curve "ColorLookup" in the effect to avoid values over 1.0 for the colors, although it might be a little bit tricky to reproduce the exact effect without having a proper visualization in the editor.

Hope this helps
answered by Paul (7.9k points)
As I am bringing the values clamped to 1.0f I am starting to see the coloring in Android. As you stated, very hard to reproduce the effects color that was in the editor.

My initial thought would be to return the max height of the curve and divide the coloring by that to essentially clamp it there ( or use the remap function ). However, the documentation says that only Shape samplers have the height function available to it. Is there an easy way to get the max height of a sample curve without manually finding it?

If there is no way to find that and maybe even it's lowest value, that might be a suggestion to the developers. There must be an easier way to see the differences that you'll find from the different rendering systems?

Once again though I appreciate the help Paul :-)

Thanks,
   -Anthony
Hey,

There is no script function that would allow you to get the highest and lowest values of a curve. This could be indeed interesting to add in the future versions.

Concerning the rendering on the editor that would match the differences between the platform integrations, this will be a feature for the editor v2.0.

I think the easiest way of moditying the plexus to get the colors that you want would be to completly replace the sampler curve "ColorLookup" by a curve that you more or less match the shape of the one currently existing but with the colors in the [0, 1] range.

If your colors do not go over 1, you should then have the same rendering in the editor and in the Android version.

Here is an example of a curve that works in both for this effect:

http://i.imgur.com/MTkXZcx.png
Thank you for the image link Paul, I eagerly await v2.0 now which from Trello Board looks between July 2016 - March 2017.

Marked as answered!
...