Search Unity

[WIP] Planar Reflections Pro - Realtime, PBR, Planar Reflections for Unity 5

Discussion in 'Works In Progress - Archive' started by PitHeimes, Oct 12, 2016.

  1. PitHeimes

    PitHeimes

    Joined:
    Oct 18, 2015
    Posts:
    322
    Hi everyone,

    we are happy to announce that we are currently working on a new asset: Planar Reflections Pro.



    What is Planar Reflections Pro?

    You name it: Planar Reflections Pro is exactly what you think it is. It is a totally new planar reflection system for Unity 5+.

    Get realtime reflections (like mirrors) in seconds on any flat surface without fiddling around with Unity’s in-house reflection probes. With Planar Reflections Pro you can get realtime reflections with minimal impact on performance.


    What differentiates Planar Reflections Pro from other planar reflection assets?

    A lot to be honest. We implemented an easy-to-use (and even easier to setup) system. Once imported, you just select a object in your scene, add the Planar Reflections Pro script and hit the „Setup“ button.

    The shader allows you to set multiple options to define exactly the look of the reflection you want to achieve.
    Strength according to roughness, Blur according to roughness, Normal Map Distortion, Desaturation and so on...
    Since we use reflection cameras, you can also use your image effects on those. So if your are not satisfied with GPU blur, you can also blur the reflection itself on the camera. Or add Bloom to reflections. Or Screen Space Ambient Occlusion. Or whatever :)

    “Performance, performance” - Name some values, dude.

    In its current state, each planar reflection requires 0.6ms to render a full scene (not the demo scene, the demo scene not even takes 0.1ms of course) at Full HD (On a late 2011 Mac). So the performance hit is quite small.




    Features in a nutshell

    - Realtime planar reflection with low impact on performance (0.6ms in a full scene at Full HD on late 2011 Mac)
    - Blurring with smoothness and depth accounting
    - Multiple reflective objects possible
    - Reflection in every world direction, with rotation around the Y-Axis
    - Dynamic rotation possible
    - Automatic detection of relevant objects that need to be reflected (no waste of performance) based on multiple options for you to play with
    - A lot of shader settings (General strength, Distortion according to normals, Smoothness accounting, Blurring, etc….)
    - Easy-to-use & setup (One Click Solutions wherever it is possible)


    When will Planar Reflections Pro be available?

    It depends on the amount of input, suggestions & wishes we get. We want to make sure, that Planar Reflections Pro is as best as possible from the beginning.

    Nevertheless, since a t.b.d. sucks: We target a release in about 2-3 weeks.


    Let’s talk money. How much is it?

    Well, like I said, a t.b.d. sucks. But since we are still working hard on it to deliver a finished product and not an early beta, it really is hard to say and estimate. But as always, it will be priced fair.


    Thanks for your interest! As always, any suggestion, comment and feedback is highly appreciated. Please ask all your questions below and we will try our best to answer them as soon as possible!

     
    Last edited: Dec 18, 2016
    DevMember, tapawafo, Elecman and 3 others like this.
  2. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    Sounds fantastic. The Unity Planar reflections from the Blacksmith demo are extremely buggy.

    Are you using two planar reflections in the demo scene since there are two surfaces that have reflections on different heights?
     
  3. PitHeimes

    PitHeimes

    Joined:
    Oct 18, 2015
    Posts:
    322
    Basically yes, but this case is a bit different. Since the height difference is really small, the system uses 1 camera and just 2 different offsets on the objects to not waste performance.

    But in general: multiple planar reflections are no problem. :)
     
  4. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Looks good.
     
  5. iamthwee

    iamthwee

    Joined:
    Nov 27, 2015
    Posts:
    2,149
    There's something about the screenshot demo I'm NOT QUITE liking, I can't put my finger on it, perhaps the floor is too mirror like, or the reflections are not 100% consistent.

    Could you try with a different scene perhaps?
     
  6. PitHeimes

    PitHeimes

    Joined:
    Oct 18, 2015
    Posts:
    322
    We will do that. And yes, we took the screenshot with no blur and no normal distortion to show clear reflections :) But we will post some more screenshots from different examples in the upcoming days.
     
    Danirey and iamthwee like this.
  7. PitHeimes

    PitHeimes

    Joined:
    Oct 18, 2015
    Posts:
    322
    As promised at least one additional screenshot showing rougher, more distorted reflections.

     
    magique likes this.
  8. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    I don't want to be a stick in the mud, but I think there is a color space conversion error in the reflections. Or maybe it's just the way the scene is lit. Have you tried comparing it to a reflection probe from the mirrored camera position?
     
    iamthwee and PitHeimes like this.
  9. PitHeimes

    PitHeimes

    Joined:
    Oct 18, 2015
    Posts:
    322
    Oh dang! Thanks for the input. Color correction mistake in latest beta..... Thanks a lot!
     
  10. iamthwee

    iamthwee

    Joined:
    Nov 27, 2015
    Posts:
    2,149
    Yeah I don't wanna rain on your parade either, I loved your Victorian demo previously, but your screenshots aren't doing much to sell IMO, you might wanna look at that.
     
  11. PitHeimes

    PitHeimes

    Joined:
    Oct 18, 2015
    Posts:
    322
    Not a problem at all :) That's what this thread is for: There is nothing to sell at the moment, since we are deep into the bug hunt and beta testing. Therefore: Attached a new screenshot with corrected color correction, some bugs fixed on lighting and shadows and additional options for desaturation and darkening of the reflection. Please note, that the skybox of course is reflected,too. That's where the dark blueish reflections come from :)




    Critics & Comments apprecciated as always :)
     
  12. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    Looks good, very good. A better showcase would be a material with variable roughness though. A metal with grease stains for instance like the one on the left:



    The Unity planar reflections have issues with variable roughness, but I don't think it is a limitation of the method in general. Just with their implementation.
     
    Last edited: Oct 15, 2016
  13. PitHeimes

    PitHeimes

    Joined:
    Oct 18, 2015
    Posts:
    322
    Thanks again for the feedback. Will post a screenshot of a metal with different roughnesses soon :)
     
  14. PitHeimes

    PitHeimes

    Joined:
    Oct 18, 2015
    Posts:
    322
    Some Update on variable smoothness :)

     
    magique likes this.
  15. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    I really hate to be that guy, especially since this is definitely an asset I'm gonna buy.

    Could you remove the normal map? I want to see what sort of convolution you are approximating. Not how the normal map can change the reflection direction.

    That said. Even if you aren't able to pull off a convincing variable reflection convolution, then this asset is still great. Especially for archviz.
     
  16. PitHeimes

    PitHeimes

    Joined:
    Oct 18, 2015
    Posts:
    322
    Not a problem at all. Another Screenshot this time with Normal Distortion turned off. :)

     
    magique likes this.
  17. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    Very nice. Fantastic even.
     
  18. PitHeimes

    PitHeimes

    Joined:
    Oct 18, 2015
    Posts:
    322
    We are glad you (finally) like it ;)
     
  19. EvilGremlin

    EvilGremlin

    Joined:
    Aug 12, 2016
    Posts:
    231
    Hey. So about 10 years ago I left the video game dev business to work on a software start up. I am not up to date on all the new graphics tech and am just starting out with Unity. So yeah, I am an old man. LOL Please explain to me in simple terms the difference between this and Unity's reflection probes. And this only works on flat surfaces? Then will I still need reflection probes for curved objects?
     
  20. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    504
    In terms of strengths, the Reflections Probe is best at reflecting the inside of a hollow shoe-box shaped object. It uses box projection to handle alignment of the reflection map, and generally does a pretty good job in general. However, it breaks down when the shoe-box isn't hollow, the walls of the shoe-box aren't aligned and parallel and/or almost flat.

    Planar reflections are made to reflect one flat, planar surface. For a given reflection quality, they can be faster (because they're only reflecting 1 direction, not 6) and can, because the reflection camera is 'opposite' the main camera, generally offer further quality advantages due to rendering what the player sees first and foremost. Some problems are the same however; the small gutter in the OP is generally acceptable, but rougher, more lumpy surfaces with greater height differences can cause issues. Also, for spectacularly rough, lumpy surfaces, there can be problems with what should be reflected not being picked up by the one direction the reflection camera is pointing.

    PitHeimes, if I might, would I be able to snag a beta? There's some tricks and methods I'd like to test against your system. Primarily, by adding depth of field(distance blur) to the reflection.

    Unless DoF can somehow be encoded along with depth from the reflection plane, I get that this will be a sort of lock for roughness, but you can kinda see in the Oct 18 cube screenshot that even with a rough surface, the contact point is a lot rougher than it should be, and the sky is reflecting through the object somehow. To be more realistic, there should be a sharper reflection there, because the reflected light doesn't have that far to disperse and blur.
     
    EvilGremlin and StaffanEk like this.
  21. EvilGremlin

    EvilGremlin

    Joined:
    Aug 12, 2016
    Posts:
    231
    Great, thank you for that explanation. I could not find a good one on Google. I wouldn't have even noticed the gutter if you hadn't said anything.
     
  22. PitHeimes

    PitHeimes

    Joined:
    Oct 18, 2015
    Posts:
    322
    Hey there,

    we are happy to share some progress with you. We have been working hard to get the mentioned "light dispersion blur" to work without impact on performace. Following screenshots will show the new feature.

    Where we started

    This was the latest version. As you can clearly see, the blur depends on the smoothness or roughness of the material that reflects the light. Indeed, this is a good approach, but to get more realistic visuals we had to consider another aspect of reallife: The amount of blur also depends on the distance, the light has to travel from the point of reflection to the point that is beeing reflect (so e.g.: The distance from the reflection of pixel on the wooden plane to the actual pixel on the box (in 3D space of course).


    What we did

    To achieve this affect we reconstructed the 3D world position of the reflection pixel on the plane and the reflected pixel on the box and calculated the distance. (Most difficult part was to get this camera position independent and therefore consistent and non-flickering when moving around). The blacker it gets, the less distance the light has to travel and therefore, has less range to disperse and hence, resulting in sharper reflections. So basically what should happen is that the edge, where the boxes and the planes meet, should reflect way more sharpen then the top edged of the boxes.

    The result and the current state of Planar Reflection Pro

    This is the result of the new technique. If you compare the first and the last screenshot you will clearly notice, that the text on the box, is way more sharp in the reflection because the light has to travel a lower distance. This is - like mentioned - view indepent and just depends on the distance between the plane reflection poins and the reflected points on the boxes.

    We hope you like our progress and we are happy to get any feedback as always :)
     
  23. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    An endorsement by me and our lord and saviour himself; you know you got a good product.
     
  24. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    Any chance for a WebGL demo?
     
  25. MS_3D

    MS_3D

    Joined:
    Sep 18, 2014
    Posts:
    6
    Hi - this looks really good! Did you have a realease date in the foreseeable future?
    We are curently working on a project where I need planar reflections .... :rolleyes:
     
  26. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    Contact blur - good feature! Btw, in reflection on table these dark cardboard boxes appears bright for some reason.
     
  27. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    Any news?
     
  28. yc960

    yc960

    Joined:
    Apr 30, 2015
    Posts:
    228
    I need a demo containing particlesystems/
     
  29. PitHeimes

    PitHeimes

    Joined:
    Oct 18, 2015
    Posts:
    322
    Things are coming together and possible release is getting closer :)

     
    Lex4art likes this.
  30. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    Can't wait.
     
  31. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    Any chance for a WebGL demo?
     
  32. PitHeimes

    PitHeimes

    Joined:
    Oct 18, 2015
    Posts:
    322
    Once we fixed some flickering issues, we are good to publish some webGL demo :)
     
  33. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    Question: is it possible to have these planar reflections on semi-transparent surface (glass)?
     
  34. PitHeimes

    PitHeimes

    Joined:
    Oct 18, 2015
    Posts:
    322
    Well, it was :D
    Since we changed the approach with implementing contact blur, we are currently not able to achieve semi-transparent surfaces out-of-the-box. But we will definitly get back to that "issue" before release. :)
     
    Lex4art likes this.
  35. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    Any news?
     
  36. PitHeimes

    PitHeimes

    Joined:
    Oct 18, 2015
    Posts:
    322
    Well, debugging, debugging & debugging.
    But this weekend we will prepare the assetstore screenshots and so on. So hopefully not much time left.
     
  37. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    Great. I assume we will be able to change the planar reflection camera settings like render layers, and maybe even cheaper render texture formats for optimisation purposes. It's ok if this can only be done via changing scripts.
     
  38. PitHeimes

    PitHeimes

    Joined:
    Oct 18, 2015
    Posts:
    322
    You do not need to set any layers, because relevant objects get detected automatically and layers are switched automatically too. You can of course always include important or exclude unimportant objects as you wish. Otherwise an algorithm casts the relevant objects for you. Other Reflection Camera settings (like image effects) can also easily be adjusted per reflection. Some settings though are not recommended to change (far plane and field of view), since changes may result in disapperaing of shadows in the reflections.

    Render Texture Formats and Sized can be changed as you like. This can easily be done from our Planar Reflection Editor-GUI. Or from script. Just as you wish.
     
  39. PitHeimes

    PitHeimes

    Joined:
    Oct 18, 2015
    Posts:
    322
    Another shot. This time in motion to show accuracy and that it's jitter free. :)

     
    Hikiko66, Detniess, StaffanEk and 2 others like this.
  40. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    Con you show off how emissive surfaces get blurred in the reflections in a dark environment? I'm very interested in having light specularity come completely from reflections in my project.
     
  41. PitHeimes

    PitHeimes

    Joined:
    Oct 18, 2015
    Posts:
    322
    You mean like this?

     
  42. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    @PitHeimes

    Not quite. I'm curious how an emissive surface works as a specular light source. Could you add a small cube with a very high emission (above 1.0) with some more roughness variance on the ground?

    I'm curious if you could use your reflections to add specularity to lightmapping. Unity deprecated specular lightmapping; stating that users should use the reflection system from now on, since directional specularity-mapping created some very wonky results.

    EDIT: This change in lightmapping coincides nicely with the arrival of your asset.
     
  43. Studio_Akiba

    Studio_Akiba

    Joined:
    Mar 3, 2014
    Posts:
    1,426
    @PitHeimes Sorry if this seems like a stupid question, but I have just stumbled across this and may be interested in it upon release.

    Is this effect screen-space (areas outside viewport not reflected), or is it more like the effect shown in Alien Isolation when you crank Planar Reflections to max, where even areas outside the viewport are reflected(see image)?

    Alien Isolation(Notice how the area at the top of the screen is just the reflection, and the caster is off-screen, shown in second image in full)

     
  44. PitHeimes

    PitHeimes

    Joined:
    Oct 18, 2015
    Posts:
    322
    Hey there,

    Planar Reflections Pro is NOT screenspace. So it also reflects objects outside of the viewport. :)
     
  45. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    659
    Does this work in forward, deferred, or both? Do you have to have a special shader on the ground plane?
     
    StaffanEk likes this.
  46. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    Any news?
     
  47. PitHeimes

    PitHeimes

    Joined:
    Oct 18, 2015
    Posts:
    322
    Still working on it and some "problems" with the lighting. Nothing critical though. Just polishing everything. Especially the setup-process.
     
    Lex4art likes this.
  48. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    C'mon mang already. Yeez.
     
    PitHeimes likes this.
  49. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    504
    Getting these things functional is easy - getting things plugged into Unity's lighting models (even just 'some' of them) is actually a bit more work. Lots of assets can get knocked around when they change things, like there were some bit changed in 5.3, 5.4, 5.5 etc.
     
    PitHeimes likes this.
  50. PitHeimes

    PitHeimes

    Joined:
    Oct 18, 2015
    Posts:
    322
    We LOVE that you are waiting for Planar Reflections Pro. Really! Not in a sacarstic way.
    But as some of you may know, we only publish stuff which is polished. We know, it is not thaaaat agile. But we care about our customer. And paying for some asset which is buggy and not ready to be used in B2C projects or in real production environments is a pain. That's why you sadly have to wait a little longer :( But we haven't forgot about you of course :) Thanks for all your patience!

    In the mean time, you can enjoy our blog to get some insights into the AssetStore, our freshly founded company and an upcoming project :)

    Monoment development blog
     
    AdamGoodrich, StaffanEk and Lex4art like this.