Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

How to make AAA graphics in Unity/Enlighten

Discussion in 'General Discussion' started by Billy4184, May 18, 2017.

  1. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,663
    So as a lot of people probably know by now, I'm a fan of cinematically realistic graphics, and so far, I've felt that Unity was not up to the task. This was based on what I had seen over a long time looking at the best examples I could find in Unity and comparing them to other engines.

    Recently, I thought I had found the culprit - Enlighten. This was based mainly on looking at the examples from Geomerics website, and comparing them not only to examples of baked lighting in other engines, as a reference point, but also to Unity, where I found a lot of similarities in what I considered to be the consistent issues in terms of quality.

    However, I was pretty shocked to find out that, according to some references, Star Wars Battlefront - which I consider to be pretty much the best looking game around - uses Enlighten. I'm still a little unsure what to make of the fact that all the links on Geomerics website that refer to Battlefront are dead - but anyway it has inspired me to try to find out how to make the most of Enlighten.

    I am also a fan of workflow efficiency, especially for us indie devs, and it seems to me that it is a noble cause to try to find ways to make realtime GI work as best as possible for our projects.

    So this thread is basically just a place to talk about this, to showcase our best attempts at making Unity look great - and to stop hijacking other threads to talk about this topic :)

    It is NOT a place to complain or rant about Unity, or compare it in an unconstructive way to other engines. The idea is to find out just how good it can look, and improve our skills in this area as well.

    So to begin, I am going to take my favourite screenshot of Battlefront and try to make something similar.



    Since they use photogrammetry, I will do the same. I decided to shell out for some textures and meshes from Quixel Megascans, which are about as good quality as you can get, and I will pretty much put them in the scene as-is except for some tweaking of color.

    I just spent a couple of hours making a simple base mesh in world machine, added a texture, and a couple of rocks. I like how it's going so far, but there's still plenty to do.

    Untitled.png

    Anyway, I hope we can all enjoy ourselves trying to make stuff look good.

    @Frpmta @frosted @ShadowK @neginfinity @GarBenjamin @Martin-H @zenGarden
     

    Attached Files:

    Last edited: May 19, 2017
  2. Frpmta

    Frpmta

    Joined:
    Nov 30, 2013
    Posts:
    461
    This is a bad thread. Unity cannot look good.
    Republique asset store scene
    Repub1.png
    Repub2.png

    Repub3.png

    Repub4.png


    Blacksmith
    Blacksmith5.png
     
  3. Frpmta

    Frpmta

    Joined:
    Nov 30, 2013
    Posts:
    461
    Gives me Metal Gear vibes.
    MetalGear Vibes.png
     
  4. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,663
    We'll see :) at the very least, we will find out how to make enlighten's realtime GI look as good as possible, and figure out exactly where and what kind of problems there are.

    Other engines often use a lot of baking, which at least for me is just not really feasible considering the size of games that I want to make. I'm very interested to see if I can find a way to make enlighten work for me.

    Also, if you or anyone else would like to play around with SEGI and post your results, that would be great as well.
     
  5. KyleHatch85

    KyleHatch85

    Joined:
    Dec 13, 2011
    Posts:
    99
    This is an interesting thread for me. Our company has finally allowed for the time to look into proper lighting procedures within Unity. However finding good information on Enlighten (and the progressive lightmapper) seems to be at a short end.

    So if you could post back your findings on recreating your desert screenshot it would be greatly appreciated. And ignore the negative posts. Hopefully this thread won't become like half a dozen others i've read.

    If it does, can i suggest a blog post to show your findings, either here if the Unity website is willing, or elsewhere if they are not.
     
    Martin_H and Billy4184 like this.
  6. Frpmta

    Frpmta

    Joined:
    Nov 30, 2013
    Posts:
    461
    Blacksmith Realtime GI
    Blacksmith Realtime GI.jpg

    Bonus Editor shot! :D
    Bonus!.png
     
    Billy4184 likes this.
  7. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,663
    I'm not an expert at all, but I will certainly post about all the things I try out.

    At the moment, the settings are fairly simple - realtime GI, plenty of bounce boost since the sun is strong and the desert is relatively bright.

    In terms of post effects, I've got ACES tonemapping, and for color correction a very slight blue in the shadows and orange in the highlights. I've also SSAO which makes a huge difference especially with those rocks - I find that Enlighten's occlusion is pretty weak.

    I also added a few realtime reflection probes along the path, spanning all the way from one side to the other. Probably an HDRI environment map of the Utah desert or something would be even better, I might try something out and see how it goes.

    So far I'm not very happy with the way the light behaves in the shadows, but there's plenty of stuff to try out and anyway I'd like to build up the scene a bit more first, with cliffs/ridges and the like.
     
  8. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,663
    I think the lighting is a bit harsh there, maybe tone down the brightness and increase bounce boost, and warm up the highlights/cool down the shadows with color correction?
     
  9. Frpmta

    Frpmta

    Joined:
    Nov 30, 2013
    Posts:
    461
    I actually hate lighting. My dream house would be lit like this:
    DarkBlacksmith.png
    Also, too much bounce can make the lighting look flat.
    TooMuchBounce.png
     
  10. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,663
    OK, now that's way too much!

    But I think the original image you posted is very coldly and harshly lit with like some kind of hospital glare, and it would look better if it was softer and more orange/yellow.
     
    Frpmta likes this.
  11. Frpmta

    Frpmta

    Joined:
    Nov 30, 2013
    Posts:
    461
    I think one of the issues with lighting showcases is that we all have different calibrated displays :D Plus rather than being wrong lighting, maybe different artistic intent. A blue sky that lits a room red could be considered nice from an stylized standpoint.

    Does this work?
    Softer and Orange.png
     
  12. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,663
    I think it's way too bright and saturated. Maybe try to aim for something like this?

     
    Martin_H and Frpmta like this.
  13. Frpmta

    Frpmta

    Joined:
    Nov 30, 2013
    Posts:
    461
    That's pure natural light. Letting the environment do the job rather than trying to influence it. Or I could put that image in Photoshop and create a LUT out of it (after I learn how to do it).

    NaturalLight.png

    Or that's maybe too dark.
    NaturalBalance.png
     
    Last edited: May 18, 2017
  14. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,663
    I think the first one looks quite good, just needed a small boost. Have you tried adding a realtime reflection probe in the middle there? It would probably help to add some more character to the lighting.

    My desert scene looks much worse without reflection probes, I think environment lighting is probably the most important thing to get something looking realistic. So unless you have an environment map set up it's probably going to need a probe or two.
     
  15. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    2,643
    Have you tried the Progressive Lightmapper versus Enlighten?
     
    Deleted User likes this.
  16. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    7,139
    Great that your doing this.

    I do wonder what is the simplest scene that would demonstrate the lighting difference?

    Or what do/did early raytracing developers use as their test scenes?
     
    GarBenjamin likes this.
  17. Deleted User

    Deleted User

    Guest

    Hmmmphh!.. You're suckering me in to do the testing again aren't you LOL!. I shall whip stuff together.

    We could do the cornell box and / or that pillar thingy.. But it's not that interesting.
     
    Last edited by a moderator: May 18, 2017
    GarBenjamin likes this.
  18. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    6,434
    Grayboxed level with a few windows, probably.
     
  19. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    2,643
    I have seen that Sponza Italian architecture scene used for comparisons for years now. It probably has been rendered in every renderer out there.
     
    frosted likes this.
  20. GarBenjamin

    GarBenjamin

    Joined:
    Dec 26, 2013
    Posts:
    7,442
    It is an interesting thread and I am looking forward to seeing the results but gotta say guys... it would almost certainly much better if you go into it without desiring to meet any one person's expectations.

    Thing is you are not likely to create any one scene that is universally seen as "best". Simply because (and you all should know this!) art is a very personal thing. Billy tends to love UE like scenes with a lot of browns and some red etc. Or sort of monochromatic scenes in general. Someone else may love something entirely different.

    Anyway it is all looking great so far! :)
     
  21. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    7,139
    Unity 2017.1 beta Release Notes:
    Maybe we should run the lighting tests in 2017.1 as well?
     
    Last edited: May 19, 2017
  22. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,663
    I'll try it out as well! I wasn't really aware what it was exactly, or that it had become ready. I'd prefer if possible to stick to GI, but it would be interesting to compare results of the progressive lightmapper to something like lightmass and see how it goes.

    Feel like a bit of an idiot for missing that!

    I may do a test scene later on (and anyone is welcome to post their own lighting results here) but right now my only aim is to create a scene that looks mind-blowing in the same way the Battlefront does. I'd also like to create afterward something similar to their jungle scenes which I'm a fan of.

    That's one reason why I don't want to focus on more 'tests' right now. I'd rather just try to make a scene that looks insanely good and makes me happy, and hopefully we can all just share information about what makes the lighting look good or not according to our preferences.

    Sure thing! This thread is for any and all lighting/graphics stuff in Unity.
     
    GarBenjamin and Peter77 like this.
  23. Deleted User

    Deleted User

    Guest

    I also want to include time, ease of use and performance as a requisite, lets say an hour to get a small scene from Maya to engine.. I want it looking good in the space of an hour or two.. Actually I'll compromise and see what I can get done in 1hr 30mins.

    I'll do a test in both Unity and UE, this will include material and bake crunching times. I use a 14 core workstation so if anything it should be pretty quick to get half decent results (maybe)..
     
    GarBenjamin and Billy4184 like this.
  24. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    3,669
    I second this - really think using Sponza scene would be most useful for comparisons. Making scenes look nice is one thing, but being able to really compare different approaches is more useful IMO.

    Also @Billy4184 wtf man, i just posted like 10 pictures with analysis in the other thread, and instead of discussing it - you went and just made a different thread :p

    I really think I'm onto something with how hdr/tonemapping is influencing visuals and how it affects our perception of depth.
     
    samnarain and Martin_H like this.
  25. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,663
    I was kind of hoping to just continue the discussion in a dedicated thread, because really we have been hijacking threads that are about other things, and it has become very messy, and it would be pretty difficult for anyone to find focused information on this topic if it just stayed there.

    I think it would be great if you kept the discussion of your work going on here, I think you ended up with great results that would be useful to a lot of people. Although in my view, so far the post processing did not solve the Unity lighting issue that I talk about that I loosely describe with the term 'flatness', although you definitely made the scene look very cohesive and quite nice to look at.
     
    Martin_H likes this.
  26. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,558
    Can't wait to see what's coming out of this, I would join if I had my pc with unity on hand.
     
    Billy4184 likes this.
  27. mysticfall

    mysticfall

    Joined:
    Aug 9, 2016
    Posts:
    649
    I was a bit skeptical at first, when I read people arguing in such ambiguous and subjective terms like 'flat' or 'better' in the original thread.

    But as they successfully kept the thread from degenerating into something less constructive by supplying real examples or doing experiments with settings, I found it to be a very valuable learning opportunity for me.

    As a hobbyist, I cannot really spend much time with Unity on working days, so most of the times I try to learn something from read documentations, tutorials, or such forum threads until the weekend comes.

    I would've never cared, for example, what those 'kaiser' or 'box' options really mean in the mipmaps settings, and how important are they, if someone from the thread didn't posted a side-by-side comparison screenshots to demonstrate the differences, because the documentation only mentions it very briefly.

    So, thanks for all who have contributed something constructive to the original thread. And I'm excited to have more of such learning opportunities by reading this thread now.
     
    Martin_H and GarBenjamin like this.
  28. sledgeman

    sledgeman

    Joined:
    Jun 23, 2014
    Posts:
    374
    @Frpmta...the darker version looks more realistic, in my opinion ;)
     
  29. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,663
    So a quick tip for lighting noobs like me - the `Realtime Resolution' setting under the `Precomputed Realtime GI' header in the Lighting tab needs to be adjusted from its default setting of 2, which puts weird light and dark patches everywhere as well as a black seam (At first I thought the normal maps were messed up):

    Setting to 2:
    Untitled.png
    Setting to 8 (longer bake times for precomputed data):

    Untitled2.png
     
    TeagansDad and GarBenjamin like this.
  30. GarBenjamin

    GarBenjamin

    Joined:
    Dec 26, 2013
    Posts:
    7,442
    I agree. In fact, in all of the graphics discussions I think that was the first one I have seen that actually focused on achieving something. Finding real answers and sharing the experiments all along the way. That is interesting stuff.
     
  31. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,663
    Yeah I agree, and I think @frosted did the thread a service with his experiments. I didn't want to simply make a new thread here for no reason, the idea was to have the information in one dedicated spot, rather than on page 245 of Mostly Unconstructive Graphics Thread no. 256.
     
    Martin_H and GarBenjamin like this.
  32. mysticfall

    mysticfall

    Joined:
    Aug 9, 2016
    Posts:
    649
    Urg... it's quite embarrassing when I cannot spot much difference in such a comparison set, while everyone else talking about 'great improvement', or 'difference of night and day', and etc :oops:

    Sorry for being a newb, but could you point to me where I should look to see those defects in the first picture, please?
     
  33. GarBenjamin

    GarBenjamin

    Joined:
    Dec 26, 2013
    Posts:
    7,442
    Many people will likely see little difference or at least not give a damn because they are not looking at it like an artist would. To me, either of those images is fine but I think I can see what he is referring too. The first image is dirty (dark spots) and sort of seems a little unevenly lit compared to the second (the top of the rock thingy). I don't see anything bad about either of them. My mind would maybe think ok so the one rock has some mud on it or maybe that is just the colors (or discoloration in spots) of the rock. In the end... I see a rock in both cases. But I *think* if you look at the lighting on the top of the images and then the dark spots on the 2nd compared to the 1st you will see the difference between them.
     
  34. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,663
    Mainly in these areas, the AO resolution is obviously so low that it can only compute a single value for large patches, and it leaves a dark line and makes the object look like something is casting weird shadows over it.

    Untitled2.png
    By comparison the occlusion on the other pic gives these areas a soft hollow look like they should.
     
    TeagansDad likes this.
  35. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,558
    What does 2 refer to? 2 bake pixel per meter? I'm not sure you should bake enlighten for such a small objects, it's about the low frequency light, you might need to find supplement techniques for high frequency. Seems like you need a proper occlusion map here, at the object level.
     
    frosted likes this.
  36. mysticfall

    mysticfall

    Joined:
    Aug 9, 2016
    Posts:
    649
    @GarBenjamin, @Billy4184 Thanks for the clue, I'll examine them on a bigger monitor after I get back home later.
     
  37. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,663
    Looks like it.

    Yeah you might be right about that, I'm already using SSAO because the GI occlusion between the rocks and the ground is not good. I have a small amount of shadow imformation in the texture from the cavity map that came with it, but I'd like to try to do as much as possible in 'realtime' if only just to see what's possible.
     
  38. Adam-Bailey

    Adam-Bailey

    Joined:
    Feb 17, 2015
    Posts:
    230
    It's using pretty basic assets, but when doing some quick tests last year I was able to get lighting results I was quite happy with when combining baked GI on the larger objects with the use of LPPV's to get correct GI on smaller objects. Would love to have the spare time to really dig into playing with good photogrammetry assets.

    LPPV_Testing001.png LPPV_Testing002.png
     
    Buhlaine, frosted and Billy4184 like this.
  39. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    3,669
    I think you are really underestimating how coupled post and 'lighting' is - stuff like tonemapping has tremendous impact on color and the presentation of lighting. Like really huge impact.

    Eye Adaptation, Tonemapping, Bloom, AO, and sometimes Fog are all interconnected in hacking game lighting.

    Its not like lighting is some magical thing, all of these things are dirty computer hacks that go into making things look better. Most of what GI does is add color bleed and mixed reflections, but sometimes AO can do this as well (and, it should).

    Tonemapping can completely change everything we use to judge depth. How dark, how light, how bright. Etc.
     
    Last edited: May 19, 2017
    TeagansDad and Martin_H like this.
  40. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,663
    Just a single texture on a terrain, trying to find the right settings for GI and post: Untitled.png
     
    Gametyme likes this.
  41. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,663
    Looks great! Are you using an environment map there at all?

    I really like the lighting on the ship, is that where the LPPV is being used?

    Yes but we have to be specific. Don't forget that if something is working solely on the values in a rendered image, it is very difficult to use that image to adjust lighting according to the distances to the objects, because the image information cannot be broken down to its pre-rendered components.

    If the tonemapping is using lower-level information that is compiled before rendering (such as an image containing information about the distances to objects from the camera) then it's quite possible for it to affect things in a much more correct way.

    I don't really know what tonemapping does under the hood though.
     
  42. Deleted User

    Deleted User

    Guest

    Ok, so here is my first attempt.. I did want to limit the amount of time I spent on this and I didn't quite achieve 1hr 30..! Turned into 4 hours, but still it was from scratch (I mean just about everything) and I wanted to see how easy it would be to get something half decent thrown together in hours not days.. See how it performs and what the challenges are..

    Of course there are going to be mistakes, but still if you want me to give a breakdown on what I did.. Or you have any suggestions on how to improve the lighting let me know.!
     
    Last edited by a moderator: May 20, 2017
    GarBenjamin, Gametyme, Ryiah and 3 others like this.
  43. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,558
    That looks good!
    I have veryminor nitpicks that have nothing to do with lighting nor rendering, so I would say that's good proof of concept!
     
  44. Deleted User

    Deleted User

    Guest

    There were quite a few things bugging me as well (I sneakily fixed some of them).. But still, this is for nothing more than Billy's thread and it's just a sling together. Looking forward to doing some more testing when I have time..!

    Temporal AA doesn't half get in the way of screenshots.!
     
  45. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,663
    Great stuff! Only minor criticism is the blue haze at the far end that doesn't quite match the rest of the scene.

    Can you shed some light on the way you set it up (GI settings, postfx), anything special?
     
  46. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    3,902
    Does anyone have a GDC talk or slides or paper on how Red Dead Redemption's lighting is set up? I can't find anything. Imho the game still looks amazing, even though it's quite old.
     
    Billy4184 likes this.
  47. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,663
    I gotta agree there, there's something about the large-scale lighting setup that just looks ahead of its time for a 2010 game, even though closer up it doesn't look extraordinary.

     
  48. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,640
    What is the other thread you're referring to? And what is the goal with this thread? It seems OP and the rest of you have different goals. I browse General Discussion once in a while, but it seems you guys have your own little community in here. :p

    Regarding things like these I just have to say that this is way too vague and superficial to be given as a general tip. There are so many variables connected to the precomputed GI and all of these should be balanced for your particular project. If you need extremely detailed occlusion then post processing or baking it into the textures as an occlusion or cavity map is probably a smarter way to do it rather than increase the realtime resolution to "extreme" values. There are also ways to increase the texel density where you want it.

    Red Dead Redemption is made by Rockstar, right? GTA 5 is one of the best looking games ever in my opinion so they probably know how to make things look good. But it certainly isn't about high resolution textures or heaps of post processing in my opinion. It's about studying the effects you want to create and capturing the nuances that make them look realistic or believable.

    When I was making effects in 3ds Max this was one of my favorite books: https://books.google.no/books/about...with_3ds_Max.html?id=JUyk3UdZTmYC&redir_esc=y

    "Everyone" was claiming you needed expensive fluid dynamics or particle plugins or expensive renderers to make effects look realistic in 3ds Max, but in that book he teaches you that it's all about researching the effect, deconstructing it into its base components (hence the name of the book) and then piecing together each component to recreate the effect. The effects you ended up with following this approach looked way more realistic than the generic looking FumeFX type effects you see everywhere, even the including effects you see in a lot of commercial films these days (*cough* Marvel). It's like they've completely lost track of what they're actually trying to recreate. This is especially true when it comes to fire, smoke and explosions. It made sense for explosions to look like gasoline fires in the days of practical effects because that's what they had to be to protect the actors and stunt men, but when most effects are created digitally there's no reason they can't look more realistic. But for all I know movie goers may just prefer this look, I guess.

    Anyway, back to this thread if you want to create a believable outdoor scene you should take or at least in some way gather a lo of reference photos, write down what in your opinion actually makes the outdoors in real life look realistic and try to recreate these things.

    OP, your initial reference image seems to have broken, but I saw it before it broke and the two screenshots you've posted so far have a very visible red or green tint compared to it. I think Adam's scene is a very good approximation though. Also, like frosted says post processing is huge in this. I see the term "flat" mentioned everywhere in this thread, but in my opinion it's impossible for Unity's lighting to be unfixably flat. I could make a white scene with black shadows and no bounced light and I would have 100% contrast, basically the opposite of flat. If something lacks contrast after you've rendered your scene it can easily be fixed with post processing.
     
    Martin_H likes this.
  49. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    3,902
    That sounds really interesting. How specific is the book to 3DS max or the type of renderengine it is using? Would you recommend it to Blender users or Unity VFX artists?
     
    samnarain likes this.
  50. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,663
    Thanks for the heads up, fixed the image.

    As far as 'flatness' it's a vague term that doesn't mean actually flat. The idea is that when the lighting on different objects doesn't fit perfectly together, it makes it appear (very slightly) as if you're looking at cardboard cutouts, hence the term 'flat'. So in this sense, a binary image is perfectly `flat'.

    Although I'm an expert at looking at images :) I'm a complete noob at enlighten, so most of what I post is probably going to sound like someone trying to figure out how to start a car. But anyway, this thread is for all kinds of lighting fun.

    I agree about the color being off in my images, but I'm finding it a bit hard to separate the mid and high tones when there's so much sunlight going around.