jaaaaa Posted July 1, 2020 Share Posted July 1, 2020 Hi All, While using fog volumes to create foggy areas in our application, we noticed that shadows inside of the foggy area appear very strong. The environment presets can be used to counter this effect, however they are applied scene wide. For our application a scene is possible where we have one camera inside of the fog and another camera outside in clear weather simultaneously (so just changing the preset depending on whether the camera is inside of the fog is not possible). Is it possible to have strong shadows and clear weather outside of the fog volume but less strong shadows inside of the fog? Here you can see the mentioned hard shadows with environment preset0 (Pic1) and the solution with environment preset 1 (Pic2): Pic1Pic2 Without fog it we have preset0 (Pic3) and preset1(Pic4): Pic3Pic4 So we basically want something like Pic2 inside of the fog but something like Pic3 outside of it. Of course we are open to other solutions not using Environment presets. Any ideas are welcome. Thanks a lot in advance. Link to comment
werner.poetzelberger Posted July 1, 2020 Share Posted July 1, 2020 (edited) You could affect shadow parameters in relation to the position of the camera i guess. Or maybe switch between 2 worldlights? The cloud layer does affect the sun's behavior. Maybe via that something is possible as well? best. Edited July 1, 2020 by werner.poetzelberger 1 Link to comment
jaaaaa Posted July 2, 2020 Author Share Posted July 2, 2020 Thanks for the suggestions. I just played around in the Editor and using different viewport masks with different cameras seems to be the way to go. So for people running into the same issue: Every camera gets its own viewport and the scene objects are rendered in every viewport. Then you can create a new sun for every camera and only render it to the cameras specific viewport (using viewport masks). If the camera is inside of fog, the sun intensity can be reduced for this specific camera. This would even allow for smooth transitions if you move inside or out of the fog. We haven't implemented it yet but this seems like the way to go. Kind regards. 1 Link to comment
werner.poetzelberger Posted July 2, 2020 Share Posted July 2, 2020 Well done! The cool thing with Unigine is, that there is a lot possible. Always stay creative in thinking ;) (and try a lot) best. Link to comment
Recommended Posts