0 like 0 dislike
Hey guys,

When setting a billboard renderer to AlphaBlend_Lighting, the particles will be lit by the backdrop GlobalLight, is there any way to take this lighting effect of the GlobalLight into Unity ?

by simonb3d (480 points)

1 Answer

1 like 0 dislike
Best answer
Hi simonb3d,

Lit particle materials are not yet supported in the plugin's marketplace version.
We are a bit stuck on this subject because we don't benefit from Unity's rendering pipeline.

However, we are working on a new "custom shaders" feature, allowing users to write their own shaders in hlsl/glsl.
These new custom shaders will have the capability to recover particle fields as streams, allowing users to create more complicated shaders.

You could imagine a scenario in which the global light's position would be recovered directly from the particle fields, and then used in the custom shaders.

Additionally, in the next version of the plugin, a "Global light" will be exposed in the plugin settings, and you will be able to tweak this global light by scripting (Position, color, ...).
This GlobalLight will then be used to light particles.

by HugoPKFX (17.5k points)
Great, thanks for the reply Hugo.
I'll be looking forward to the global light functionality you mention at the end of your answer.

Is there an update on this topic for version 2.9? I'd like to control the light position or color.
Hi, custom shaders are already available and there is a example scene in the plugin package. What we are working on right now is let Unity do the rendering directly (which means we shouldn't have to issue the draw calls ourselves), which -should- improve even the lighting features available in the Unity plugin.
I'm very excited about being able to use Unity Shaders in the future. For now, I'm just wondering if I can set the global light position that is part of the "3D Layers  (World)" properties. I am using the Popcorn material called AlphaBlend_Lighting, and want a way to set up the lighting in Unity.
After looking into it, you are right it doesn't seem to take in account the globallight at all, so the only real immediate solution here is to create a custom shader that would do the lighting, and set in C# the light position / color of this custom shader.

You can see more informations here: http://wiki.popcornfx.com/index.php/Custom_Shaders_(Unity_Plugin)