Jump to content

[SOLVED] No lights and scattering in separate render


photo

Recommended Posts

Posted

For some overlay functionality we use WidgetSpriteViewport. The idea is to use a different set of nodes in this render by setting the masks to different values. This works, excepts for the lights, the sun light (and the scattering that comes with it) seems to always apply to our second rendering, which is not what I want. I would like to render this viewport without scattering and without sun, but I can't seem to get that to work by separating the masks. Is this possible somehow using Unigine 2.1.1?

Posted

Hello Michiel
If I understand correctly: you want to get 2 separate render - one with environment light, and the second without environment light
In 2.1.1 release it is not possible by design.
In 2.2 release, it is impossible for "WidgetSpriteViewport", but you can disable environment light for "WidgetSpriteNode".
Tell us what you are doing - what nodes are using and what mode you need: real-time rendering, or you want to display a static image and etc. Based on the answer, we can perhaps offer some solutions
Sorry for the inconvenience caused.

Posted

We are using it for a top-down map that can be shown besides the main 3D rendering. It is not a true top-down view with full shading however, we use an actual chart of the environment as background and then add the dynamic objects from the scene to it as simply plain coloured meshes using the top-down render. Basically every object that should be shown here has an additional Object parented to it with the right viewport mask to show this special mesh. The chart however right now is influenced by effects like fog and time of day, which is not what we want.

Posted

Hi Michiel!

 

For now it's better to write custom material which will render mesh with solid color. Then just have a copy of original mesh (or maybe its surface) with that material & proper viewport mask applied to it.

 

We've already improved (after 2.2 release unfortunately) how our materials work with different render features so there'll be no splash screens if you disable or enabled any render feature. So this code might work properly:

// render main scene

engine.console.run("render_environment 0");
engine.console.flush();

// render nodes for minimap

engine.console.run("render_environment 1");
engine.console.flush();

However, you have to wait until next release so the only solution for now is to have a copy of original mesh (or surface) and apply custom material to it which won't use environment texture.

×
×
  • Create New...