Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

GI still a junk for big scenes?

Discussion in '5.4 Beta' started by TooManySugar, Jul 16, 2016.

  1. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    HI all.

    Upgraded a project for testing from 4.7.2 to 5.4 .
    In the attemp to get similar backed lighting to 4.7.2 I started computation of lightmaps with "very low resolution" for an initial test. I "just" took about 12hours, I let it finish just because I wanted to see if the output was going to be that epic.. It wasn´t it was miles behind Beast, with pretty dull output, but the worst was the Outrageous number of drawcalls, I assume now these are named Batchs. From 2K to 200K!! yes 200, no a typo. I was like what?!?!? performance totally destroyed.

    After hitting the "clear" but the performance came back. I dont know if to test the lighting I've also to convert all my legacy shaders to the new one, but the first impression has been like OMG what is going on.

    This scene takes like 10-20min to bake in Beast. Is an urban scene of about 600x600m.

    I would like to know if "big" scenes are an issue gor GI or if using legacy shaders was what broke the output. Or any other tips. I captured the stats box but forgot to save and not in the mood for another 12hours of nonsenseness unless someone points a big fault from my part on the setup.
     
  2. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,659
    Can you post a screenshot of your Lighting panel?
     
  3. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Hi.
    Sure:
    upload_2016-7-17_1-22-47.png

    Ithought it was in "very low resolution" but it was in medium aparently.

    If it is strictly necesary because it generates a valuable log I could redo the baking tomorrow overnight.
     

    Attached Files:

  4. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,659
    That's a pretty high Indirect Resolution value - bounced light is typically very low-resolution, so you probably do not need to compute it at 1t/m. I'd try dropping it to 0.5 and see what happens to your bake times. (You could even go to 0.05 if you just want 'preview quality').

    I'd also up the atlas size to (at least) 4096 so that more of your objects can be packed into the same lightmap.

    It's difficult to suggest much more without more details. How many lightmaps were you generating under Beast, and how many are being generated by Enlighten?
     
  5. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    Can't wait until the GPU is used for rendering lightmaps
     
    nxrighthere and shkar-noori like this.
  6. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Yep. I've a 1080 and I feel is totally wasted power that could be used for this stuff
     
  7. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Ok gonna fire with these settings and going to grab the info you request.
     
  8. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
  9. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    OK. The things whent faster (a lot) by tweaking the indirect parameter, the output at first was terrible but uping a bit things starter to look better, still far far away from Beast. I came up with an idea. It would be awesome to have a cliping blox that allow to clip just a region of your map so that you can setup the lighting and when you're happy then recompute all with the actual settings.

    I found quite annoying that it bakes eeeeverything. I 4.72 I've the bake selected option. I do not whant to bake all the static stuff.
     
    Last edited: Jul 17, 2016
  10. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,659
    We're working on a new 'progressive' light mapper which is capable of baking only what you're looking at, in "realtime" (the longer you leave it, the more the quality improves). Hopefully you'll see something later this year.

    So, if you had 10 dual lightmaps under Beast, and 12 under Enlighten, then the batches aren't breaking due to lightmap indices (which was my initial theory). It's possible that the Frame Debugger would give you more insight into which things are batching and which are not.
     
  11. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Sorry I forgot to feedback the drawcall issue, I did not even hit play.
    Wohow, the drawcalls whent crazy again!.
    upload_2016-7-17_18-37-5.png
    upload_2016-7-17_18-37-18.png

    Removed the camera filters just in case, same issue:
    upload_2016-7-17_18-43-22.png

    The shaders are mainly Legady shaders>difuse
    //---------------
    After deleting the lighting:
    upload_2016-7-17_18-48-12.png
    upload_2016-7-17_18-48-58.png

    The frame debugger caused the application to freeze as I moved trough the data, I understand it shows what each draw call represents.

    I tried to run several times but it kinda hangs, I guess its because the crazy drawcall number.

    It is an easy issue to reproduce. Simply download the assets, swap shaders with Legady Difuse, add directional light and bake lighting. Pres play and enjoy

    EDIT:
    I would switch to 5.x platform if Beast came back, even if it came as an Aset Store addon, without a way to properly lit scenes upgrading feels like going back.
     
    Last edited: Jul 18, 2016