Search Unity

  1. New Unity Live Help updates. Check them out here!

    Dismiss Notice

Multi-Monitor Shared Reflections

Discussion in 'General Graphics' started by TobyADev, Jan 7, 2019.

  1. TobyADev

    TobyADev

    Joined:
    Feb 26, 2016
    Posts:
    4
    Hi All,

    I am currently working on a project which involves three monitors set up like the diagram below.
    These monitors will be placed in a location which we have captured a HDR map of, which should supply lifelike (if static) reflections increasing the realism of the display.
    Monitors.png
    The issue I am running into is that each of the cameras tied to the separate monitors is receiving the full reflection map from a reflection probe, meaning there are clear repeats of the reflection when looking at sufficiently shiny objects creating obvious mistakes, particularly where the screens line up.
    I would like to have the reflections be calculated as through all 3 cameras/monitors were treated as one but cannot find a working solution to it.
    Reflections are created from a HDR map taken at the location the setup will be implemented.
    Below is an example, showing two cameras next to each-other in-front of a large shiny material, where the repeats will be obvious and glaring.
    upload_2019-1-7_16-56-45.png
    Hoping someone with better graphics skills than I can come save the day.
    Cheers.
     
  2. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    316
    I think that the issue here is that you have wrongly set up your cameras.
    Environment cubemaps will display as "background" for a camera, depending on it's FOV and rotation, not position.

    Currently, your camera setup is something like this:
    upload_2019-1-8_13-20-0.png

    Thus, it's "normal" that the environment cubemaps appears the same for all cameras. Keep in mind that it's like looking at an infinite giant sphere where you're in the center. moving a bit to the left or the right won't change what you see.

    The simplest way is to rotate the side cameras, to have a "faked" wider view, and properly map the environment background:
    upload_2019-1-8_13-23-15.png

    The other but sightly more tricky solution is to alter the side cameras projection matrix to have an ultra wide aspect:
    upload_2019-1-8_13-24-56.png

    This can be done by script with https://docs.unity3d.com/ScriptReference/Camera-projectionMatrix.html , or more easily by using the lens shift property of the physical camera : https://docs.unity3d.com/Manual/PhysicalCameras.html , setting a lens shift x=1 will shift the camera project to be exactly aligned on the right of the original (this will be the camera #3 in my image).

    Hope that helps.
     
    Last edited: Jan 14, 2019
  3. TobyADev

    TobyADev

    Joined:
    Feb 26, 2016
    Posts:
    4
    Thanks Remy, the projection matrix stuff did the trick for what I needed.
     
unityunity