Search Unity

Mirror and light reflections

Discussion in 'General Graphics' started by simtocaredeveloper, Nov 18, 2019.

  1. simtocaredeveloper

    simtocaredeveloper

    Joined:
    Oct 30, 2018
    Posts:
    6
    Hello all,

    For my simulation game i need to add light reflection coming from a mirror. So light sources that are being casted on the mirror surface that is being reflected on other surfaces. To solve this I clone existing lights in the scene and position those correctly based on the the mirror position.

    This works fine with spot lights, for example a flashlight that shines on the mirror can be casted in a wall. But it also needs to work for sunlight (directional light).

    For directional light this does not work since it does not have a start position and it will shine though everything.

    - I tried getting the same directional light effect with a spot, but that is not possible.
    - I tried playing around with the directional light settings but no luck.
    - I tried looking for spots that work like beams instead of cones, no luck.

    It sounds to me like a limitation of unity, why is it not possible to tune or cull the directional light?
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    It is not possible to do what you're looking to do with the built in systems, no. You want a box or frustum light, neither of which Unity supports "out of the box". If you're using the deferred rendering path you could add your own light types, but you'd also have to handle shadow map generation manually as well if you need the bounced lights to have shadows.
     
    simtocaredeveloper likes this.
  3. acirillo

    acirillo

    Joined:
    Feb 21, 2020
    Posts:
    1
    I'd like to know if Unity has addressed this in the past 2 years.
     
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    Nope. It's an uncommon thing to need.