#Thanks for your help! I used to use on
1 messages · Page 1 of 1 (latest)
Mixed lights are less performant than just realtime lights
They're the option for highest quality but least flexibility
Your lightmap resolution is also quite low, and your GPU should be plenty powerful
Just how many of those meshes are actually lightmap static
If the grasses and bushes are included in the bake, it'd be no wonder it's taking ages
I feel you might've skimmed over my advice about light probes
Is there something confusing about them?
You will need light probes anyway, even if your static objects were all using lightmaps
Again I appreciate so much your in-depth replies! I didn’t really skim over the advice I have no clue what light probes are but planning to do research to see
You’re saying that mixed lights are less performant than overall realtime? The weird thing is that I had everything on bake except the directional light and it looked great
I have like hundreds of grass objects and trees in the scene which is why I am trying to find the best way to render lighting
Every single tree and grass entity is static in the scene 💀
Mixed lights are both realtime and baked, realtime for direct lighting and baked for indirect lighting
Note that Baked lights are previewed in editor as Realtime until lighting is generated
If every blade of grass is lightmap static, it'll be included in the bake
And baked lighting totally sucks at small and detailed geometry
If they also are set to receive GI from lightmaps (as they by default are) every last bit of them must be mapped to the lightmap texture
Which isn't practical at all
It helps to think of light probes as points in space where lighting is stored during baking, as opposed to storing it onto pixels on the lightmap texture
That lighting can then be interpolated to nearby objects so they can be lit by baked lighting without requiring lightmaps
That's the only way to allow baked lighting to light up dynamic objects
But it's also very useful to let objects be lit with baked light without requiring lightmaps for them
My remedy here would be to place probes and set the trees to receive GI from probes, as their great surface area and curvy geometry makes them ineffecient for lightmapping
Then also to exclude all the plants and other small objects from lightmap staticness entirely
Are you sure about that? I'm still relatively new to Unity, but this runs counter to a lot of the reading and experimenting I've done so far - mind you all in HDRP.
My understanding of mixed lights was that they're somewhere between realtime and baked for performance as they use lightmaps for static objects and then real-time light/shadow for dynamic objects. Only the real-time part updates every frame.
What am I missing?
There's no mixed lighting mode that would work like that, that I know of
https://docs.unity3d.com/6000.0/Documentation/Manual/LightModes-choose.html
I'm just reviewing this.
All three mixed lighting modes light static objects with realtime direct lighting and baked indirect, incurring the cost and limitations of both
But the interaction with shadows differs
Ok. Looks like I have some learning to do as I'm still missing something.
Shadowmask and distance shadowmask modes are more expensive than realtime and baked combined, which is what the baked indirect would do
Although baked lighting alone is usually a cheap part of the calculation
The way the features are listed for them doesn't really give you an idea what they do
Oh boy I know a lot less about lighting than I thought I did
Thanks. I think I need to go back to the HDRP Lighting topic and redo the whole thing because this goes against what I thought they were driving at.
I’m using URP for this proj but I don’t think that changes anything
Not for our purposes
Yeah, sorry for hijacking your thread temporarily.
So use Gi and light probes for the trees and disable the grass static option to reduce bake times
Does baking lights really improve performance that much compared to real time lighting if I only have one directional light?
It seems like a lot of work for the baking process as opposed to just ticking real time
this is how long it took yesterday with a resolution of 15
It is a lot of work to set up to work right, and whether it helps performance really depends on how big of a drain realtime lights are for your target device
It's also the only way to get bounce lighting or areas that are occluded from ambient light
Probably over 90% of the lightmaps and the bake time are all your plants and other tiny objects
dark spots are where the lighting failed im assuming from what you said is where we need the light probes
also seems to have some kind of fog, when i get closer to the object i see its lighting but further away its black
Could be LODs
Each LOD level would get different lightmaps (which is another nightmare for bake times and sizes)
Light probes are kind of terrible for large objects, since they're per object (which Adaptive Probe Volumes aim to fix)
yeah it said online to use the volume ones over probes if ur saying a render pipeline
APVs are in nearly all ways better than Light Probe Groups
But are newer and less stable, have more device limitations and more complicated to set up (but also less work due to their automatic nature)
which static setting do i disable from the plants?
to avoid them being baked
or a setting here perhaps?
"Contribute Global Illumination" in the mesh renderer or
"Contribute GI" in the static dropdown
ill tick the first option only as its easier to make them all have that
They should be 100% the same setting, just in two places for some reason
if i disable GI, does it make them all dark when baking?
since they wont be included in the baking?
(sorry for the stupid qs im just tryin learn 💀 )
Baking is the raycasting process of figuring out where light is bouncing when you Generate Lighting
Meshes that do not "contribute" to it are invisible during the process so they are treated as dynamic for lighting purposes
That means they are lit by realtime and mixed lights as well as light probes
but what if my lighting source is only on baked? now its on mixed
but if it was only on baked would that mean that no real time would contribute
i have this setting off here for real time
even though i have my light on mixed, is that ok 💀
Realtime GI is 100% different system
it bakes a whole another set of lightmaps, which are also exclusive for static geometry
Confusing isn't it
Dynamic (non GI static) objects are lit by realtime lights, realtime part of mixed lights and light probes
So if you've only got Baked lights, they can light dynamic objects only via light probes
im acc gonna pass out
so real time GI is a no no here
so if i dont include it in the bake, unity will do some dynamic magic?
💀
No magic, light probes
i dont have any light probes in my scene yet AND the confusing part is when i had my directional light on real time i had real time global illumination on OFF but it was still lighting it up without baking
Realtime lights are totally unconcerned about whether there's baked lighting or not
interesting
well yeah that makes sense
no clue with that realtime global illumination thing is but i wont touch it 💀
Smart, I'd say
if i dont put light probes my grass will be dark? 😭
Unaffected by any baked light, yes
yeahhhhh thanks for your help again, i shall dive deep in this lighting bs
Good luck!
What helped me was to make a lot of very simple tests
Baked and otherwise
For lightmaps you'll surely need to know about the scene view debug modes
https://docs.unity3d.com/Manual/GIVis.html
And the lightmap troubleshooting guide https://discussions.unity.com/t/lightmapping-troubleshooting-guide/895352
Even though those aren't explicitly related to Light Probe Groups or APVs
Either one of which you'll need going forward
Note that LPGs are designed to supplement lightmaps, while APVs can even replace them in many scenes
so ive been playing around, i disable all global illuminators from the grass, somehow after baking all the grass have lighting? is that from the mixed lighting as it lights up using real time the non static objects? I did not put any probes yet
They will be lit by mixed lights
If you have no probes, they'll probably fall back to using the scene's environmental probe generated from the sky
im assuming that would be horrible for performance?
Not really
Cheaper than having probe groups I expect
But it ignores occlusion and kind of defeats the purpose of baking lights anyway
Have you considered not baking lights at all and using a simple lit shader for your materials with your one realtime light
It seems like there's no practical difference between you using one realtime light vs mixed light + baking while sidestepping all the potential visual benefits of baking
im a total bozo but these assets are from synty so im just using the material they come with 😭
Which is probably URP Lit
Simple Lit works the same, just cheaper and uglier when that fits the need
yeah i just want to have simple lighting but when i have real time vs mixed i dont see performance improvements ngl
I certainly wouldn't expect any
You would rather compare realtime vs baked
And consider the Simple Lit shader
playing around with light probes as volumes are only unity 6> and it seems to be ok? idk. I disabled all trees and grass from global illuminator (only let the big meshes like huge rocks and terrain)
am i placing those orbs correctly? im not getting any shadows on the trees but that might be becaused im using baked indirect
shud i place probs that way across the whole path?
You don't need nearly so many
Especially to begin with
If the light and shadow do not change between the two points, the probes would be identical
so in the space can i get away with only 4 probes?
for some reason it seems that those probes are affecting the whole world not just the trees next to them
is this a better amount?
Enough to get an idea what the effect of them will be
When interpolating lighting from probes, objects use the nearest probe 1-3 probes
No matter how far they are
yeah i made all the trees and signs and grass use light points over the lightmaps
and left lightmaps for the bigger stuff
ive been looking for many hours and im struggling to understand
im using mixed over real time and when i use mixed it gives shadows like realtime did
i thought it would not since the trees are static and should use the probes for lighting data
Only in subtractive lighting mode
Like I said it'd probably be better for you to compare realtime and baked results and performance first
Mixed lights are a level more complex than the two
Baked is better performance wise but the results look atrocious (I know it’s a skill issue)
I wouldn't mind seeing it
Could advise whether it's an "expected" awful, or "problem" awful
I’ll send some pics once home, thanks
It'll at least prevent from the realtime part of the light from covering up problems there might be
Like there’s no shadows (maybe I put a very low light res) and the dynamic car has no shadows either which is expected but looks weird
I made all trees and grass get light from the probes instead of a light map
Only issue with light probes is I did so much research and everyone explains how you’re supposed to put them when the light changes while each tree has a shadow that would take 10 years of placing
The trees themselves can only utilize one average of nearby probes, so they don't that much care for accuracy
I assume your ground is lightmapped so probes don't matter for it
And if your game is a driving one characters won't get to wade among the trees anyway?
So in your case you should be able to have a probe every 20 meters or so to begin with, then create tighter clusters where they're needed
Many probes can be selected and duplicated at once
In scenes where precise placement is critical and the distances are both huge and complex, a script for probe placement will be very useful
(which is what APVs aim to fix by their nature)
Ahh I see so I can get away with less probe accuracy. I have my probes every 5 or so meters now
My ground is indeed light mapped the mesh is at least
Regarding this my mixed light was using shadow mask not subtractive, once I get home i will bake my scene with only a baked directional light so I can show
Could be worse, considering
Baked shadows will always be of much lower resolution than realtime, but especially in soft lighting conditions can be adequate
The main problems seen there are because the ground's mesh topology is really not clean
And there's a lot of lightmap area on the ground that has no shadows at all, so it's not doing anything other than hogging up resolution space
If you were really leaning into baked shadows, you could cut the ground into regions that have different lightmap resolutions, so the resolution is much higher where there's shadow
yeahhhhh the ground was a mess to model
i think im juwst gonna take the performance hit 💀
But you probably won't be leaning into purely baked lights so it's not the first choice
Another thing this test tells me is that baked lightmaps are barely doing anything for your scene
The light comes down from fairly directly up, so almost everything is evenly lit
yeahhhh
That means you're not seeing much any of baked lighting's advantages
so if my light is on real time, do i need to bake? because if i dont bake the scene is all dark (since i deleted the baking data)
Which means you might as well go just realtime if you were planning to go with mixed
Since mixed just adds complexity and expense for no visual gains here
yeah it makes sense im gonna go real time like before but should i be ch eckng the realtime global illumination
You need to Generate Lighting but with baked and realtime GI checkboxes off
so we are still baking
Well, the definitions get fuzzy at this point ^^
Baking usually refers to a raytracing process
Generating with no either type of GI doesn't do that, it just renders the skybox into one global reflection probe and "ambient" light probe
The scene gets dark because without that one probe there's no environmental light at all
"Realtime GI" is another raytraced lightmapping system, very similar to baked GI in most ways
The difference is that lightmaps from it react to realtime lights
It can be pretty great since it's capable of simulating dynamic bounce lighting from a sun that rotates in a day night cycle
But it's technically precomputed so the light applies only to static surfaces as well as light probes (thus dynamic objects too as much as probes allow)
More expensive to run though, and just as complex as baked GI to set up