Jump to content

[SOLVED] Alpha Blend materials goes black with "light projected"


photo

Recommended Posts

Dear members of Unigine.

I am facing an issue where a material using alpha blend goes black under "light projected" lights. 

image.png


I've noticed there is a similar topic for this issue ( https: //developer.unigine.com/forum/topic/7826-alpha-blend-issues-with-lighting/#comment-38857 ) but we do not need reflections for this type of material.

This does not occurs under the default "sun" light (which I believe is a LightWorld type).

image.png.32f376608f561cc2443c126ffdcdb910.png

We are using default material states / parameters

image.thumb.png.8cae4723ffcb2c86d05697a18eae02b7.png

 

We tried using "Alpha Test" , this partially solves the issue. However, the material becomes sharp and looses the nice blending.

Right: Alpha Blend.  Left: Alpha Test

image.thumb.png.f65b28eb6d59a2fec8cb98d8da53a98f.png

 

I am not sure if is a material issue, a light issue, or a combination of both. Here are my light settings

image.thumb.png.a001fcafca62ebbb174b1029d60102b5.png


Do you know how can we get the alpha blend material to work under the light project?
 

 

Edited by MarioBag
Link to comment

Hello!

@MarioBag at the moment it's quite hard to tell what actually happening since there shouldn't be any problem with using such objects together.

Is there any error message at the console window? Could you attach "log.txt" file which is located at /bin folder of your project?

May I ask you to package subject material using embedded tool straight from the asset browser window by clicking right mouse button on asset and selecting "Export As Package" from drop down menu and then send it to us?

Thanks!

Link to comment

Hi bmyagkov  , thanks for your reply.

I think I know what triggers the issue:  Having more than 5 "light projected" active lights in the scene causes the alpha blend material to go black (regardless if they are dynamic or static).

Do you know a way to solve this or a possible workaround ? We need to cover a large area with dynamic lights and  alpha blend mode provides the best looking results. 

 

Link to comment

Hello @MarioBag

Since you are using meshes instead of decals there is known "Forward Per-Object Limits" for transparent objects rendering. You can increase this value (which is 4 by default) in the Editor settings on Render -> Lights tab, but keep in mind this will have great impact on performance for sure.

Speaking of "large area with dynamic lights and alpha blend mode" and performance I strongly recommend you to use "Mesh Decal" object instead of meshes which is basically will be look same way but does not have any transparent restrictions.

Thanks!

settings.png

 

Link to comment
  • 2 weeks later...

Hi bmyagkov ,   

I can confirm your suggestion works.  We converted the relevant mesh object into mesh decals and we don't see the flashing issue anymore. 

Thanks for your time and support.


 

  • Thanks 1
Link to comment
  • silent changed the title to [SOLVED] Alpha Blend materials goes black with "light projected"
×
×
  • Create New...