#Lighting Difficulties

1 messages · Page 1 of 1 (latest)

teal tiger
#

I'm having some problems with the lighting in my game. The environment of the game is mostly made out of corridors, but there are also some bigger areas. During prototyping I just put some Realtime point lights in the corridor prefabs and that worked. But all those Realtime lights are probably taking up a large chunk of performance, and I'm making a VR game so that isn't smart. It also looks weird when you bring your hand or other item close to the point light that isn't a real light in the game and just in mid-air.

To try and solve this issue I have added those baked area lights to each light panel you see in the corridor, and set all of the lights in the center to mixed. But this looks weird, because I have a lot of dynamic objects in my game and these are still only lit by the weirdly placed mixed lights, so it looks like these are lit differently than the static environment. And it still feels like I'm having performance issues.

In the image you can see the dynamic objects remain dark after baking. The doors are the easiest to see.
Main question: How do I make the lighting look good and still have good performance?
Extra question: Is there a way to use graphic settings so people can tweak some lighting settings if they have better computers?

barren forge
#

First add light probes inside the corridors for real time objects to use

teal tiger
#

You can see the general scene here

#

These bumps on the floor look very bad with baked only lighting

#

These patterns and lines on the wall too.

#

And it's not ony the normal map that's the problem, everything also seems to lose it's shine.

barren forge
#

Hmm perhaps reflection probes will correct this

teal tiger
#

I'll go look into those

teal tiger
#

It improves it a bit, but not much.

#

It also feels a bit reversed?
Image 1 is with baked and reflection probes, Images 2 is mixed lighting.

#

Also, baking caused these weird lines/shadows on some of my objects, do you know how to fix those?

jagged hare
#

Reflection probes would be used with Mixed and Realtime lights just as well, they're not alternatives to it

jagged hare
#

As long as it doesn't cause visual errors, I would prefer to have meshes like that receive baked GI from probes instead of lightmaps

#

Or if they're small enough to not meaningfully contribute to light baking, remove the Contribute GI flag entirely
Baking with small and complex meshes only increases baking time without achieving better shadows

teal tiger
# jagged hare As long as it doesn't cause visual errors, I would prefer to have meshes like th...

Probes only give light to dynamic objects right? I wanna keep all non moving objects static for the occlusion to work.
But I'll try looking into the size in lightmap, etc settings.

But then I still don't know how to make my game look good and have good performance? I understand it's a balance, but right now it looks very ugly. Even in scenes without any dynamic objects or complex meshes.

jagged hare
#

There are many static flags
Occlusion static does not interact with Contribute GI static in any way

#

Dropdown next to the static checkbox

teal tiger
#

Ok thank you!

jagged hare
barren forge
#

is this HDRP or URP? HDRP has some additional light shapes that should be usable realtime/mixed

jagged hare
#

Tag says URP, and the screenshot reveals that as well as that is not the HDRP light explorer

#

HDRP has some features to help with fidelity, but it may not be an option if fast performance is an important goal

#

Its lights also can do only so much if the meshes are blocky and materials plasticy

teal tiger
#

I have added some light probes and the dynamic objects looks good now.

#

My game uses a lot of prefabs to build the levels. Can I just add a light and reflection probe per prefab? Or do I need to do that per scene?

#

I do feel like everything lost it's shine. Is there a way to fix that?

teal tiger
#

Also the reflection probe makes everything look weirdly lit tbh

barren forge
#

Reflection probes will make it more accurate, otherwise they will reflect the sky

#

There are now adaptive probe volumes but I forget what version added them

jagged hare
jagged hare
# teal tiger

You don't need blend distance in this case, so you can set it to 0 and even shrink the volume just enough that the bounds line up with the outsides of the walls

#

Blend distance could in this case cause the walls' reflections to be partially faded out if they're less than blend distance away from the bounds

#

Although specular highlights from reflection probes are not expected to be as accurate as from realtime/mixed lights, they are not expected to be less intense

#

Importantly the reflection probe captures the light sources using their material's brightness, not using light component brightness

#

So it's possible your light components are more intense than the materials of the light fixtures, thus the difference in brightness

teal tiger
jagged hare
teal tiger
#

Ok I'll try messing with that too.

teal tiger
jagged hare
teal tiger
#

Lightmaps are baked per scene yes. But why can't light probes be placed in the prefab.
Btw I don't mean the levels are generated on play, they already exist in the scene, but just use prefabs for easy level building.

jagged hare
#

Generated lighting is per-scene though

teal tiger
jagged hare
#

Looks like you don't need to do the latter

#

As long as your prefabs with light probes are in the scene when you bake

teal tiger
#

Yes they are, I'll go add light and reflection probes to all prefabs and bake in the scene.

teal tiger
#

@jagged hare I added reflection probes to the prefabs and baked this scene. Why does the brightness have a border between the prefabs? Especially visible on that last floor.

jagged hare
#

Otherwise there will be perceptual borders between the probes, and that's what blend distance is for
Box projection only works right if the volume can fit to walls of the room or corridor

teal tiger
#

I'll try turning off box projection and use blend distance

jagged hare
#

Just use one reflection probe per room

#

The lighting is practically the same between probes in that kind of situation so it's a waste to have many anyway

#

Having to deal with more borders and losing box projection are unnecessary sacrifices

teal tiger
#

Do you know where this error is coming from? I'm in a scene with a cleared out lighting data. Didn't bake anything yet.

Reduced additional punctual light shadows resolution by 2 to make 54 shadow maps fit in the 4096x4096 shadow atlas. To avoid this, increase shadow atlas size, decrease big shadow resolutions, or reduce the number of shadow maps active in the same frame
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

#

Ohhh I think lights are making shadows because I didn't bake them yet?

#

If i have a big scene like this, do I still place 1 reflection probe in the center?

teal tiger
#

And why did it not fully bake??

#

It only has some lit up spots, even though there are plenty of lights

#

Lighting settings, incase that's important

#

Oh they're the same lol

barren forge
#

Make sure things you want to receive baked light are set to static

barren forge
#

then perhaps range and/or intensity is too low for all of those lights
things can act weird when scale is wrong too. 1 unit is 1 metre

teal tiger
#

It looks like this in the debug view

#

Scale (on the floor tiles) is 1x1x1

#

They are all unchanged prefabs, so the same.

#

It looks like it's working but it's very dim

#

The weird borders dissapeared when I disabled the reflection probes, so that was the issue. But the scene is still very dim

teal tiger
#

Somehow all the lightprobes from the scene are showing in the prefab editor. Imma take a break lol

barren forge
#

surfaces that are too metallic and smooth appear darker because they are reflecting the sky or reflection probes more

#

Im not sure whats up but sometimes adding a default cube to test can help figureout issues

teal tiger
#

Why don't the reflection probe bounds rotate with the room D:
This is annoying :(

teal tiger
#

Also why are the hall lights so much brighter than the ones in this room? They have around the same settings

teal tiger
barren forge
#

What does the preview look like? Could be the room has nothing bright to reflect so surfaces look dull

#

It's tricky. Realtime light "reflections" are kinda fake so give the wrong idea of what to expect when baking

teal tiger
barren forge
#

Lights don't show in reflection probes, emissive surfaces do.
The reflection probes inspector should let you see the spherical map after baking

#

I don't know if a mixed light will "reflect" on baked surfaces or not

teal tiger
#

All the lights are baked, not mixed

#

So you think the reason the corridors are much brighter is because they have more emissive surfaces?

#

When I bump everything to 50 it get's brighter, but I still don't like how it looks