#Modern URP Lighting Tutorial

1 messages · Page 1 of 1 (latest)

quiet dock
#

I've tried baked lighting like a million times in Unity, whether URP, BIRP, HDRP, etc, and it just seems unusable. Even on small scenes it takes hours to render, and then after all that it basically looks the same.

Are there any modern lighting tutorials for URP? Preferably not a video but I guess I'll take what I can get. Most videos skip over a LOT of detail, and it's not clear if it's supposed to take hours to bake lighting on a high end PC in 2025. Things like "Enlighten Realtime GI" being enabled, how does that impact the lighting? I notice no difference with it on or off. Do you have to bake for that to work? What makes it realtime then? Should my lights be set to mixed, realtime, baked? What exactly is the impact of each of those? How do they interact with adaptive probe volumes? How do you get a directional light that you can rotate at runtime, and shadows with nice GI? Static vs nonstatic objects, adaptive probe volumes, there's so much complexity and it's just not clear what's the current "best" approach or modern approach in Unity to get good natural soft lighting in URP these days.

true garden
#

Unity's official tutorials on youtube and Learn have more examples, but aren't quite so comprehensive or modern
Still, it's hasn't changed that much over the years so they are still very useful together with the docs

quiet dock
#

Things like adaptive probe volumes the render pipeline appears to matter, and I'd say that's part of the baked lighting system, though I guess it's independent, but it's unclear to me how exactly it fits in

true garden
long tulip
#

if you don't have higher end hardware baking is just going to take a long time or if you have a very large scene

#

so long as you set stuff to static and then bake it shouldn't take much more than that to start learning how it works

true garden
#

Assuming they're baking using the GPU

long tulip
#

unless they know about that setting somehow I doubt they changed it

quiet dock
#

GPU baking is default in Unity 6, still takes hours for simple scenes, at least on default settings

#

I know the general concept of light probes, yes, but not exactly how it fits in with Unity. Tiny thing for example, if you click on the APV object, the component has a button "bake adaptive probes", which actually does impact the lighting. But the lighting window "APV" tab does not have such a button, it seems very odd to me. Why is baking the probes separate? What exactly does baking the APV do, is it positioning the probes, baking the actual light data, both? seems like both. But then what will baking separately do?

#

there's just SO many settings and concepts re: lighting, and they all appear disjoint but sometimes integrate with each other and sometimes don't. Just want someone to give "here's the best way to set up your lighting in 2025 on URP" sort of guide

#

FWIW I have a 4070 super, card is fine

true garden
#

Too many for any one of us to explain really

#

But if you can show something specific from what you're working with we may be able to give opinions

#

Like what kind of meshes does your "simple scene" actually have and how big is it

#

What are your lightmapper settings exactly

#

What kind of bake performance and lightmap sizes does the summary section at the bottom of the lighting window report

#

Any errors in console when you baked, etc

long tulip
true garden
long tulip
true garden
#

Setting everything to just "static" is often overkill and because it sets everything to receive GI from lightmaps, produces pretty bad results and long bake times if the meshes aren't suited for it
Setting them to receive GI from probes instead is required in most cases, or excluding them from GI entirely
But the hitch there is that you do need to place light probes and have some idea what they are

#

And reflection probes by extension, if you want the lighting to be correct

long tulip
long tulip
#

Obviously these aren't the settings you'd ship with but thats a bit later down the development line you want things to just work first

true garden
#

It's not that uncommon to see someone do the minimum steps and get a bake result with UV overlaps, texel invalidity, light leaking, "fireflies", denoising artifacts, environment noise and maybe even NaN errors all at once
Even if you know what each of those looks like, it may be impossible to decipher visually when the issues overlap

#

I think light baking is a more tricky subject than most due to this
Issues conflate, and the causes are typically disconnected from the symptoms
Like backfaces in one spot cause invalid texels to appear in a different spot

#

It's also a burden that debugging those issues requires going through many different parts of the editor, like lightmap view, scene debug views, mesh import settings, environment lighting settings all separate from lighting settings

#

And that knowing what to do requires a lot of knowledge about the lighting system

#

If you observe low resolution shadows as an issue, you might think that you'll increase bake resolution or even more cleverly object size in lightmap
But instead of actually solving the issue you would likely blow out the lightmap texture sizes and hit the max atlas size causing potentially comepletely different problems
When the real solution would've been to use and know about Mixed lighting modes

#

But because mixed lighting is situational and expensive, there's no tutorial or person who can directly tell you to use it unless they know your project also

quiet dock
#

yeah I just can't get it to work well - basically just end up playing with settings, waiting forever for bakes, end up with ugly result, give up. I've shipped multiple games in Unity lol but never can get baked lighting to work well

true garden
#

You have to study the systems involved to be familiar with them, and practice in a scene that's so simple it doesn't take long to bake and which won't give you multiple issues all at once

quiet dock
#

https://youtu.be/K3-wPnhmDi4?si=PnJHmImtdRwh-DSX&t=2590 this is actually pretty much what I was looking for, though not quite as in depth as I was hoping

Learn how to maximize graphics performance on different platforms with Unity 6.3LTS. Leverage modern graphics APIs like DX12, Metal, and Vulkan, and utilize in-Editor level-of-detail generation. Discover multiple optimizations added since Unity 6, such as the new Renderer User Data for the SRP batcher and optimized post-processing effects. Get p...

▶ Play video
#

glad they covered it