Search Unity

Unity Realtime Reflections and GI and realism Exploration

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

  1. randomperson42

    randomperson42

    Joined:
    Jun 29, 2013
    Posts:
    974
    I just don't watch stupid movies. :p
     
  2. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    Blasphemy... Robocop 1 and 2 were awesome. Extremely violent lol.. Not this pg 13 crap your handed in every blockbuster these days.
     
    HeliosDoubleSix likes this.
  3. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    I'm not sure I'd be so bold as to claim writing a PBR shader that runs on every single device Unity targets with compile time stripping and optimisations is trivial... it isn't broken, they just need to add some stuff, and the source code for it will be open source. They are learning the hard way that if they include stuff in Unity that is not perfect for everyone they sure need to make it available for people to extend as to not throw out all the work Unity has done. Like how the new networking code and GUI system works with multiple levels of of access depending on how much control you need. As they need to make stuff people can leverage not things people need to rewrite from scratch just to improve one minor aspect.
     
  4. Zeblote

    Zeblote

    Joined:
    Feb 8, 2013
    Posts:
    1,102
    Hmm? What
     
  5. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    Thanks Wes, Substance is a cool piece of kit

    http://blogs.unity3d.com/2014/05/12/announcing-unet-new-unity-multiplayer-technology/

    Absolutely, back when films could afford a sense of humor

    Big budget Games and Films have been leaning on the seriousness / realism angle like it is the most important aspect, why so serious!
     
  6. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Agreed indeed. Get some Ice Pirates down you and some classic 80s nonsense leading into 90s! It's still very entertaining! There's no soul in new movies. Still, I must apologise for being offtopic! sorry guys.
     
  7. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    I love seriousness, but i also love a machine pistol that cuts people in half.
     
  8. Deleted User

    Deleted User

    Guest

    The argument, that it would be easier for people to transition from the old system to spec gloss, is incomprehensible. And it´s simply not correct. The spec gloss system is more complicated, less intuitive, less reliable, less established. It was a bad decision from Unity, there´s no doubt about it.
     
    chingwa and HeliosDoubleSix like this.
  9. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Somebody is going to write a shader which does metalness workflow, I guarantee it. It's dead simple to convert metalness inputs to something a specular color renderer expects.
     
  10. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    Well they already did for Unity 4 and 5, I am using the beta of it right now, called Alloy:
    http://alloy.rustltd.com

    Just everyone remember this PBR / Linear Colour / HDR stuff does not work on Mobile either at all or very well.. yet

    But Unity are working on some kind of mobile approximation for some of the things

    Saying this the above Ball / hall render I did was in Gamma space ( by accident ) :p
     
  11. thempus

    thempus

    Joined:
    Jul 3, 2010
    Posts:
    61
    MY EYESSSS
     
    HeliosDoubleSix likes this.
  12. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    That is pretty much exactly how I felt when I realised...

    After changing it to linear and changing all the lights and materials, it looks completely identical though lol
     
    thempus likes this.
  13. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    probably cause all the lighting is technically coming from reflections and cubemaps.
     
    shkar-noori likes this.
  14. Deleted User

    Deleted User

    Guest

    Are you sure about that? If you look for example at the Substance Designer PBR-conversion node (from metallic/roughness to spec/gloss), you will notice quite a difference in the results.
     
  15. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,735
    I'm sorry, what are the advantages of a metallic/roughness workflow? From my understanding it's just that you have a map that is either black or white (to indicate if it's metal or not), and if it is, it colors the reflections from the color of the albedo, right?

    Which is the same thing as making sure that the specular map has the same color as the albedo for certain spots. Plus you could also do crazy things like making the reflections a completely different color, which sounds more flexible to me...
     
  16. Deleted User

    Deleted User

    Guest

  17. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,735
    Thank you, very informative. It appears I had the general gist of it right.

    I think I prefer the spec/gloss paradigm. Maybe because making sure albedo+spec is always less than 100 has been ingrained to me from the time I was doing arch viz years ago, so that con doesn't bother me and I like the flexibility to do weird stuff.

    But at the very least I see the value of metallic/roughness. It's (more) foolproof, it uses one less channel, and you have the color information in one place, instead of spread into diffuse+spec maps. It's cleaner in a sense.
     
  18. shkar-noori

    shkar-noori

    Joined:
    Jun 10, 2013
    Posts:
    833
    news? any pictures from the doll demo?
     
  19. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Metalness vs Unity can get cleaned up a bit depending on what program you're using to generate your PBR maps. Automatic conversion tools are very possible ie - plug normal, height, ao, diffuse, whatever into boxes and spit out unity compliant maps or metalness compliant maps. Really, I think this is better than trying to figure it out. The source images aren't a problem for artists, but wrangling them and messing with channels is a problem for artists, time consuming and annoying.
     
  20. Deleted User

    Deleted User

    Guest

    @AcidArrow
    That spare texture channel is especially important as it makes it trivial to support AO as a standard data channel. In the case of Alloy, we use it to generate specular occlusion at runtime, on top of its regular job occluding ambient diffuse lighting. This is super important when dealing with physical HDR specular with fresnel, as it will appear in places where it looks really wrong.
     
    Last edited by a moderator: Oct 1, 2014
  21. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    I would also chime in that specular color allows you to break more rules - which isn't necessarily a good thing, since it means more mistakes which can be made, and those mistakes can lead to materials which don't look physically plausible.
     
  22. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Yes, I'm sure, because internally that's what a metalness workflow based renderer is doing - it uses your albedo and metalness maps to calculate diffuse and specular values. It goes something like this:

    Code (csharp):
    1.  
    2. diffuse.rgb = albedo.rgb * ( 1 - metalness );
    3. specular.rgb = lerp( float3( 0.04, 0.04, 0.04 ), albedo.rgb, metalness );
    4.  
     
    shkar-noori likes this.
  23. Pulov

    Pulov

    Joined:
    Feb 20, 2010
    Posts:
    824
    Please new picsss
     
  24. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    659
    So did anything change in beta 6?
     
  25. shkar-noori

    shkar-noori

    Joined:
    Jun 10, 2013
    Posts:
    833
    Some fixes and improvements.
     
  26. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    FYI I'm not dead, but I have had a cold and fallen down the stairs so pretty close ;-P *sigh* ( remembers kids don't drink and run down stairs )

    Been trying to work on something a bit bigger in scale, my ambition is handicapped only by my laziness... and polygon limits :-S

    ( 3D rendering below NOT in Unity.. yet )

    Clouds.jpg

    Having all kinds of problems with how to get it into Unity, firstly C4D is rubbish and the mesh projection tool is entirely useless, as is the displacement to normal map generation utterly broken and not fit for purpose, so I will have to try 3D Coat or Maya or Zbrush or something to turn the 10-20-200? million polygon model into several lower res meshes with high res normal maps... ugh nightmarish

    I have had a brief look at various terrain tools but they are only suitable with terrain being displaced vertically via height from a flat surface, this cliff is too 3D to work with those kinds of systems I believe. I suspect in DX11 Windows you can just stick a low poly mesh in and use dynamic tessellation with a displacement map and it all works swimmingly, however I use a Mac, so !@£@!
     
    JanCDS and shkar-noori like this.
  27. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Sorry about your fall. Not fun.

    Beautiful scene. Looking forward to seeing it in Unity.
     
  28. shkar-noori

    shkar-noori

    Joined:
    Jun 10, 2013
    Posts:
    833
    b7 is out, any new screenshots?
     
  29. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    where can we see what changes are made in the betas? is there a document?
     
  30. shkar-noori

    shkar-noori

    Joined:
    Jun 10, 2013
    Posts:
    833
    the release notes are private, but there were alot of fixes and improvements went in b7.
     
  31. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
    LOL, but don't sit in that chair unless you're tipping the elementary school trick of lean back in your seat & tumbling backwards.
     
  32. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
    Wow, in college and so well off. A tip for you; you can walk to the nearest plasma center and sell a pint for $15, $13 if you weight drops below 160 lbs but only once a month. Still $13 - $15 was enough to for my return visits.
     
  33. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    @goat: sorry, I don't get what you're saying, and I am not in college, I am still in yr 11! :D
    and completely off-topic (sorry, moderators... :D) but I can tell you now, I literally weigh nothing! ;)
    And I am sixteen still! :D

    EDIT: Also, the money in my room somehow ended up $4.50... ;)

    @HeliosDoubleSix: If you can export the model to FBX or something, I can give a try at reducing polys in blender for you, if you like! :) (Actually, COLLADA would be better! :D)
     
  34. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    659
    How does the new system cope with shadow distance? In the old beast system we have duel light maps that let us fade between baked and real time shadows based on distance.

    I've got a horrible feeling that we won't be able to do this anymore. Do we have to make do with having the shadows fade away in the distance now?
     
  35. Pulov

    Pulov

    Joined:
    Feb 20, 2010
    Posts:
    824
    Issue nº1 Bake time ... How does it evolve?
     
  36. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    @Zomby138: Well, apparently, there is baked shadows, so there is probably a way to do the dual-lightmapping. Plus, all dual lightmaps was without AO was a crossfade between the distance lightmap and a null texture. (I say null, because, unless there's AO, it's all one colour! :D)
     
  37. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    659
    @FuzzyQuills The near lightmap has bounced light and light from any "baked only" sources. Are you talking about the version in Unity Free perhaps?
     
  38. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    Well I already brought this up with them as it is completely broken in Unity 4 with beast, they fixed it in 5 with beast but are removing beast :) and have yet to do the equivalent with
    Enlighten, they assured me it would all be working and look good though in terms of realtime shadows blending with baked on dynamic objects and such, so we shall have to wait and see

    I have not had much of a chance to work with the latest beta's, little by little things are improving and more settings are being added though

    Also 100 million polygons still not enough, I need MORE POLYGONS! this was such a bad idea... this is NOT the way to make game ready assets for sure :p Even when I get this reduced using a normal map it will still be horrific, be interesting to see what DX11 realtime dynamic tessellation makes of it then


    Screen Shot 2014-10-11 at 11.10.42 pm.jpg Screen Shot 2014-10-11 at 11.10.jpeg Screen Shot 2014-10-11 at 11.10.35 pm.jpg Screen Shot 2014-10-11 at 11.10.59 pm.png
     
    shkar-noori and Baldinoboy like this.
  39. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    Slow Progress, but progress, now procedurally-ish cracks around the columns, also fixed topology being gnarly, and better use of polygons so it is higher resolution where it is needed so now is 'only' 7 million polygons :p
    Screen Shot 2014-10-12 at 05.44.59 pm.jpg
    Screen Shot 2014-10-12 at 05.24.43 pm.jpg Screen Shot 2014-10-12 at 05.09.04 pm.jpg Screen Shot 2014-10-12 at 05.23.50 pm.jpg
     
    Baldinoboy and shkar-noori like this.
  40. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    659
    What exactly do you mean by completely broken in Unity 4? The only real thing wrong with it to me is the fact that you have two light maps but only one set of light probes, so basically shadows disappear on dynamic objects in the distance.

    Are you telling me they fixed that just before ripping beast out altogether? If so, that's ridicules on at least two levels.

    I would have liked to have seen a duel directional beast light map option. With 4 samples, near and far radiosity normal maps... seemed like it would be trivial to do, but it just wasn't an option for some reason.
     
  41. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    Yup, that's what they appear to have done :) though I suspect that fix will make It's way to Unity 4.. surely

    In any case the new lighting system is completely different so we shall have to wait and see how they solve the blending this time :-D
     
  42. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    632
    Is everything in this picture realtime? The quality is just crazy!
     
  43. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    Yup, the sun can move and it updates the lighting the bounced light in realtime, makes even crazy ugly low polygon models from GTA look nice :)
     
    blueivy and shkar-noori like this.
  44. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    632
    Also you linked to this path tracing video on your blog

    Did you make that?
     
  45. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    Nope not mine, there are a few tools like this now outside of Unity as the cards get faster ( Brigade, Octane etc ), not much use for a game.. yet, and generally people showing it off have multiple high high end cards :) or even racks of them! :-D
     
  46. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Integrated graphics can handle it. Just watch....(laptop ignites into an inferno)....never mind. They are really impressive demonstrations. I like the Brigade 3.0. Though it will be a while before they are usable for the public.

    Your model is looking really nice. Keep on sending screenshots.
     
  47. Pulov

    Pulov

    Joined:
    Feb 20, 2010
    Posts:
    824
    Regarding these path tracing techniques. Instead or making al the scene noisy I wonder if the light couldnt be computed in the noisy way just for lightmaps and update the lightmaps when they're ready.
     
  48. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    I think that is basically what PowerVR does which they are adding to Unity 5 at some later point to help you see lightmaps update quicker in Editor ( not during game play ) As it is a kind of hybrid, though Unity are not adding the other hybrid technologies as far as I know

    The Path Tracing shown in products like brigade do not use lightmaps at all, as they are tracing every single ray of light so thru refractions and off reflections thus those cannot be baked into a map, also means no problem of texture / lightmap resolution or uv mapping or light leaking inside the map as it has no lightmap, as soon as you add light maps you defeat most of the point of path tracing :)

    Obviously it is fast at updating as it runs on GPU which can crunch this kind of data faster. Where as Enlighten and Beast before it use CPU, however they are likely moving Enlighten to GPU now they have more capability and then you have both much faster precompute or so fast they will remove the precompute entirely which would basically turn Enlighten into a fully realtime GI solution in the future basically baking lightmaps in realtime, that I believe is where it is heading.

    Then the only thing you are missing is realtime ray traced reflections and refractions that Enlighten cannot do, but then products like PowerVR can just fill in those bits for you in realtime, and tadda, job done :)
     
  49. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    That could take a while... ;)

    @Baldinoboy:
    LOL! :D :confused: :p :eek:
    I wonder if MY laptop would do that... :D
     
    Baldinoboy likes this.
  50. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,735
    The thought behind it, is that Enlighten will supersede all of the Beast feature set, so Beast will make no sense to be included any more.