Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Let us know your feedback about the Global Illumination changes in the 2023.2 beta.
    Dismiss Notice
  3. Dismiss Notice

Absolute Lowest settings for realtime GI?

Discussion in 'Unity 5 Pre-order Beta' started by mtalbott, Jan 9, 2015.

  1. mtalbott

    mtalbott

    Joined:
    Dec 21, 2011
    Posts:
    125
    I have yet to complete a successful precompute on some of my more complex scenes. That's after hours of waiting, many retries, different computers, and different operating systems. I have several scenes that do not seem to percompute but below is an image of one of them (Arch Viz).

    My question is, what are the absolute minimum settings I can set to try to get this to finish precompute. ie. should I lower or raise the "scale in lightmap" for all my renderers? What does the "advance/default parameter" do? should I have both "Realtime GI" AND "Baked GI" both enabled or is it one OR the other. Realtime resolution? Alas Size? Reflection Resolution? Bounces?

    I know this is probably self explanatory to someone in-the-know but it's black magic to me and I'd like some more information on what the effects and consequences of all these settings are.
    Screen Shot 2015-01-09 at 8.51.48 AM.png

    Thanks,
    Mike
     
  2. mtalbott

    mtalbott

    Joined:
    Dec 21, 2011
    Posts:
    125
    Also, Unity Peeps, If big changes/fixes to GI are coming to the next beta just cough twice and I'll go do something else.
     
  3. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    Mike, I have the same questions.
    What we need is an official and detailed documentation on the whole thing.
     
    Last edited: Jan 9, 2015
  4. TheHenk

    TheHenk

    Joined:
    Mar 24, 2011
    Posts:
    13
    +1! I have tried finding good settings for a similar scene but have so far not been able to achieve anything acceptable.
     
  5. AustinRichards

    AustinRichards

    Joined:
    Apr 4, 2013
    Posts:
    321
    I'll try to answer some of your questions, from what I've learned. Of course this is not set in stone though.

    should I lower or raise the "scale in lightmap" for all my renderers?
    -If you raise it... it makes it higher resolution and will take more processing time. Of course you don't want it at 0.0001 either. You can raise the entire scene's lightmap resolution by changing the resolution (texels per unit) in the scene lighting tab. Of course reducing the baked from 50 to something lower might be good... but too low isn't good either.

    What does the "advance/default parameter" do?

    The lightmap parameters? They're good for assigning lightmap settings to multiple objects. They deal with certain things, mostly to affect the quality/resolution. You can make one and make all the settings lower, but you probably won't need them except for terrains cuz they bake so slowly right now.

    should I have both "Realtime GI" AND "Baked GI" both enabled or is it one OR the other.

    Depends on your needs. I'd keep both on. You'll have much better results if you do. Of course without baked you don't have access to lighting from emissive objects (which have to be static & baked). Of course there is a realtime/baked option on the emissive shader setting itself but that's only for changing the color/brightness in realtime. The object still has to be static & baked. I keep them both on. Realtime will allow indirect illumination from a rotating sun object/changing sky color/etc. Realtime doesn't take much to process. Most people keep them both on.

    Realtime resolution?
    A value of 2/1 is suggested right now until lightmapping is fixed up a bit. It's like the baked resolution, but much smaller so it can be realtime.

    Alas Size?
    The lightmap system plops all the UVs and lightmaps onto texture atlases for multiple reasons. Changing the size allows for higher quality resolutions on larger objects. You can't put a 1000x1000 meter plane with high resolution on a 1024x1024 atlas, you need a larger texture to fit more details.

    Reflection Resolution?
    This is the default reflection used by the specular/metallic parts of the Standard shaders. If your sky is blue, it'll shine a blueish color. This doesn't affect lightmapping at all but simply how detailed the reflection needs to be. reflection probes override this reflection if you place one down. I'd keep that at default settings.

    Bounces?
    I can't tell you exactly what it does ( a lot of people know I'm just not sure yet), but you don't need it. It makes the reflection darker to me. Just leave it at 0.



    When it comes to the lightmapping... it's very slow. It's almost unusable to honest...... You may want to just wait on lightmapping for a bit.
     
    mtalbott likes this.
  6. mtalbott

    mtalbott

    Joined:
    Dec 21, 2011
    Posts:
    125
    Thanks. that's helpful.

    So i gather from what you've said that "scale in lightmap" is directly related to the "Realtime Resolution" and the "Baked Resolution" in the lighting tab. if you intend to that all objects be baked at the same relative resolution then there is no reason to adjust the "scale in lightmap", rather, the "texels per unit" can serve as a global scale in lightmap.

    Maybe what I'm not understanding now is what the difference between "Realtime GI" and "Baked GI" are. If I want to be able to adjust the direction of the sun, do I still use both?
     
  7. AustinRichards

    AustinRichards

    Joined:
    Apr 4, 2013
    Posts:
    321
    If you want to adjust the sun at runtime use realtime. If you ALSO want to bake lightmapping at all with static objects, use both.
     
  8. Kuba

    Kuba

    Unity Technologies

    Joined:
    Jan 13, 2009
    Posts:
    416
    What GambinoInd said is mostly correct.

    There is no such thing as a universally correct resolution. It depends on the scale of the scene, the required amount of detail in the result and the amount of time you're willing to wait for it.

    That said, the realtime resolution needs to be carefully adjusted as it affects the precompute speed to a large extent.

    The precompute stage is much more complex than a simple bake as it needs to calculate data that will allow the system to handle all the possible lighting scenarios at runtime.

    I guess you meant Bounce Boost. It defaults to 1 and it basically pulls the albedo (the color of the surface) towards white.
    Remember that the light is multiplied by albedo on each bounce, so the lower the albedo is, the quicker will the light die off.

    So if you have dark albedo* in your scene or simply want the light to reach further (say within a long room) then adjust Bounce Boost.
    If you just want to make the output uniformly brighter, change Indirect Intensity. That's just a multiplier on the result.

    *) Check out the albedo debug scene view.

    That's not a good advice. Please use the system, post bugs on unexpected behaviour and help us make it better. Things won't just fix themselves, we need to know about them first.

    This system is entirely different from the old lightmapping system, so one can't expect things to work in the same way. To get to know it best just start with a simple scene, play around with the settings, check out the debugging views (drop-down in the upper left corner of the scene view), etc. Then try it on a medium scene. Only if that works as you'd expect, jump to a big one.

    Proper tooltips are on the way. Docs will be updated soon as well. We'll try to cover all the things that were brought up on the forums, beta and alpha lists so far.