Jump to content

[SOLVED] Material editor problem.


photo

Recommended Posts

Hello.

 

Lets say i have open the material window.

I notice that when i change the hour of the day from environment, the material's color is changed too.

I want to create my personal editor where the material color (in editor) is constant and when i aply it to any object in the world, it changes color normally according to environment's illumination.

 

I am using WidgetSpriteMaterial. So my question is if i can disable the light features of this material when shown in material editor.

 

Thank you for your time.

Link to comment

The material drawn in the sprite viewport window is lit in the ambient pass just like in-world surfaces.

However, there's a trick you can use. GUI with all widgets is drawn at the very end of a rendering frame. For that"

  1. Disable environment lighting (set Ambient Environment scale to 0) for the material in flush() so that the widget in material is rendered only with ambient color.
  2. Reenable it again in update() so that surfaces in the world are rendered properly.

Link to comment
×
×
  • Create New...