Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Discussion Real mirror achieved by camera manipulation?

Discussion in 'General Discussion' started by E1V26, Aug 27, 2022.

  1. E1V26

    E1V26

    Joined:
    Jun 21, 2021
    Posts:
    2
    I was wondering have anyone tried using mirrored camera to make a real mirror.
    I've seen a few uses static camera and render texture to "try" to make a mirror but those aren't real mirrors.
    Also, is it worth it to do it this way? or reflection probe is just better?
     
  2. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,083
    They're as real as any mirror in a game that doesn't use expensive raytracing.

    Reflection probes generally make the most sense if you're dealing with multiple reflective surfaces and still use fundamentally similar processes to the render texture idea.
     
  3. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,553
    https://forum.unity.com/threads/planar-reflection-mirror-legacy-renderer-vr-compatible.1170721/
    https://forum.unity.com/threads/vr-mirror-test-project.1219659/


    -----
    Proper mirror requires you to render your scene twice.
    And if you're doing it in VR, then you'll be rendering it three times.

    If you're not in VR but in flatscreen game, you can achieve mirror effect using camera stacking and matrix overrides.
    If you're in VR, you can no longer do that, because some of the required functionality is broken.
     
  4. E1V26

    E1V26

    Joined:
    Jun 21, 2021
    Posts:
    2
    What I meant was those mirror won't look right on other angles except direct front.
    And I think by manipulating the mirrored camera you can make a REAL working mirror.


    Let me put it this way:
    a single mirrored camera onto a render texture on a quad VS a same size reflection probe surface
    which will run better?
     
  5. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,553
    If you're talking about cubemap reflection probe, t hen it will perform and look worse than a mirrored quad on a flat surface.

    If you're talking about HDRP planar reflection probe, it should largely be the same, but in VR it might not be aligned perfectly if you try to poke finger into the mirror (which is why I bothered with the project above).

    Unless you're running a raytraced environment, mirrors are expensive, regardless of what you do.