Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

[RELEASED] Mirror Effect (works both for non-pro and pro users)

Discussion in 'Assets and Asset Store' started by Gargore, Sep 23, 2014.

  1. Gargore

    Gargore

    Joined:
    Jun 21, 2013
    Posts:
    83
    It now available in the asset store here: https://www.assetstore.unity3d.com/en/#!/content/21780

    We do not use render to texture or blits so effect is fast and smooth both for non-pro and pro users.

    Fully transparent, translucent or scratched surfaces can be used :).

    Hope you like it!
     
  2. Wavinator

    Wavinator

    Joined:
    Dec 24, 2013
    Posts:
    79
    Wow, that's very nicely done. Is there a way to limit the range of what's reflected or to specify entities that don't get included in reflection? Also, is this meant to be for static geometry or could you have something like a character with a mirrored faceplate or stealth effect?
     
  3. Gargore

    Gargore

    Joined:
    Jun 21, 2013
    Posts:
    83
    The script includes two fields for specifying the layers that you want to render in the reflection and in the normal worlds. We made even a demo with two reflections (over water and underwater).

    About the other question, I don't understand:
    - do you mean what can be rendered in the mirror? answer: anything you want (some shaders can be problematic but we already provide some alternatives).
    - what can be the mirror? answer: you can use any mesh or any shape for the cutout but the mirrored image althought some effects can be applied must be a plane-reflected image but the idea of more effects seems interesting: maybe we can investigate further in this direction.
     
  4. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    Sounds magical. How does it work? What are limitations?
     
  5. Play_Edu

    Play_Edu

    Joined:
    Jun 10, 2012
    Posts:
    722
    nice assets but can it's work with sphere (Not just plane)
     
  6. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,114
    Does it allow for transparency on the plane while rendering the specified layers onto the plane.
    For example could a transparent water shader be used on the plane the showing the background behind.
    Also if a plane was used full screen is it rendered at full screen resolution or like render to texture do we have to assign a resolution to the plane.
     
  7. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    12,838
    So cool, great for non Pro users :)

    Any idea if this will work with Dynamic Water system ripples ?
     
  8. Gargore

    Gargore

    Joined:
    Jun 21, 2013
    Posts:
    83
    @imtrobin It uses a similar approach to the OpenGL stencil reflections. There are some limitations of course, for example: some shaders can be problematic depending on how they interact with the depth buffer and must be replaced with depth friendlier ones. We already provide some alternates, and we are testing and listening feedback from users.
    @Play_Edu Some effects can be achieved by deforming some projection parameters but currently something like an spherical reflection... I don't know for sure, but maybe it could be possible with some vertex shaders.
    @John G. You can apply a transparent, translucent or cutout textures to the mirror plane. About the reflection itself no resolutions are assigned to the plane as long as reflection image is not a texture.
    @nasos_333 Probably with vertex shaders... We still have to investigate further possibilities.
     
  9. Gargore

    Gargore

    Joined:
    Jun 21, 2013
    Posts:
    83
    We are questioning ourselves which of the following features are the user's favorite...
    1) Support for Water Ripples.
    2) Support for Multireflection planes.
    3) Support for more shaders.
    4) Ease of use (make the mirror deployer smarter so more special cases are automatic managed).

    Please, tell us, so we can focus the development in that areas :)
     
  10. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    I want multireflection planes.
     
  11. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    12,838
    I will go for the ripples, but i dont know what the multireflection planes are :)
     
  12. psychicvrlab

    psychicvrlab

    Joined:
    Oct 29, 2014
    Posts:
    14
    Hi Gargore,
    After I emailed you directly, I found this forum topic. I think it's better to discuss here.

    Thank you for the great asset, by the way. I love it.

    It would be nice if we can see the reflection result even in edit mode.
    In order to do that, you can just add [ExecuteInEditMode()] just before class code like bellow.

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. [ExecuteInEditMode()]
    4. public class MirrorControl: MonoBehaviour {
    5.     public enum ReflectionAxis {
    6.         back,
    7.         forward,
     
  13. psychicvrlab

    psychicvrlab

    Joined:
    Oct 29, 2014
    Posts:
    14
    I was wrong.
    You also need to manage "Automatically created Reflection Camera" in Hierarchy view if you add [ExecuteInEditMode()] to the code.

     
  14. Gargore

    Gargore

    Joined:
    Jun 21, 2013
    Posts:
    83
    @from2001 It is a good idea, but for running it in edit mode there is lot of management to be performed to avoid duplications, memory leaks and unwanted scene modifications. I'll check it.

     
  15. www_3dart_es

    www_3dart_es

    Joined:
    May 24, 2013
    Posts:
    219
    Hello, I am interested on it. Can you provide an APK to test the performance on Android?

    About features, by example, It can be used on a table with the wood texture + reflections on it?. can you adjust the strenght of the reflections too?.

    With regards to your list, I am interested on multireflection planes.

    Regards.
     
  16. Gargore

    Gargore

    Joined:
    Jun 21, 2013
    Posts:
    83
    Yes: you can adjust the ammount of reflection by using the alpha channel of any RGBA texture, for example a wooden one. You can also make puddles.

    About the APK, could you contact us by email at uas@gargore.com?

    Regards.