Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Nominations have been announced for this years Unity Awards. Celebrate the wonderful projects made by your peers this year and get voting! Vote here!
    Dismiss Notice
  5. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

[RELEASED] PIDI - 2D Reflections.The ultimate solution for your 2D water, mirror & reflection needs!

Discussion in 'Assets and Asset Store' started by IrrSoft, Feb 28, 2018.

  1. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
    This post is to inform you that, due to the holiday season, we will be taking a short break ( to come back on January 7) and to wish you all a very happy holiday's season and an amazing 2019!

    Irreverent Software
    ___________________________________________________________________________
    ORIGINAL POST

    VERSION 1.3 NOW AVAILABLE! IT COMES WITH :

    • SUPPORT FOR PARALLAX SCROLLING CAMERA SETUPS (SEPARATE FOREGROUND AND BACKGROUND CAMERAS)
    • UNITY 2018.1 LIGHTWEIGHT SRP SUPPORT
    • SIMPLE 2D WATER SHADER
    • NEW REFLECTION EFFECTS LIKE FADING AND MASKING
    • LIGHTWEIGHT SRP SHADERS ARE FULLY EDITABLE WITH AMPLIFY SHADER EDITOR (RECOMMENDED TO DEVELOP CUSTOM SHADERS FOR THIS PLUGIN)
    • IMPROVED UI DESIGNS
    • HIGHLY IMPROVED PERFORMANCE
    • MULTIPLE REFLECTIONS PER MATERIAL
    • IMPROVED DOCUMENTATION

    PIDI - 2D Reflections is a tool that allows you to quickly and cheaply add real-time reflections to your 2D games. Add reflections to floors, mirrors, dynamic water and much more in less than 2 minutes!










    Features :
    • Shader based reflections that work out of the box, just drag and drop!
    • Advanced reflections that can cull specific layers, be downscaled, have transparent backgrounds and much more!
    • Support for local reflections (reflections that follow a specific character)
    • Reflections can be assigned to sprites to make them take any shape you need.
    • Vertical reflections are also supported for 2D mirrors, waterfalls, walls etc.
    • Extensively tested on mobile devices, with full support for DirectX and OpenGL pipelines.
    • Fully documented with tutorials and examples

    This asset has been developed with mobile devices in mind but has been thoroughly tested in all platforms and all Unity versions from 5.4 to 2018.1

    Additional shaders, effects and features will be added in future updates but you can get this asset right now for just 15 USD on the asset store.
     
    Last edited: Dec 17, 2018 at 5:20 PM
  2. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
    As some people interested in this tool has been asking about it, we feel it is important to be clearer here :
    This asset is fully compatible with DirectX, OpenGL and mobile devices :)

    Most of our tests and many demos were thoroughly tested on a very old Android phone I own, so it is both compatible and well optimized for these platforms with just 1 drawcall in most situations :)
     
  3. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
    A micro update has just been sent to the asset store, making this tool compatible with perspective cameras and not only with ortographic ones. This means that games making use of extensive Parallax effects for their backgrounds and perspective cameras can now take full advantage of our 2D reflections with the same easy workflow and in just minutes :)

    We hope you'll like it!
     
  4. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
    The update is live!
    The asset now supports both orthographic and perspective cameras to suit all your 2D needs!
    We hope you'll like it! :)
     
  5. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
    New update coming soon!
    As a new feature, we are adding a new "water bodies" shader that mixes both reflections and simple refraction :)
     
    NeatWolf likes this.
  6. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
    Small update to 1.05 sent to the store before the new water shader is ready! :

    • Better support for perspective cameras
    • New shader variants that can control the opacity of the reflections
    • New faded reflections shaders
    • Bug Fix : Bug fix for Unity 2017 and above where some reflection shaders displayed an inverted result in the game view
    Again, water shaders will be ready for the next update!
     
  7. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
    Update 1.05 has just been approved! It includes the following :
    • Better support for perspective cameras
    • New shader variants that can control the opacity of the reflections
    • New faded reflections shaders
    • Bug Fix : Bug fix for Unity 2017 and above where some reflection shaders displayed an inverted result in the game view
    You can see the new opacity and fade features in action right here!

     
  8. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
    Upcoming update for May will include :
    • New reflection based effects
    • New water - like shaders
    • Improved compatibility with non-sprite objects and non-sprite 2D games
    • Initial support for Lightweight SRP (for Unity 2018). BETA
     
    Last edited: Apr 26, 2018
  9. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
    This is a small tease of PIDI - 2D reflections v 1.1 running on Unity 2018.1, Lightweight SRP. This update is coming soon, it will be sent to the store next weekend :)

    upload_2018-5-6_13-55-56.png
     
  10. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
    Update has been prepared for the store and will be available very soon. Here is a small tease showing the much cleaner and easier to understand interface coming in the new version :




     

    Attached Files:

    Last edited: May 10, 2018
  11. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
    Also as a new feature we have masked reflections. These reflections can be set up in a unique way, allowing them to render only over objects in specific layers. This is mostly used for local reflections but can produce very interesting effects with other kinds of reflections as well :)

    upload_2018-5-9_22-7-8.png
     
  12. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
    Version 1.2 has now been sent to the store. It includes the following updates!
    • Support for Unity 5.2 has been dropped. Many of the new features are not compatible with versions older than Unity 5.4, so this will be the new minimum supported Editor version. Please update to at least Unity 5.4 before installing this update to PIDI_2DReflections.
    • Support for Lightweight SRP in Unity 2018.1 and above. All main features of this tool Except Shader Based Reflections work in Lightweight. All Lightweight Reflections are Render Based.
    • All lightweight based shaders are fully compatible and editable with Amplify Shader Editor
    • New redesigned interfaces that will make working with Render Based reflections much easier.
    • All render based reflections work now on a per-renderer basis, allowing you to have multiple reflections sharing the same material.
    • New render based vertical reflections
    • New simple water shader with both reflection and refraction enabled.
    • New masked reflections that are visible only over the layers you specify.
    • Updated documentation

    It will be available in a few days! :)
     
  13. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
    IMPORTANT, ABOUT THE UPDATE : Make backups of your existing version if you want to roll back. This version is a MAJOR update with many changes. It also changes the WHOLE folder structure to allow for both the Standard and Lightweight versions to live in a same package. Remove the old version from your project before updating!

    Please follow the instructions above to make the updating process as easy as possible! :)
     
  14. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
    Version 1.2 has just been approved on the Asset Store! It comes with the following improvements :
    • Unity 2018.1 Lightweight SRP pipeline Support
    • Simple 2D Water shader
    • New reflection effects such as fading and masking
    • Lightweight SRP Shaders are fully editable with AMPLIFY SHADER EDITOR (which is also our recommended tool to develop custom shaders for this plugin)
    • Improved UI designs
    • Highly improved performance
    • Multiple reflections per material
    • Improved documentation
    REMEMBER : Support for Unity 5.2 has been dropped and the folder structure has been changed. Remove the previous version from your project ( and back it up in case you want to roll back a version ) before downloading and installing this update.
     
  15. abuki

    abuki

    Joined:
    Nov 14, 2013
    Posts:
    24
    Hi, thank you for a great plugin. I came across two issues.

    1) When starting play mode with PIDI_2DReflection component not collapsed, the console shows few errors like this:

    NullReferenceException: Object reference not set to an instance of an object
    PIDIEditor_2DReflection.OnInspectorGUI () (at Assets/Plugins/PIDI - 2D Reflections/Editor/PIDIEditor_2DReflection.cs:40)
    UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor[] editors, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1253)
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)


    2) I am not able to setup proper Render Texture reflections. See images. When erase background is checked, the images are right, but the background (camera background color is missing). But when not erasing the background, the reflection show just alpha? I am using Unity 2017.4.1f1, and I have multiple camera setup (is this a problem?)
    Render Texture / Distorted Vertical shader, and the classic shader based solution is working fine.

    EDIT: the behavior is same on mac and win
     

    Attached Files:

    Last edited: Jul 17, 2018
  16. abuki

    abuki

    Joined:
    Nov 14, 2013
    Posts:
    24
    Ok, I fixed the basic issue - the sprite color in sprite renderer needs to be black. I didn't know that. Anyway, I am struggling with my multicamera setup. The basic shader based solution works great, but the render texture is not, and I don't know how to setup my layers. Is it even possible?

    The are two problems:
    1) Parallax layers are not visible in the reflection (they are rendered by different parallax perspective camera)
    2) The main camera has don't clear flag (because the far parallax camera takes care of the background), but that means that the character reflection is not cleared too.
     
  17. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668

    Hi there,

    First of all, thank you very much for purchasing my asset :)

    About the inspector related bug, thanks for letting me know, I will be sure to patch it before the next update.

    The fact that your final output (what the player sees) is composited from several different cameras is indeed most likely the issue. The 2D shader based reflections render based on what is on the screen since they grab the final output from the screen itself. However, the Render texture based ones, due to how RenderTextures work, are based on what the main/current camera sends to the screen at that particular moment, which may be completely different from the final screen output.

    While your players can see the parallax+foreground setup as one final result and the shader based reflections do this as well, you built it using a 2 camera system so the render texture based reflections has no way of copying this setup to reflect it since it would need to copy the behaviors of the two cameras and internally, somehow, know how to mix their results. This is in most cases not possible to do since it depends on how each developer is managing their cameras.

    However, I will do my best to help you. Later today I will PM you a patched version of this asset that will allow you to explicitly define from which camera you want to reflect the output as a background and from which as the foreground along with a shader that will effectively mix both. You would then just assign your camera that renders the parallax layers to the background slot and the one that renders the main scene to the foreground slot.

    Hopefully this will help, I just ask you to please be patient while I get the patch ready and send it to you later today so that you ( and later this week, when I make it public, other developers with this kind of setup ) can use 2D reflections in a better and easier way :)

    Have great day, I will PM and get back to you ASAP!
     
  18. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
    About the issue above, a small patch has been issued and will be sent to the store for approval soon adding a whole new workflow for complex parallax camera systems that have different cameras for background and foreground elements letting you render their reflections easily :)

    It will be sent soon and should be available for everyone next week!
     
  19. abuki

    abuki

    Joined:
    Nov 14, 2013
    Posts:
    24
    Many thanks! Works like a charm! Keep up the good work!
     
  20. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
    No problem, very glad to have helped! :)
     
  21. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
    Version 1.3 has been sent to the store, adding support for Parallax Scrolling Backgrounds in both Lightweight and Standard pipelines :)

    It will be approved soon enough!
     
  22. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
    Version 1.3 has just been approved!
    I hope it will help your projects and make your workflow much easier :)
     
  23. tosvus

    tosvus

    Joined:
    Dec 27, 2016
    Posts:
    33
    Hi, will this work with Corgi Engine?
     
  24. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
    Hi there,

    While support for specific third party assets is not provided, this plugin doesn't make use of any specific features that would prevent it from working with the Corgi engine.

    However, depending on how their controllers and cameras are designed you may need to set up the reflections in a way specific for that tool. Some level of experimentation with the settings might be needed.

    Most controllers from other assets do not require any custom code either to work with this tool, so while I cannot guarantee out of the box compatibility with the Corgi engine, there shouldn't be any issues integrating it since its functionality is self contained.

    However, if you are going to integrate it with Corgi or any other third party tool some coding experience is heavily recommended, just in case the tools you are using interfere at some point with these reflections (though so far no other assets have presented any conflicts with this tool). If you have any other doubts now or later in the process, you can always contact me on the support email or send me a pm here on the forum :)

    Hope this helps!
     
  25. tosvus

    tosvus

    Joined:
    Dec 27, 2016
    Posts:
    33
    Thanks, I will probably order it and give it a try. I may be back to ask you and/or the Corgi devs for help if I get stuck, haha.
     
  26. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
    This asset is now available on Itch IO too, and as part of our launch sale on the Itch IO store it is available with a 20% off, just 12 USD :)

    Regardless of where you buy it, the tool will get the same updates, patches and you will receive fast support so you can be sure that either platform will represent a safe and worthwhile purchase :)
     
  27. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
    This asset is now also available on ItchIO with a 20% off (only 12 dollars!) until August 31 :)


    It comes with the same level of support and it is updated at the same pace as the version in the Asset Store, so check it out!
     
  28. joaobsneto

    joaobsneto

    Joined:
    Dec 10, 2009
    Posts:
    104
    Hi,
    I'm using ProCamera 2D Parallax and it uses multiple cameras to do parallax, it's possible to make reflection from multiple cameras?
     
  29. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
    Hi there!

    While this tool does not guarantee support for any particular third party tool, there are some ways you could make it work :

    1 - If your camera system uses only two cameras, one for the background and one for the foreground, then support is already built in for those parallax camera systems.
    2 - if your camera systems uses one camera per-parallax layer then the reflections will not work since they are designed to work with 1 to 2 cameras at the moment. To make these kinds of multi-camera systems with this plugin you would need to render all layers to different render textures, join them together in a single texture and THEN send them to the reflection shader. There is an update on its way for later this month that will allow for multiple cameras (up to a certain amount) to be combined into a single reflection, but it is not possible (out of the box) at this moment, sorry :(


    I hope this helps!
     
    joaobsneto likes this.
  30. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
    Version 1.4 is currently in development with huge improvements including the ability to mix a high number of cameras into a single reflection and new ways to customize said reflections. It should be ready as October's main update (mid-late October). As a heads up, it will also be the first version of the tool to drop support for Unity 5.4 making the new minimum version required Unity 5.6.

    If your project requires Unity 5.4 to work and you cannot upgrade please reply to this thread as I do not want to leave any users behind and, if needed, I will extend support for Unity 5.4 for a couple versions more.

    Hope this helps, and have a great day!
     
  31. Sigma266

    Sigma266

    Joined:
    Mar 25, 2017
    Posts:
    79
    Hi! So the asset's good, but I'm having an extremely annoying issue.

    In the first picture the reflection is doing its job as it should, but in the second one the reflection stretches like crazy and it happens every time the camera gets far down from the reflection. Not left, not right, only down. What should I do to fix this?

    omghelp.png omghelp2.png
     
  32. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
    Hi there,

    Currently, that is the intenderd behavior due to how 2D reflections in general work. Both the shader based reflections and the render texture based reflections take the screen input and build a reflection from it. Unlike 3D reflections, "D reflections do not have any idea of what is outside the screen so when an object they are supposed to reflect goes outside the screen bounds but the reflection still needs to draw it in full, the reflection input gets clipped and stretched to try to compensate for the missing information.

    The update for the end of this month-early November (which will include the multi-camera reflections and should be available around next Friday-Sunday) will also include a new, beta reflection method that performs additional calculations to allow reflections to draw objects that are outside of the screen bounds, but this will only be available through the RenderTexture method since, again, the shader method included in the package cannot read anything outside the screen bounds since it depends on a GrabScreen pass.

    In short : The update coming next week will add a new, beta algorithm for reflections that fixes this issue but at the moment, due to the limits in the way shaders work and the way 2D reflections have been designed to match them, this is the normal behavior when the reflections try to draw in full an object that is partially or totally out of the screen.

    I hope this helps,
    Irreverent Software
     
    Sigma266 likes this.
  33. Sigma266

    Sigma266

    Joined:
    Mar 25, 2017
    Posts:
    79
    I see, thank you very much. I guess I'll have to wait for the update!
     
  34. joaobsneto

    joaobsneto

    Joined:
    Dec 10, 2009
    Posts:
    104
    Hi,

    I'm having a problem.
    My main camera is set to Depth Only and the reflection is working like is Depth Only. If I change Clear Flags to Solid Color, then it works properly, but my main camera must be Depth Only. What do I do?

    Thanks!
     
  35. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
    Hi there,

    The reflection must have a solid background to work since it uses a render camera based on the main camera you are using. This is the intended behavior (Depth Only camera = Depth Only reflections). Please PM with more details about the issue you are experiencing (and some screenshots) so I can try to give you a quick patch to overcome this issue and force the reflections to render with a solid background regardless of what the main camera does.

    I hope this helps!
     
  36. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
    Here is some progress regarding the update :



    upload_2018-10-31_13-10-8.png

    The reflections can now handle out of bounds/out of screen objects without issues (on the render texture mode ONLY). The update is coming around the weekend!
     
    Sigma266 likes this.
  37. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
  38. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
    The update got slightly delayed until ~Tuesday since I am making sure to document thoroughly the many new features and modes that come to the tool in this new version. It will make your workflow far easier while providing a more consistent setup. The tool will be sent for approval tomorrow morning and should be ready for download on Tuesday.

    New features coming for this version :

    • Improved reflections algorithm (for Render Texture reflections) that allows you to reflect objects that are partially or totally outside of the screen, This is meant for side-scrollers only.
    • Reflections for cameras set to depth - only mode have been fixed, solving an issue where the background of these reflections was not properly cleared, producing ghosting trails.
    • Completely redone workflow for games using Parallax cameras. Up to 24 cameras can be combined into a single reflection fully respecting their depth order, culling masks, fields of view and projection settings.
    For the new Parallax support :

    upload_2018-11-4_11-52-5.png

    Enable the new Advanced Parallax support toggle and then assign as many cameras as your game uses, ordering from back to front. Nothing else needs to be done, the reflection will automatically handle the mixing and ordering. Since the reflections are mixed internally, this also means that the new parallax method produces reflection textures compatible with ALL included shaders, not only the Parallax specific one from the previous version. By using the downscaling (which is applied globally) this new method is also far more efficient than the previous one, even when combining multiple cameras.

    Have a great weekend!
     
  39. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
    Update 1.4 is now available, featuring the new reflections algorithm (labelled as a BETA feature on this first release) that allows you to reflect objects outside the screen. You can find it on the main settings of the PIDI 2D Reflections component.

    Also new is the advanced parallax setup in the same component which allows you to combine up to 24 reflections into a single output.

    Hope it helps!
     
    Sigma266 likes this.
  40. IrrSoft

    IrrSoft

    Joined:
    Jul 6, 2012
    Posts:
    668
    This post is to inform all of you that, due to the holiday season, we will be taking a short break (to come back on January 7) and to wish you all a very happy holiday's season and an amazing 2019!

    Irreverent Software