Search Unity

Unity need to work on their bake times

Discussion in 'General Discussion' started by AndersMalmgren, Feb 27, 2018.

  1. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Enlighten and/or progressive lightmapper really need to step up in the baking time game.

    Saw this on r/gamedev (In other words its not my benchmark!)
    https://www.artstation.com/artwork/2vlEK

    3 minutes on Unreal 2 hours (enlighten) on Unity
     
    Last edited: Feb 27, 2018
  2. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,190
  3. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
  4. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,190
    We'll just have to see how it fares once it leaves beta.
     
  5. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,532
    If you don't configure the lighting settings properly then bake times are through the roof.

    As with anything, the level of understanding in how to use it dictates the result quality.
     
    nipoco likes this.
  6. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Well, you can never match 3 minutes though. But 2 hours for that small scene seems alot yes.
     
  7. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,532
    Isn't that a little absurd to claim, considering that an engine of equivalent tech level is already doing it in 3 minutes?
     
  8. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    I'm guessing Unreal is using the GPU
     
  9. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,532
    I'd suggest doing more research before drawing uninformed conclusions.
     
    sanmn19 likes this.
  10. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,190
    No. Lightmass is entirely CPU.
     
  11. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    How the heck can they be so much faster? Unity should hire those guys

    edit: I'm on a 8 core CPU and our normal sized maps, takes about 2 hours on that setup. If it does not crash half way in and we need to start over
     
  12. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,190
    My understanding is that lightmass is not a realtime global illumination lightmapper. Therefore the answer is most likely that it's simply less capable and thus needs less time to process. Remember just because something is faster doesn't mean it's actually better.
     
  13. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,532
    Users have to configure the settings to bake the scene fast and properly. In many cases, the user making the comparison does not have sufficient understanding to get the things being compared to bake in even remotely similar times.

    Here's are more comprehensive comparison done for 5.x.
     
  14. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Unreal uses enlighten too for realtime precomputed GI

    We have turned of Precomputed realtime GI since our game does not have realtime lights. A normal sized map still takes aroudn 2 hours on a 8 core CPU
     
  15. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,190
    Basically what this says to me is that you've optimized for Unreal but you haven't optimized for Unity.
     
  16. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Uh? What does my precomputed GI settings todo with above benchmark? :D
     
  17. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,190
    According to the third image the progressive lightmapper in Unity only took 30 minutes. Adding realtime global illumination to it brought the total up to two hours. You just stated that you disabled realtime global illumination for Unreal 4. Why did you leave it on for Unity?
     
  18. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Dude, its not my benchmark, I talked about my own Unity game. We have disabled Realtime GI in our game, still takes 2 hours on a 8 Core CPU
     
  19. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,190
    You're referring to your own game when comparing the performance of Unity but you're referring to someone else's project entirely when referring to Unreal?
     
  20. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    I just emphasized that the bake times are insane in Unity
    And many times the bake crashes
     
  21. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,190
    By using a comparison that was completely in favor of Unreal...
     
  22. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    What are you talking about?
     
  23. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,190
    You created a thread, gave a couple of numbers, but completely failed to mention the source of one of them was from a completely different project until you were pressed for more information. How could you see this as anything other than biased?

    You even repeated the comparison here and stated again that the two hours was for that scene.
     
    Last edited: Feb 27, 2018
  24. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    haha, you do understand the benchmark is not mine?

    Since Realtime GI through enlighten is supported in UE4 and if we assume the person behind the benchmark is not retarded realtime GI is on for both engines.

    Then later down in the thread I talked about my own experience with the enlighten lightmapper in Unity, that even with Real time GI off its incredible slow even on a 8 core CPU.
     
  25. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,190
    Correct, the benchmark results for UE4 were not yours, but the Unity benchmark results were.

    You literally said it right here.
     
  26. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    No,

    upload_2018-2-27_16-49-27.png
     
  27. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,190
    His results for Unity were 30 minutes. Any additional time from realtime global illumination is irrelevant because the other engine didn't have the capability for it.
     
  28. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Unreal uses enlighten real time GI. Anway, 30 minutes was for the progessive mapper. Enlighten took 2 hours.

    edit: But sure, F*** that and compare 30 minutes against 3 minutes. 10 times faster
     
  29. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,532
    Dudes.

    The OP of the comparison already stated (reddit) that he doesn't know much about Unity and the people in threads he has posted about it already pointed out significant issues with the Unity settings he used, including not even working in Linear lighting mode because he didn't even know what that setting was.

    Point being that the comparison is non-professional and the comparison is biased by lack of skill, which means there's no point in analyzing it.

    If you don't understand what that means, you don't have any place arguing about the bake times here.
     
  30. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    I guess I need to download Unreal and try then! But then the test would be in favor of Unity since I don't know Unreal.. haha. Hard benchmark todo!
     
  31. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,190
    AndersMalmgren likes this.
  32. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,532
    Somewhat correct. Since you don't seem to be able to get good bake times out of Unity either I would suggest that you wouldn't be able to produce a fair comparison of either and would need to improve your understanding of lighting in general before attempting to do a proper comparison.

    IIRC Unity has a blog post about getting the viking scene bake times from several hours down to several minutes. There is information out there, but people seem rather persistent on suggesting that Unity can't bake in a reasonable amount of time. While there is valid criticism of the lighting systems in Unity, they're blown vastly out of proportion by inexperienced users.
     
    theANMATOR2b and Ryiah like this.
  33. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Pretty sure those were Real time GI tips if I really correctly ,we don't use that
     
  34. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
  35. bluescrn

    bluescrn

    Joined:
    Feb 25, 2013
    Posts:
    642
    As a mobile developer, I still miss Beast.

    Certainly wasn't super-fast, but it seemed faster than we've ever had with Enlighten and usually with better results (especially AO)
     
    Ony and Lu4e like this.
  36. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    My experience is the Unity bake times entirely depend on your lighting settings combined with the complexity of your scene. If your goal is to have baking finish in 3 minutes, you can certainly configure it and build your scene so it happens that fast.
     
    theANMATOR2b likes this.
  37. chippwalters

    chippwalters

    Joined:
    Jan 25, 2017
    Posts:
    68
    After looking at the demo, and having played around with photorealism some in Unity and only a bit in Unreal, I have a couple of observations.

    The biggest one is that the example is an extreme example, that has zero photorealism. So, what does it say really? That one product can render a fantasy image faster than another?

    Not until you compare apples to apples can you start to make serious comparisons. Don't forget there are many MANY shortcuts one can take if you know the engine. For instance, you can use Post Effects to help create a very photoreal render on either platform, which also can help de-noise images (the reason the baking took so long in Unity is the ridiculously high Lightmap settings).

    Light probes in Unity are also very good at creating great results while reducing render times.

    That YouTube video was an amateur attempt at trolling Unity and has seemed to succeed evidenced by the outrage of those here who don't understand photoreal rendering in Unity. How about posting the scene and let others take a shot? Then we can start to see where the efficiencies can be made.

    For instance, this is an image which took under 5 minutes to bake. It's part of an AR Kit portal scene for Alamo Reality.
    While not perfect, it displays pretty realistically on an iPad or iPhone as you walk around inside the room.



    Here's an early video if anyone's interested:

     
    Ryiah, Ceciphar and theANMATOR2b like this.
  38. Deleted User

    Deleted User

    Guest

    We already looked deep into lighting between Unity / Unreal: https://forum.unity.com/threads/how-to-make-aaa-graphics-in-unity-enlighten.471528/page-4

    Photon mapping by nature will always be quicker than Enlighten, additionally when you factor in Swarm / the amount of years Lightmass has been worked on the penny drops. The new lightmapping solution in Unity was experimental at the time of comparison, you can of course drastically cut the times down but you're also reducing quality to an extent too.

    I wouldn't say at this point it's make or break though, when it comes to large terrains at least it's heavily stacked in Unity's favor. I can go deep into the technical bits if required but lightmaps / GPU's and large games don't tend to work well together..

    Every lighting solution has it's pro's / con's..

    P.S Just to note enlighten in Unreal is a six to seven figure "plugin"..
     
    Ony likes this.
  39. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    interesting, i never get baked time more than 10 minutes in my computer using PGLM on complex scene. As long as there's no terrain in it
     
  40. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,190
    With the progressive lightmapper gaining support for GPU acceleration the benchmark results are basically useless now.

     
  41. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Any year now! :D
     
    carking1996, bluescrn and Martin_H like this.
  42. Lu4e

    Lu4e

    Joined:
    Mar 23, 2018
    Posts:
    276
    Actually the bake times is not too bad with correct setting.

    What takes your time would be a non avoidable version upgrade due to editor problem,
    and may need GI cache clean, re-bake, re-tweak the values...

    Really need a strong heart to prevent heart attack from every new release...:eek:
    I am looking forward to https://unity3d.com/unity/qa/lts-releases.
     
    Last edited: Mar 24, 2018
  43. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    If you dont clear cache you also risk of ending up with bake artifacts
     
  44. Lu4e

    Lu4e

    Joined:
    Mar 23, 2018
    Posts:
    276
    my words may need some humour to read...;)
    underneath: I have already given up such cardio exercise to make my life easier
     
  45. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    I like a lot Godot. In the image https://forum.unity.com/attachments/2-jpg.271865/
    when you attach emission material on sphere to make shine as surface light, building GI probe is way faster than in Unity.
    For one scene it takes about 8-10 seconds.
    Is it possible to make such faster GI build like in Godot.

    I would like to use realtime illumination but in a way that emissive materials on prefabs shine and affect surrounding.
     
    Lu4e likes this.
  46. Lu4e

    Lu4e

    Joined:
    Mar 23, 2018
    Posts:
    276
    Your image looks very delicious, only Beast can achieve such time with the same quality...