Jump to content

Lighting GUI Widget Label


photo

Recommended Posts

Hi

 

Is it possible to use dynamic lighting for GUI components such as Widget Label?

 

More specific, I need write text on objects. The problem with Widget Label is when I disable all light sources, I still can see the text on labels.

 

Any idea?

Link to comment

there is no dynamic lighting for GUI objects. For achieving your effect you could use a script function called each frame for monitoring the current state of all your light objects and - based on the result - enable/disable or even fade in/out via blending all your WidgetLabel objects used for object text

  • Like 1
Link to comment

I found that the Decal_Base material can do this, but the Demo scenes use an Inherited material that does not - so answer is yes, decal_base works

  • Like 1
Link to comment

2D GUI elements are designed to be always visible; they are rendered the last, after all light passes. If you do not wish to see them in the dark, you need to disable them manually.

 

Decals are affected both by the environment lighting and ambient color. In the decals demo they are not affected by the ambient color, because they are rendered as Materials->States->Ambient->Transparent (in this case only the material color is used). When Ambient pass is set to Opacity, it works fine.

  • Like 1
Link to comment
×
×
  • Create New...