Jump to content

Rendering shadows from a different perspective on multiple viewports


photo

Recommended Posts

Posted

Greetings,

We have a Unigine window (version 2.18.0.1) that renders on multiple viewports simultanously and we just noticed that the shadows on a view are rendered from a different perspective (the one corresponding to the other viewport). In some cases, this glitch happens randomly.

image.png.a20045017a36e97abffbfc93bc0a2de9.pngimage.png.bc11e6f2b89a9ef2cc29516ad2837ace.png

The two screenshots above : (On the left) the shadows rendered according to the subview corresponding to a camera looking at the same direction as the main view. (On the right) the shadows rendered according to the subview corresponding to a camera looking at the opposite direction to the main view, thus, the shadows are not rendered.

Could this be a synchronisation issue that happens in the rendering pipeline of both views ? If not, what could be causing a viewport to have the shadows of another viewport ?

Thanks in advance.

Posted

Hi Karim,

Unfortunately, it's not possible to say with 100% confidence what can cause such behavior. It can be either some issues with cameras update order (or combination of cameras / train movement in general). Sometimes such issues can be caused by incorrect bounds calculations.

To be 100% sure a reproduction scene is required. No real content from actual sim is needed, if it can be reproduced even with gray cubes - it would be even better. Maybe it worth trying first to strip content from the actual scene to understand if maybe a specific object causing this behavior at the first place. If there is no changes in behavior, more likely this visual artifacts are caused by the logic itself.

Could you please send us a minimal repro so we can try to debug it on our side and find the root cause?

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Posted

Hi @silent,

Ok, we will make a minimal test and try to reproduce this bug and send it to you if we manage to reproduce it.

Thanks.

  • Like 1
Posted

Hi,

Unfortunately, I couldn't manage to reproduce the issue. Here is the minimal sample that I made anyway :

subview_shadows.zip

This means that the issue is in our implementation. Do you have any hints on what could be causing this ?

Posted

Karim, thank you for the test scene!

However, If there is no reproduction in the sample, I guess we still doesn't know what is the real cause in your actual project. Issue may be related to the update order of the cameras and train movement.

In your sample there is no camera update via code (only by player input), so maybe that's also crucial here. Try to narrow down the exact place where you have the transformation / bounds changes of the nodes / cameras and maybe that will give you a hint. In a sample update() is basically empty, only cameras are being updated, which I guess is not enough.

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Posted

It is also worth checking whether disabling optimizations for shadow reuse across viewports will change anything. You can disable this optimization by entering the following console command: render_shadows_reuse 0 (already disabled in the sample).

How to submit a good bug report
---
FTP server for test scenes and user uploads:

×
×
  • Create New...