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
    Hi, I was recently inspired by Koola creating stunning arch vis in UE4, so I thought I'd have a stab at it in Unity ( Unity 5 early beta, to use the new Enlighten powered GI, Reflections are possible in Unity 4 with Candela )

    Loads of work in progress, details on post effects and methods here:
    http://www.shadowood.uk/Store/?u=2014-09-02

    Edit, I am talking with the guys at Unity about some of the issues I have had, some of the issue were me being stupid, some of the issues are being fixed. So remember a lot of what I was doing was in the very first beta of Unity 5, I will update the article in time with what I have been learning and posting progress and tips here.

    Hopefully this will inspire some more people in turn! I welcome criticism and especially any advice or tips with this stuff. And likewise if you need help ask away and I'll do my best to pretend I know everything, thanks

    ---

    EDIT, just ( Sept 2015 ) finished new demo for Unity, video here:

    EDIT, Source for the above project and playable EXE with blog post here: http://blogs.unity3d.com/2015/11/05/awesome-realtime-gi-on-desktops-and-consoles/

    Images here:
    https://www.artstation.com/artist/heliosdoublesix

    Playable EXE was at Unite Boston, so that will be released publicly along with source project for free

    ---

    EDIT, work for Arch Virtual
    https://www.artstation.com/artwork/unity-5-realtime-medical-environment-for-virtual-reality
    http://archvirtual.com/2015/06/05/virtual-realism-with-unity-5


    ---

    EDIT, now working for Unity on an animation, here is what has been keeping me busy, more here: http://shadowood.uk/UnityPano/



    Ok that's hall security sorted out, realtime GI, reflections using Box Projection ( scene and robot all mine )
    Tall.jpg roboto.jpg

    Youtube below, try to ignore how rudimentary the animation is :-D and how blurry youtube made it >_<

    Huge super res capture of a realtime GI scene ( 3840x2160 ):
    Huage.jpg

    Ramblings, Research and Unity 3D Experiments: www.shadowood.uk
    Follow my nonsensical explorations: Twitter -- YouTube -- RSS -- Tumblr





    Model lifted from GTA San Andreas a 10 year old game ( shadowing issues on the columns go away at higher resolutions this is at the lowest quality! and all realtime so sun can move ) Sadly no piling into innocent pedestrians is included.
    Screen Shot 2014-09-18 at 06.04.10 pm.png


     
    Last edited: Nov 18, 2015
  2. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Holy S***! This screen shot in particular:



    Looks pre-rendered in Mental Ray or something. Just... wow!
    Unity 5 is going to be a force to be reckoned with in the game industry, no doubt about it.
     
  3. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Huh.... I was going through the thread you had.

    Were those issues present with Generate Lightmap UVs enabled for your meshes? I didn't see you mention that option, so I wondered.
     
  4. Frenetic Pony

    Frenetic Pony

    Joined:
    Sep 2, 2014
    Posts:
    2
    Certainly made that screenspace reflection stuff look good, usually it looks like junk when you start moving around! That being said, it just looks like SSR instead of the more accurate screenspace cone tracing alike UE4 uses, and without the temporal supersampling or normal map AA, yay lack of filtering!

    Ohwell, having a solution for Unity is better than having none so... cool.
     
  5. Pulov

    Pulov

    Joined:
    Feb 20, 2010
    Posts:
    824
    Looks very interesting
     
  6. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    With my more complex scene that just crashed. When it was working, it was hit and miss, difference being with no way to fiddle with it if it did screw up. This would be more useful if you could set import options per sub object in a huge file, not just for the whole file. I did'nt feel like splitting my scene up into a million FBX files naturally :)
     
  7. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    659
    Wow! This looks spectacular. Is this running in Unity 4, or do you have the 5 beta?
     
  8. kenshin

    kenshin

    Joined:
    Apr 21, 2010
    Posts:
    940
    Thank's for sharing, very interesting article!!!
     
  9. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    Very nice.
     
  10. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Wow...realtime...wow
     
  11. 0tacun

    0tacun

    Joined:
    Jun 23, 2013
    Posts:
    245
    Thank you for your insightful blog post.
     
  12. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    very helpful.
     
  13. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    This is incredible! I might also ask: how did you manage to get the shadows that awesome?

    Either way, lookin' forward to Unity 5 full, especially after seeing this! :)
     
  14. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    Talking with the guys at Unity about it... I just figured out how to get the lighting quality dialled up to 11, can't wait to show it off :-D At first it seems disastrously bad and blurry, till you know what the settings all mean :p then it is amazingly wonderful ( when it doesn't glitch and leak light and uv unwrap like a crazy insane person anyway ) When I have it all figured out with solid renders to show, I will post a coherent explanation
     
  15. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    @HeliosDoubleSix: Perhaps you can show us this weird uv glitch? I see none! :)
     
  16. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    Well the above shots in this post are hand picked, but on the blog post I show all the nasty stuff that went wrong at one point or another. They are still working on it though and I am reporting issues that are possibly Unity's fault or user error ( it happens sometimes.. often )
     
  17. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Yes, King of all messups would have to be UV mapping. I know from all the times I had a texture tiling completely wrong in blender, or a weird seam, or... enough on that!

    Anyway, a beta will definitely have bugs, and uer error or not, it will mature. if anything though, the quailty of the final release, the way it's going, could end up... mind-blowing! :)

    EDIT: OOPS! typed 'mid-blowing' instead! :D
     
  18. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    I am finally getting spectacular results from Enlighten, below all realtime ( after lengthy lengthy precompute ) and by realtime I mean you can move the sun light, change the sky, change materials, make parts of your model emit light, and by Unity 5 release you will be able to move point lights, spotlights and I think area lights too while in realtime, along with knocking down walls and having the light update and such. And by realtime I mean at that kind of res it takes a couple of seconds for changes in the light to propagate on a high end desktop.

    Screen Shot 2014-09-10 at 03.11.31 am.png Screen Shot 2014-09-10 at 06.42.43 pm.png

    And if you bake the Sun light too ( then you cannot move it any more ) you will get better shadows with penumbra-ness ( shadows will be sharper closer to the object that cast them, blurrier further away ), normal realtime direct light on the right, baked area light as the sun on the left ( ignore the bounced light in this as it is turned off ) Screen Shot 2014-09-10 at 06.56.12 pm.png

    Area shadow baked versus Direct Light Realtime ( the glowing pink in the one images is a bug I think ):
    Screen Shot 2014-09-18 at 01.17.38 pm.png
     
    Last edited: Sep 18, 2014
  19. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    That is so awesome. I want to try real-time gi in my scenes so bad.
     
  20. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    659
    Glad to see you're getting improvements!

    When you have the "sun" light baked, do you get any specularity?
     
  21. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    With Enlighten in Unity 5 is there an absolute need to bake? Can you make a nice looking scene with okay performance in real-time everything?
     
  22. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    You can turn the realtime up so high it looks baked, naturally this has downsides of speed and memory and such. However the main reason I am baking here is the realtime does not support area lights ( yet ) it is also possible to mix baked with realtime and get best of both.

    Good question, they have ways of dealing with this, and with realtime reflections so a dynamic object moving around your scene will pick up lighting and reflections from your realtime GI or from your baked GI. Right now some of this isn't working but will be by release time. It will store the direction the light was travelling from in the lightmap so you can get lighting and specular from normal maps and such too. And some magical stuff where instead of or as well as cube map reflections ( which suck ) and the projected parallax cube maps ( which suck less ) it can reflect other near by objects correctly from the data collected during the GI calculation. So cleverness all round really
     
  23. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    This just keeps getting better and better!

    Also nice to see us free users have nice Lightmapped shadows to play around with! :D

    EDIT: Corrected "suers" to "users!" :D
     
    Last edited: Sep 11, 2014
  24. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Hey guys!

    Just re-read the first post, as I do every now and then... :D And asking myself, 'so this is unity 5? That's going to look REAL GOOD for us indie users!" :)
     
  25. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    They have not officially said what is in the free version and what isn't yet. I would personally be surprised if they remove it from free, I would not be surprised if they in some way hobbled or limited it for free, though I personally think making the free version of Unity a kinda crappy broken feature missing version of Pro is an archaic way of working especially now a lot of Asset Store stuff inherently requires Pro... I could go on for hours about how forcing people into 'Pro' or not based on some criteria of what functions they happen to use or how nice ( or not crap ) you want your game to look; is silly, and then the new PBR requires HDR and realtime GI requires post processing and those were all 'Pro' features so just points out even more how silly the divide has become. But I digress
     
  26. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    @HeliosDoubleSix: Well, if they have to bring RenderTextures to free version because too many of the new features would have to be cut out if they left RenderTextures pro-only... That could prove deadly! :)

    But they will find a compromise somewhere. in fact, realtime shadows technically use a render target (FBO in openGL) so they would have had to have some exploit there to keep rendertextures disabled. At the very least, the GI would probably be bakeable in free if they don't add real-time stuff... ;)
     
  27. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Even though something needs to change I think Unity Indie will stay where it is now. With UE4 and Cryengine at crazy prices,even though they kinda stink to use, that can prove deadly to Unity. I thought by now Unity would make sufficient profit from the Asset Store to lower the pro price. Oh well. Pointless rant.

    For now I just want to see more screenshots:). Also has anyone tried an outdoor scene like a forest with the new GI?
     
  28. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    @Baldinoboy: I would try that, but don't have the cash to pre-order... :p
     
  29. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    How come?o_O

    Really I do not care if it is the Bootcamp demo. It would be cool to see how the GI works in the outdoors.
     
  30. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    @Baldinoboy: still in school, only $2.50 in my room, pre-order I think is $1500, etc...
     
    goat likes this.
  31. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    I was joking;) as most people do not have $1500 at the ready. Really compared to most things it is not that much. Cost less than some TVs. It all depends on your circumstances I guess.
     
  32. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    @Baldinoboy: True!
    But here's the thing: Once I get a decent game out, that might change... ;)
    After all, there was once a 16-year-old who built a minecraft-dayZ slingoff, raked in 9.8 million... :p
     
  33. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    That is definitely possible in the game dev world. That is why it is so fun:). 9.8 million. Hmm. I think I would be okay with that;).
     
  34. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    @Baldinoboy:
    Yes, 9.8 million. think a racing game with crazy physics could pull that in? :p (Heh, this really depends on how good it is... :D)

    Oh, and add Unity 5 shading to that order... :D :p ;) :)
     
  35. zDemonhunter99

    zDemonhunter99

    Joined:
    Apr 23, 2014
    Posts:
    478
    Unturned?
     
  36. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    YES! that was it!
    And seeing the game in action actually looked really funny (and somewhat derpy, being I am a minecraft player) seeing those zombies attacking the player like nobody's business! ;)

    That also brings up the question: imagine that sort of thing in minecraft... brrr.... :D
     
  37. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    Do the monthly thing and i think it ends up being like $900 a year or something.
     
  38. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Man I stink at that game:(. I love Minecraft but in Unturned I can not do anything before getting eaten. Still trying though.


    You then eventually spend more and still do not own it. Also pretty sure unlike UE4 you lose the pro features once you unsubscribe. The subscription is good if you are on the final straight away with your game and need to set it up decently with pro features. Do not recommend long term subscribing because eventually you will spend more than $1500(in 21 months).

    Let's stop talking about money and start talking about the GI. Still want to see it in the outdoors:).
     
  39. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    You get a million points if you can tell what game this was ripped from... 15 year old game believe it or not, though I removed the original textures would would give it away immediately :)

    Lit purely from the Sky, no lights at all ( well a small orange spot light I was messing with )

    And yes realtime ( after lengthy precompute )

    Screen Shot 2014-09-11 at 07.02.02 pm.png
     
  40. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Quake III?
     
  41. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    659
    Is the orange light baked or realtime? Looks like it's got bounced light as well as a sharp shadow. I didn't think bounced like was working yet on realtime point / spot lights.

    Also, was gonna say Quake 1 :p
     
  42. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Would say that but since he said 15 years I am thinking III.
     
  43. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    A million points to you, you huge nerd

    Don't spend them all at once ;-)

    The point light is real time they haven't added shadowing for the GI yet it it will contribute to the bounced light once it hits a surface this basically means the lights will add GI to things it shouldn't like other rooms and the cellar bellow, they will be fixing this though :)
     
  44. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Cool. Can you transfer them to my PointPal account;).

    So there will be shadowing of the real time GI in 5.0?
     
  45. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Does anybody else suddenly realize that this needs to be a thing? Like a PointPal website where you can give "internets" to people and see how much internets you currently have?
     
  46. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    659
    Ahh I see. That's pretty cool.

    Do your bricks have a normal map? based on looking at the real-time orange light I'm thinking no? If they did have one, would the GI be affected by it?
     
  47. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    What do you mean by internets?
     
  48. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    You ever see a Youtube comment that goes something like "Congratulations sir, you win 1000 internets"?
     
  49. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    No I have not. So it is like likes except someone can give you as much as they want?
     
  50. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    All important Disco mode, all realtime no rebaking from last image, creatively this is liberating joyous wonder Disco.jpg
     
    shkar-noori likes this.