Search Unity

Unity Realtime Reflections and GI and realism Exploration

Discussion in 'Made With Unity' started by HeliosDoubleSix, Sep 2, 2014.

  1. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    Yup, that's the one I keep using, I mention it in the unholy long blog post along with the science behind S curve / Filmic curves. Tone mapping is essential, you should not use HDR without it basically and Unity should add that on by default when you check HDR mode really. I still think they have some math off somewhere as Hable does not look right even though the math is correct, something is awry.
     
    shkar-noori likes this.
  2. Red Spark

    Red Spark

    Joined:
    Jun 7, 2014
    Posts:
    13
    Cool, found relevant info in your blog post mentioned above (hellllll it's long :)). Impressive stuff, keep it up!
     
  3. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    @Zeblote: I would have circled the bottom-left corner, the one with the weird shadow...
     
  4. Aurore

    Aurore

    Director of Real-Time Learning

    Joined:
    Aug 1, 2012
    Posts:
    3,106

    I'm going to interject with an appropriate representation of myself.

     
  5. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    I am really struggling now trying to get the scene and robot model textured, if anyone knows how to use Substance Designer / Painter let me know, it can do amazingly complex things simply, but simple things are so complex! / none standard. I cannot get it to work with multiple objects / materials at once. It took me an hour to figure out how to even import a model into Designer. I can appreciate Painter is in beta, but why can I not bake the AO maps in Designer to include other near by geometry?

    Ah finally figured one part of the problem out-ish you have to combine all the separate models into one big model with separate materials and one UV map that overlaps itself.. obviously, now I cannot figure out how to paint across multiple models >_<

    Meeting at Allegorithmic: we can implement basic features like importing a model… or painting on multiple objects… OR WE CAN HAVE IT SET YOUR MODEL ON FIRE!

    Also it is completely screwing up my normals / phong shading / breaks:
    Screen Shot 2014-09-23 at 10.27.49 pm.png
    Was just playing around above ( all procedural effects no brush strokes ), maybe this is part of the manufacturing process to make the robot, unibody constuction from unobtanium ;-)
     
    Last edited: Sep 24, 2014
  6. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @HeliosDoubleSix From what I've been able to tell thus far with Substance painter, its wholy built around single-mesh, single-material authoring atm. I.E. its really character/prop focused at the moment. I've had some similar issues figuring out how to paint on an asset atlas of like 60 components all sharing the same texture.

    Also, just to double-check, you are setting your normal map mode to Opengl right? (tis unity's orientation)
     
  7. TrollHachem

    TrollHachem

    Joined:
    Dec 25, 2012
    Posts:
    65
  8. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    Thanks, yah, figuring out work arounds slowly, it seems ok if they all share the same texture as they can just merge all the objects before exporting to Substance Painter, not being able to paint across multiple materials is a PIA and it doesn't do a very good job at painting across UV seams ATM either.

    Nope, you can have moving point lights and spotlights ( thought they do not work quite right in beta yet so i have not shown this ) And as soon as the light from a point light hits a surface it will bounce around as you would expect

    And static objects invisible or visible can be emissive, and have that emissive colour/brightness animate
     
    TrollHachem likes this.
  9. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    659
    Could you effectively move an emissive light along a wall by animating the shader? For instance by changing the UV offset on the emissive texture?
     
  10. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    Right that would work, but the GI is not typically that accurate or high resolution to achieve meaningful results with that kind of thing, it is really designed for general ambient bounced light, and not for small bright points of light casting shadows. If you turn the resolution high enough it does start to work for things like casting shadows and small bright lights but can be troublesome; and at high res it takes a few seconds to update the lighting so forget bright flashes of light or rapidly moving light sources, though they have yet to do some speed optimisations with threading and only rendering what you can see instead of the whole scene.

    Small emissive objects will typically not emit any light at all till you reduce the cluster size also.

    You could also use a point light moving along a wall and with a very small radius but very high bounce multiplier. This way the point light does not light the room but only lights a small area on the wall, the wall then bounces that light. Still you will have ugly results unless the resolution is between high and insanely high.
     
  11. sqallpl

    sqallpl

    Joined:
    Oct 22, 2013
    Posts:
    384
    @HeliosDoubleSix

    Great thread!

    I know that you already said that something is wrong with SpeedTree UV mapping and IG but can you post a simple scene with just some stuff like white plane, white wall, maybe a cube and one or few Speedtree trees near them + some sky enviroment light and a directional light + realtime GI please? It will be much appreciated!
     
  12. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    Thanks, I might get around to plants later

    Finally got a workflow working between Substance Painter and Unity, bit of a PIA thanks to Unity choosing the WRONG format for PBR, I have heard all the arguments for and against spec/gloss metal/roughness but Unity have made their choice, not pleased, but I digress, some tiny progress

    Have not done the legs or gun or anything yet, so enjoy the floating legless variant of the hall monitor :)

    Screen Shot 2014-09-25 at 07.32.47 pm.png
    Screen Shot 2014-09-25 at 07.34.19 pm.png
     
    shkar-noori likes this.
  13. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    It hurts so much watching you play with this and not being able to myself. lol. If only we were kids at a playground so i could beat you up and take your toy.
     
    Zomby138 likes this.
  14. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    That's what she said
     
    GeoEuclid and shkar-noori like this.
  15. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    lol
     
  16. Zeblote

    Zeblote

    Joined:
    Feb 8, 2013
    Posts:
    1,102
    Good thing we aren't on a playground, you can actually take it without beating anyone.
     
  17. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    I was referring to unity5. I cant take anything. He has it.. i dont. :p
     
  18. Frpmta

    Frpmta

    Joined:
    Nov 30, 2013
    Posts:
    479
    Can you show us how much differs a scene with baked lighting and another with realtime lighting?
     
  19. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    They look practically identical as it uses the realtime data for baking, baking can do only a few things realtime cannot like area shadows, GI thru transparent objects. This is concerning as the realtime is hard to push to high quality, hard to push it even to Unity 4 levels of quality. The plan I think is to move to PowerVR for the baking after 5's release ( who knows how long ) basically the idea is you will use realtime for everything now and only use baked for a few lights that do not move to get nice area shadows, then only use baking for everything if you are targeting really low end devices. If you want super high quality baked or super high quality realtime, then you are S*** out of luck for now. Though pushing Enlighten to it's limits is still impressive, precompute render times go thru the roof right now compared to what UE4 can pull off in less time for baked. This is how it is right now, this is all changing and will improve, Enlighten are going after the film industry with presumably super high quality lighting, just this will not happen for Unity 5 on release day, maybe another year out.
     
    shkar-noori likes this.
  20. Frpmta

    Frpmta

    Joined:
    Nov 30, 2013
    Posts:
    479
    Oh, no.
    I am only interested in dynamic real-time lighting. :p
    Maybe I am confused in here: isn't in the image with the robot everything baked except for the robot? I assume that because it looks too good to be real-time and was interested in a non-baked environment version.
     
  21. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    Nope all real time, at lowest quality too as I started getting bugs at higher. The scene doesn't really benefit or use much in the way of GI as the reflective surfaces pretty much hide all the lighting.
     
  22. Frpmta

    Frpmta

    Joined:
    Nov 30, 2013
    Posts:
    479
    How's the performance?
     
  23. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    Well the GI only uses any CPU if it is changing / animating really and at lowest quality uses hardly any even then, and the cube map reflections are really cheap. So it runs super fine. The light coming thru the window needs to be baked as it is soft shadowed / area light. The SSAO and anti aliasing are probably draining the lions share, Unity needs to work on those to keep up with AAA.
     
    Frpmta likes this.
  24. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    659
    Surely the reflection probe that's providing all the shiny reflections for the scene is baked and not real time?
     
  25. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    Probes can be realtime, higher res takes a big hit of performance though, and Unity may be removing the realtime option for Box Projection as it sucks performance quite a bit. Really you would pre bake the probe at key moments like day to night and just toggle between them in code. But Unity will be working on SSR ( like Candela offer ) to perform realtime reflections, and Enligthten powered reflections are coming also which will not reflect dynamic objects but will update with changes in lighting and time of day and such ( and I think be based on the quality of your GI so low quality GI == blurry reflection )
     
  26. TrollHachem

    TrollHachem

    Joined:
    Dec 25, 2012
    Posts:
    65
    wait... , 5.0 won't have time of the day compatible GI? or just the beta?
     
  27. sqallpl

    sqallpl

    Joined:
    Oct 22, 2013
    Posts:
    384

    How the probes are working at this moment? You said that the whole object must be inside the probe to be affected? Right? Do you think that they will change this? Just imagine a small house build from cubes. You would like to have a different reflection probe inside the house and another one (or maybe no probe at all) outside probably. Is it possible to affect only one part of a mesh (interior pieces of cubes in this case) with one probe and another one (etexterior part of the cube in this case) with different probe at this moment? Just imagine your house in very dark enviroment and it's exterior walls reflecting some shiny stuff from inside of the house ;) That would be so weird.
     
  28. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    659
    Yeah. The whole "entire object needs to be inside the box" thing clearly isn't designed with walls in mind :\ I really hope they change how it works so I don't need to hack it too much to get it working nicely.
     
  29. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    yah it is kinda impossible to use right now for that, UE4 has a simple distance param to include things within a certain distance outside the box. Talking to Unity they are probably going to do the same thing with some 'magical clamping' pretending that geometry is always inside the bounding box.

    I was talking about realtime Probes / Box Projection. Not sure what they will do ultimately as if they remove realtime box projection or it ends up always being too slow to update in realtime, you will not be able to change any of your lighting as reflections will all stay the same and it would look bizarre. So like I said you will then have to manually worry about storing lots of variants of the probes for key moments and swap them out kinda making the whole thing quite technical.

    They seem to be leaning towards focussing on just using this Enlighten reflections ( will update with lighting but is probably blurry ) and using SSR which can only reflect things currently visible.

    Which leaves this huge gap where you want really detailed reflections of static things like neon signs, fire animating in a puddle.

    But then typically the things it will not be able to do, typically require a huge amount of manual scene setup, and the things they are focussing on require absolutely no effort on the users part.

    So it's a bit like Unity will only focus on technology that makes it infinitely easier drag drop simple to get good results for everyone. And ignore really clever tech that requires a huge amount of setup and fiddling and still had corner cases where they screw up and can really really sap performance if you are not an expert.

    Which makes a great deal of sense.
     
    Last edited: Sep 26, 2014
    TrollHachem likes this.
  30. shkar-noori

    shkar-noori

    Joined:
    Jun 10, 2013
    Posts:
    833
    It's not like 'if it's not inside the box, it doesn't work', there is a variable in the meshRenderer's inspector to modify the anchor for the probe to use.
     
  31. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    We are planning no such thing. Box Projection is quite important for good looking reflections, thus we will keep it :)
    We are working on improvements to make it easier to setup though. For now the probe anchor is quite useful if your box doesn't quite match your geometry.

    Also we are working on runtime reflection probe & convolution generation. Obviously thats not something you want to do every frame. (it renders the scene from the probe in all 6 directions)
    But at least for a time of day effect where you want all your reflection probes to update according to the change in lighting & skybox will be possible with this. Also fully procedurally generated levels will be supported this way.

    Post 5.0 we also want to support reflection probe generation via enlighten on the CPU, this way they can be generated on a thread over multiple frames without a cost on the GPU, and enlighten has a very optimized codepath for generating reflection probes.

    Also for future versions of Unity we are working on a builtin SSRR image effect. For now we are making sure that Candela SSRR and others work well with Unity 5.0.

    So yeah plenty of options to get the best possible way to generate reflections for you.
     
  32. shkar-noori

    shkar-noori

    Joined:
    Jun 10, 2013
    Posts:
    833
    so, how can we achieve Full Scene Dynamic Reflection say in 5.5? can we even do that as post 5.0?
     
  33. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    On the beta forum "QualitySettings.realtimeReflectionProbes was a left over, realtime reflection probes will be disabled for 5.0, and will be reenabled in 5.1."

    So I think I might have misunderstood what that actually means

    In any case they are currently incredibly slow to update at higher resolutions 1024x - 2048x maybe that is a bug or will be ironed out.

    It kinda is exactly like that, there are cases such as in my scene where even with the anchor in the right place it refuses to use the probe making it impossible to align the reflection as I still have to make the probes box larger than the room effectively really is. Whether this is a bug or a limitation I am unsure

    I know this stuff is changing on a weekly basis almost, hence why it is in closed beta :-D
     
  34. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123

    Any word on probes blending between each other? or is it an instant change
     
  35. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    Not for 5.0 I think, they are looking into it for Deferred rendering only ( not forward ) but again, times are a changin, who knows :-D

    They are kinda inherently limited even if you blend it will just look weird, at best it won't POP suddenly and just be weird half way
     
  36. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    The game remember me handles thigns very nicely. And they released all their documentation showing how they did it all.

    http://seblagarde.wordpress.com/2013/06/07/fxguide-game-environment-series-based-on-remember-me/
     
  37. Thomas-Pasieka

    Thomas-Pasieka

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    THIS right there is still making me mad on a daily basis. Why UT has chosen to go that path is beyond me. I like working with Metallness/Roughness but I am forced to somehow make it work in Unity. Made a little test using Substance Painter a few weeks ago and it was tricky to get it to look close to what I saw in Painter. In the end I got it looking nice but I can't say that I like the new "Standard" shader. Nice work you're posting here btw! Keep it up. Wish I had more time to play with it.

    http://thomaspasieka.wordpress.com/2014/09/07/pbr-experiments-in-painter-and-unity-5/


    Thomas
     
  38. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    Yah that's some great work, however it is a PIA to set up all the image proxies and projection volumes and such :-D

    Quite, I think they believed it was easier for people to transition from the old system to spec/gloss. Also some silly argument about ruby gem's being easier to do in spec/gloss. They may well add metal/roughness system in later, but I am horrified with the idea of having a mixture of formats on the asset store, this is why I keep saying this decision will haunt them for years, given everyone who actually is in the business of painting models seems to be in love with the metal/roughness system, but I could be wrong.... not usually, but it has happened before ;-P

    Oh and thanks for the kind words :)
     
  39. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    I say bring on the set up if thats what it takes.
     
  40. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    Agreed but we are probably quite odd, most people have lives.. weekends, people whom they love and want to spend quality time with, instead of spending all week setting up light probes and reflection billboards and adding scratches to a giant walking ball ;-P
     
  41. Deleted User

    Deleted User

    Guest

    @HeliosDoubleSix
    It's no different than restoring an old car, or building a full scale model countryside for a train set. It may have little value outside of your own satisfaction, but isn't that enough?
     
  42. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    Absolutely, It's still weird though ;-)

    I have been wondering today about re doing the robots legs as my OCD kicks in. I always wanted them to properly articulate, has anyone got some thoughts on a sane approach to making it walk and turn, I'm out of my depth when it comes to IK especially given it would have a sliding leg joint like ED 209, rotating shins and a knee that rotates laterally also, making it possibly the very weirdest none natural locomotion.

    I think it would be nice to make it a sellable asset that kids ( stealing kids pocket money is ok if you give them robotic killing machines ) can plop into whatever they are making and have it run around and try to murder them. I personally had hours of fun doing such things back in the days of Marathon.

    But then how ambitious that it is in reality swings by and ruins my hopes and dreams, It should handle incline and rough terrain, but not stairs, which when encountered, it falls down and squeals like a pig.. naturally :)
     
  43. CreativeChris

    CreativeChris

    Unity Technologies

    Joined:
    Jun 7, 2010
    Posts:
    457
    You just reminded me of this: http://bit.ly/1t2gBi6 xD
     
  44. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Release Unity5! You have 15 seconds to comply!
     
    Last edited: Sep 26, 2014
  45. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    The latest beta v6 just popped out as you said that, so that's something at least ;-P ... you damn fool!
     
    shkar-noori likes this.
  46. randomperson42

    randomperson42

    Joined:
    Jun 29, 2013
    Posts:
    974
    It's been 15 seconds. Are you going to rebel, or was that an empty threat?
     
  47. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Be nice if kids knew their pop culture :p
     
    HeliosDoubleSix likes this.
  48. Deleted User

    Deleted User

    Guest

    Hi,

    Currently, you need to use a separate material ID to create a texture set. You can have multiple mesh layers in a single mesh, but each separate mesh will be separated by its material ID. Even if you have overlapping UVs per mesh object, SP will separate the meshes using the material ID. This places each mesh with ID on its own textures set with a dedicated layer stack. However, the issue becomes that you can't currently paint across mesh objects.

    This is an area where SP will greatly improve after the version 1.0 release as we continue to refine. SP version 1 will have the ability to load custom shaders as well. In Substance Designer, we have PBR spec/gloss shader and this will also become available in SP. This will also greatly improve the workflow with Unity 5. Our spec/gloss PBR shader works very well with Unity 5. Although, I also much prefer metal/rough as well :)

    If you need any help or would like me to take a look at your workflow, please feel free to contact me directly at wes.mcdermott@allegorithmic.com.

    Cheers,

    Wes
     
  49. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    It should be reasonably trivial for Allegorithmic to begin bundling their own PB shader for Unity as a drop in replacement for Unity's standard shader, and perhaps even optimise to boot when the time comes...
     
    shkar-noori likes this.
  50. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    Going to have to agree... lol... The robocops that went crazy were the best ones... the skull head.. the one that shot all the scientists lol...