Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

Screen Space Reflections (SSR) for Unity by Plawius

Discussion in 'Assets and Asset Store' started by Plawius, Mar 3, 2014.

  1. Plawius

    Plawius

    Joined:
    Feb 27, 2014
    Posts:
    41
    Hello to every Unity user!

    We’re excited to present a new screen space reflections solution for Unity3D available here. It’s a script that implements a post-effect, which adds reflections to all shiny surfaces at your scene. It works properly with curved surfaces, waves on the water, normal maps and different levels of reflecting surfaces.

    The main advantage of SSR is that you don't require almost any CPU cost and potentially long setup of additional render passes. It means, that it doesn’t make any performance impact, so you can add it to your game and make it look better without any performance losses.

    Here is a short 15s video demonstration of this asset:

    The web demo from the video will be available soon.

    It’s so easy to use!

    With regular camera, just drop SSREffect.cs on your camera.

    With OVRCamera (Oculus Rift) - drag SSREffect.cs to both OVRCameraController's CameraLeft and CameraRight
    Reflection works with specularity of a material. So, if you're using just 'Diffuse' material, it won't reflect anything. To enable reflections on some material please use shaders with 'specular' or 'shininess'. Increasing 'shininess' will increase reflections visibility.

    Here is the list of settings:

    You can tweak settings in SSR_Settings object which is added to your scene automatically.

    Enable/Disable state - enables/Disables SSR on all cameras with SSREffect attached.

    Downscale/Iterations - this ones blur reflections to hide artifacts. More iterations - slower performance. More downscale - better performance.

    Linear coefficient - raymarching step size in pixels. Tweaking this value can help you reduce artifacts.

    ZBias - maximum difference in depth value to detect intersection during ray marching. Tweaking this value can help you reduce artifacts.

    Max raymarch iterations - varies the quality. The more iterations - the slower performance. You should keep this as low as possible. Also more iterations adds the reflection distance.

    Props Legal

    Art assets remain property of their respective owners, and no assumption of ownership is made by Plawius LLC.
     
  2. Plawius

    Plawius

    Joined:
    Feb 27, 2014
    Posts:
    41
    Last edited: Mar 12, 2014
  3. TemplarGFX

    TemplarGFX

    Joined:
    Aug 21, 2014
    Posts:
    103
    Hi There, Is there much difference between the look of your SSR and the Candela SSRR?
     
  4. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,875
  5. Plawius

    Plawius

    Joined:
    Feb 27, 2014
    Posts:
    41
    The SSR technique is old well-known thing. It already exists in Unreal Engine and CryEngine for really long time. Plawius SSR (or SSRR, as you wish) is lightweight version, that works faster and optimized for Unity Pro.

    It still have cons, like every SSR realization has:
    - cannot reflect transparent objects / particles
    - cannot reflect something that is not presented on screen
    - should be tweaked for each scene to avoid artifacts

    But this is still perfect image effect.

    Try it now! It costs $10 at the moment (hurry up!). BTW, we don't hide our code from you!
     
  6. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    9,914
    Are there props that we cant use in the pack ?

    I refer to the

    "Props Legal
    Art assets remain property of their respective owners, and no assumption of ownership is made by Plawius LLC."

    Very nice price btw
     
  7. Plawius

    Plawius

    Joined:
    Feb 27, 2014
    Posts:
    41
    Well, we're selling only shaders + scripts. So you cannot use demo assets (textures / meshes) according to that.
     
  8. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    9,914
    If they are included in the pack they can be used, otherwise it is against the Unity license.

    Everything in the pack can be used commercially and thus all assets should be readily usuable by customers. Otherwise the store would be useless since noone would know if could use any of the assets for sure.

    Imagine the confusion if we could only use parts of the assets without any rule to define what is what, would be chaos :)

    If the assets are public domain, i think could be included, but anything else cant. That is from what i gather so far, i could be wrong though. You also cant include any other free assets from the store i think.
     
  9. Plawius

    Plawius

    Joined:
    Feb 27, 2014
    Posts:
    41
    Imagine the confusion if you download the asset without any demo scene. Otherwise, imagine a price of such asset pack (tech + demo assets).
    There is a rule, as we said before.
     
  10. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    9,914
    You can get free assets to construct a demo scene. Or make a simple demo scene with easy to make assets.

    The problem is that the only rule that applies is the official Unity asset license (aside free assets), everyone buying from the store expect to follow this license and use all the stuff they see and buy. You cant add extra licenses and rules, because simply there is no way for everyone to know they even exist.

    A good idea is to offer the demo scenes with other assets outside the pack and only for those that have bought the relevant assets ( i mean just have the scene and all assets should come from the bought ones).

    Are those props all from free assets (like say Unity samples) ? You can use the items from Unity samples, so should be fine if these are from there.
     
    Last edited: Oct 22, 2014
  11. Skyfly

    Skyfly

    Joined:
    Jan 25, 2014
    Posts:
    108
    Can you check SSR against the current Oculus Unity Integration Kit (0.4.3)? They changed namings and setup, so adding SSR to your VR scene will mess things up.
     
  12. angelodelvecchio

    angelodelvecchio

    Joined:
    Nov 15, 2012
    Posts:
    170
    Hello !, how to hide characters/players/enemies from reflections ?
     
  13. Plawius

    Plawius

    Joined:
    Feb 27, 2014
    Posts:
    41
    Please try version 1.1. Just drag'n'drop SSREffect to each Oculus camera.
    Sorry for inconvenience!

    Well, we didn't use masking because it's a huge performance hit. But you can use transparent group shaders for material with 100% opacity for characters/players/enemies you want to hide. They won't reflect because of Unity render pipeline.
     
  14. Numix.fr

    Numix.fr

    Joined:
    Jul 19, 2014
    Posts:
    1
    I have an issue with Oculus Rift and SSR : Everything works just fine in normal mode, i can see the nice reflections, but as soon as i test inside oculus the reflections are weird : They are not vertical as they should be, but they move in a strange behaviour as i move my head around.

    I tested with these configuration :
    Oculus Rift DK2, Firmware 2.12
    Oculus SDK, Runtime and Unity Integration with version 0.4.3, downloaded from https://developer.oculus.com/downloads/
    Unity 4.5.5

    I tryed with the demo scene and i have the same behaviour.
     
  15. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,122
    Does this work in unity 5 betas?
     
  16. Plawius

    Plawius

    Joined:
    Feb 27, 2014
    Posts:
    41
    Yes, partly.
    At this moment our SSR doen't work with new Unity Deffered renderer (new PBR materials). Waiting for final render variant from Unity Render Team. In other case it works well

    About Oculus device - sorry for inconvenience, working on that.
     
  17. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,122
    damn... im making a project that relies on both occulus and the new deferred. Keep us updated :)
     
  18. Andrey-Kopysov

    Andrey-Kopysov

    Joined:
    Oct 30, 2013
    Posts:
    7
    Does it support varying blur size of reflection on different surfaces with different glossiness amount?
     
  19. giraffe1

    giraffe1

    Joined:
    Nov 1, 2014
    Posts:
    232
    How does this compare to candela? does this have multiple layer exclusion? and does it come with a script I can attach to anything to exclude reflections? what about performance wise?

    Anyone have any experience that owns both SSR assets?
     
  20. made-on-jupiter

    made-on-jupiter

    Joined:
    May 19, 2013
    Posts:
    25
    Upvoting a working 4.6.3 / 5.0 version!

    4.3.4 works
    4.6.3 tells me my graphics card does not support SSR
    5.0.0 throws errors like:

    Material doesn't have a float or range property '_MaxIter'
    UnityEngine.Material:.ctor(Shader)
    SSREffect:get_material() (at Assets/Plawius-ScreenSpaceReflections/SSREffect.cs:29)
    SSREffect:OnEnable() (at Assets/Plawius-ScreenSpaceReflections/SSREffect.cs:74)
    UnityEditor.DockArea:OnGUI()
     
    Last edited: Mar 7, 2015
  21. Plawius

    Plawius

    Joined:
    Feb 27, 2014
    Posts:
    41
  22. Arelix

    Arelix

    Joined:
    Oct 21, 2012
    Posts:
    5
    Hello ...
    I buy ur plugin on 15-03-2015 and it does not work.... i want a refund...
    Thx
     
  23. Plawius

    Plawius

    Joined:
    Feb 27, 2014
    Posts:
    41
    OK, guys. Please try Assets->Reimport All..
    Deferred (PBR) version of plugin is almost ready. Waiting for additional notes from Unity.

    Can you please describe that in detail?
    Have you tried 'Assets->Reimport All..' ?

    Candela is really heavy. Our SSR is lightweight. If you want to exclude something from reflections - just mark it 'transparent' (even if it not)
     
    Last edited: Mar 18, 2015
  24. Plawius

    Plawius

    Joined:
    Feb 27, 2014
    Posts:
    41
    So, new Unity 5 (PBR) version was submitted!
     
  25. angelodelvecchio

    angelodelvecchio

    Joined:
    Nov 15, 2012
    Posts:
    170
    is possible to exclude my player of the reflection ? or he will look like glass/mirror ( candela case )
    Many thanks
     
  26. TanselAltinel

    TanselAltinel

    Joined:
    Jan 7, 2015
    Posts:
    159
    Hi;
    I've been using different methods for reflective surfaces, and I ended up using Candela. But it is very heavy (costing 20 FPS) and now that I upgraded my project to Unity 5 and it's far from being ready for 5, I'm looking for other options. I tried reflection probes, and I really didn't like it. It gives metallic looks to everything and most of my scene is far from being metallic.
    I saw kode80's SSRR and it looked very nice, however it only worked with standard Unity PBS. I'm using Alloy v3 for most of my shaders in the scene, and I'd really like it to work with that.

    With this new Unity 5 update you've sent,
    1) Is it possible to use it with different shaders? I mean of course, it is a screen space effect, but well, kode80 didn't work that way. If it works with Alloy, it's an instant buy for me.
    2) Is it possible to set reflectivity through smoothness (Unity) / roughness (Alloy v3) ?
    3) I guess it is impossible to set reflectivity for see through (transparent) objects?

    Thanks.
     
  27. Plawius

    Plawius

    Joined:
    Feb 27, 2014
    Posts:
    41
    You can use 'exclude' material for player (inside v1.2). Or just change your player material from 'opaque' to 'transparent' (keep alpha == 1.0, so it's not a transparent actually)

    1) It works with custom shaders, but I'm not sure about Alloy
    2) Yes for Unity 5 / Unity 4 (still not sure about Alloy)
    3) Transparent objects don't not exist for SSR algorithms (any), since they doesn't write anything in depth buffer.
     
  28. TanselAltinel

    TanselAltinel

    Joined:
    Jan 7, 2015
    Posts:
    159
    Hi;
    I've just seen that v1.2 for Unity 5 compatibility is pushed to Asset Store I've bought it just now and meddling with it.

    - Is it possible to update the demo for Unity 5? All my scenes are updated to Unity 5 (like Deferred instead of Legacy Deferred)?
    - I was not able to make reflections work. I dropped the script, meddled with Standard shader properties, but no avail. Only demo shader works and reflects objects around. Am I doing something wrong?

    Attached screenshot is with Alloy v3, but Unity Standard PBS doesn't work either (Alloy v3 roughness 0 = Unity 5 smoothness 1)
     

    Attached Files:

  29. Plawius

    Plawius

    Joined:
    Feb 27, 2014
    Posts:
    41
    We have a new version in waiting-for-approval state with covers some bugs. Could you please email us - contact@plawius.com with your Invoice No, so we can send you fix ASAP?
    Thanks.

    So, yeah, you can manage amount of reflection by material basis (smoothness in new PBR)
     
  30. TanselAltinel

    TanselAltinel

    Joined:
    Jan 7, 2015
    Posts:
    159
    v1.3 is confirmed to be working under Unity 5, and it also works with Alloy v3!
    Great work!

    I'll post a screen when my new graphic card arrives.
     
  31. ArchVizPRO

    ArchVizPRO

    Joined:
    Apr 27, 2014
    Posts:
    410
    Yes please a screenshot would be great!
    Both standard shader and Alloy3 doesn't work for me.
     
  32. vismonkey

    vismonkey

    Joined:
    Jul 23, 2013
    Posts:
    7
    Standard Unity 5 Shaders also dosen't work for me. See attached screenshot. Screen Shot 2015-04-17 at 10.01.40 AM.png Screen Shot 2015-04-17 at 10.02.20 AM.png
     
  33. ArchVizPRO

    ArchVizPRO

    Joined:
    Apr 27, 2014
    Posts:
    410
    Updating to 1.3 fix the standard shader problem.
    But.. how to exclude a object from receiving the reflections ?
     
  34. fretnoize

    fretnoize

    Joined:
    May 24, 2013
    Posts:
    14
    Hi, I just bought this asset. I'm having trouble getting the results i'm hoping to achieve though. Using a first person perspective, I want to be able to have hallways and rooms that have a kind of sterile, plastic, very smooth, glossy feeling to them. These walls also have some emissive materials(if that matters). Most surfaces don't have normal map info for the walls and such, since these surfaces are really smooth. There are artifacts that are much more noticeable when trying to have more accurate reflections, which is what I envision these smooth spaces to be like. I've never been a big graphics guy so this kind of falls out of the realm of "knowing what I'm doing" Is SRR even the solution I should be using for this?

    I've noticed when "Iterations" is set to 0 then the smoothness slider on materials doesn't seem to affect the reflections, and when it's above 0 it seems to happen in reverse; reflections fade as the smoothness slider approaches 1 and also suddenly turn off at 0 when 0.01 was fully reflective.

    EDIT: I think the normal map may have been made incorrectly, so this might not be an issue, currently looking into it. (Old info: On a surface I do have a normal map on, it seems to skew the angle of the reflection, giving an incorrect appearance.)

    Do you have any suggestions for settings?
     
    Last edited: Apr 22, 2015
  35. Hexaedre

    Hexaedre

    Joined:
    Jan 23, 2015
    Posts:
    110
    Same as vismonkey.
    I can't make this SSR work on the standard shaders of Unity 5, and I am using the version 1.3.

    Can someone post a screenshot with material settings to prove it work on the standard shader, please ?
     
  36. fretnoize

    fretnoize

    Joined:
    May 24, 2013
    Posts:
    14
    Hexaedre, did you try the Demo unity package that came with the asset? It's using the standard shader, although I'm not sure it works as one might expect(see my post above), but I'm still learning about it...
     
  37. Hexaedre

    Hexaedre

    Joined:
    Jan 23, 2015
    Posts:
    110
    I tried the demo.
    I made a new basic material in the demo using the standard shader and it worked.
    But when I've return to my own scene it dosen't work on stantard shaders. (it works on legacy shaders)
    I am in deferred, linear and I took the same settings as the demo for my SSR_settings.
    I also tried with the materials given with the demo in my scene : still no SSR on standard shaders.

    It is very stange it works in the demo and not in custom scene...
     
  38. fretnoize

    fretnoize

    Joined:
    May 24, 2013
    Posts:
    14
    it seems to work in reverse, increasing smoothness seems to remove the reflections, so maybe try adjusting the smoothness?
     
  39. Plawius

    Plawius

    Joined:
    Feb 27, 2014
    Posts:
    41
    That's interesting. Could you please check rendering mode on main camera? Is it 'deferred'? And please send us your scene to contact@plawius.com need to take a look.

    Will take a look into this ASAP.
     
  40. ArchVizPRO

    ArchVizPRO

    Joined:
    Apr 27, 2014
    Posts:
    410
    And about exclude SSR from Object (maybe per layer)? there is a way to do ?
    For example I would like to use only for ground, and not for furnitue...
     
  41. Hexaedre

    Hexaedre

    Joined:
    Jan 23, 2015
    Posts:
    110
    Ok my bad...
    For some mysterious reason my render path switched from deferred to legacy deferred.

    But as fretnoize said, the control on the reflection via the smoothness dosen't work as it schould.
    I hope it will be fixed soon.

    This asset is close to be very good. :)
     
  42. eejitb

    eejitb

    Joined:
    Apr 7, 2014
    Posts:
    5
    Hi

    i'm new to SSR, does this image show expected behaviour for your script? You can see how raising the sphere is masking the reflection of the grey cube behind. This is commonly seen whereever i use your asset in my scenes and as such is largely unusable, so i'm wondering if its something in my settings?. I'm using Unity 5.0.1p1, standard shaders, deferred.
    Untitled-1.jpg Thanks
     
    Thorny2000 likes this.
  43. Plawius

    Plawius

    Joined:
    Feb 27, 2014
    Posts:
    41
    That's common situation with SSR (not only our SSR, it's general problem of this kind of algorithm) - you don't see that area behind spheres, so you cannot get reflection from there. Use noisy normalmap on the floor to hide that.
     
  44. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,684
    Does this work with forward path rendering? If not, are you including support for it?
     
  45. Hexaedre

    Hexaedre

    Joined:
    Jan 23, 2015
    Posts:
    110
    Plawius,

    Can you give us some news on the issue about the reflections control ?

    The fact that we can't set the reflections properly makes this asset unuseable for serious work.
     
  46. Plawius

    Plawius

    Joined:
    Feb 27, 2014
    Posts:
    41
    SSR cannot work in forward rendering, sorry.

    We're working on next-level reflection control and also have plan to release inverted smoothness really shortly.
     
    ThunderTruck and TanselAltinel like this.
  47. TanselAltinel

    TanselAltinel

    Joined:
    Jan 7, 2015
    Posts:
    159
    Woooo, another update is on the way?
    Cannot wait!
     
  48. Morfeuskiev

    Morfeuskiev

    Joined:
    Oct 10, 2013
    Posts:
    122
    Hi. How many draw calls add your SSR? I tested kode80, but it have many many drawcalls. Standart water have 700-800 draw calls in my scene (500 without water reflection) and 1500 with SSR from Kode80.

    With Best Regards, Leonid.
     
  49. Plawius

    Plawius

    Joined:
    Feb 27, 2014
    Posts:
    41
    Hi! It's a post process, so just +1 draw call for full-screen quad. And also +2 for downsampling/blur if you're using it.

    We're not doing full scene re-render as Candela and Kode80
     
  50. Morfeuskiev

    Morfeuskiev

    Joined:
    Oct 10, 2013
    Posts:
    122
    @Plawius Thanks. I buy it. SSR work correctly with latest update 5.1?
     
unityunity