注意:这是一个预览功能,将来可能会更改。如果有使用此功能的场景,可能需要在以后的发行版中更新这些场景。在该功能尚未正式发布之前,请勿在大规模生产环境中依赖此功能。
The Progressive GPU Lightmapper is a backend for the Progressive Lightmapper which uses your computer’s GPU and Dedicated Video Ram (VRAM) to generate baked lightmaps and Light Probes.
为了使用渐进 GPU 光照贴图,您的计算机必须满足以下最低规格:
If the Scene you are baking requires more VRAM than is available on the designated GPU, bake times can significantly increase. See Performance elsewhere on this page for information to help you reduce the time it takes to bake your Scene.
The specifications of the GPU you use to bake and the amount of VRAM dedicated to that GPU both influence your experience of the lightmapper’s performance.
其他争用 GPU 资源的应用程序也会对烘焙性能产生影响。根据您的硬件供应商,Unity 可用 VRAM 数量的减少可能会减慢烘焙速度,导致烘焙失败,甚至如果 GPU 无法满足最低内存要求,甚至会导致光照贴图回退到 CPU。在使用此功能时关闭其他应用程序可以提高稳定性和性能。
有多种方法可以减少烘焙时间并避免烘焙超过指定给 GPU 用于烘焙的 VRAM 的情况。
Close other GPU-accelerated applications. GPU-accelerated 2D image editing and 3D modelling software uses VRAM. Turn off accelerated graphics functionality or quit these applications.
Switch to a CPU-based denoiser. GPU-based denoisers also use VRAM capacity. Switch to a CPU-based option, like Intel Open Image, which uses system RAM instead.
Use Light Probes for smaller GameObjects. GameObjects such as debris or small props use up space in lightmaps but might not contribute significantly to the look of a scene. To optimize bake speed, disable Contribute Global Illumination for these GameObjects’ Mesh Renderers and light them with Light Probes instead.
Designate separate GPUs for rendering and baking. If your computer has more than one GPU, you can designate one for rendering and one for baking. See Configure GPU selection elsewhere on this page.
Use a lower number of Anti-aliasing samples. The default value for this setting in the Lightmap Parameters Asset is 8. When you increase it, Unity uses more VRAM. When you are using a lightmap size of 4096 or above, this can quickly exceed the memory of many consumer GPUs.
If you have at least two GPUs, you can specify one GPU for rendering the Scene and another for baking lighting. This might be desirable in cases where there is insufficient VRAM available for the default GPU to both render your scene and bake it using the Progressive GPU Lightmapper.
To change which GPU Unity uses for baking:
1. Open the Lighting window (menu: Window > Rendering > Lighting).
2. Navigate to the Workflow Settings section.
3. Use the GPU Baking Device drop-down menu to select a GPU.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.