0
\$\begingroup\$

I am playing around with Unity and lighting is proving to be the most nerve racking thing about it so far. I think I understand the types of light and pros and cons of bake vs realtime but when I do baking the result is always way different from what it looked like in realtime. Some of it I know is because of stiching and overlapping UVs as Unity warns but I think the problem I am facing now is not due to that. The problem is that in realtime I see the lights like this: enter image description here But when baked it looks like this: enter image description here

I can fix the dark regions but I do not know why some lights seem to disapear, they do not actually disapear, they are just to dimm so you have to get really close to see them.

This are the lightning settings: enter image description here

Also I use URP which from what I read has a maximum of 8 lights per object or something like that but the structure is a prefab made from 10 objects:

enter image description here

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

Increase the Lightmap resolution, 128 is rather small for the detail of the rock facets, given the size and complexity of the base meshes.

The overlapping UVs warning is very important.

I will over simplify the actual process for the purposes of this explanation:


There are two "maps" calculated during lighting build passes: light and shadow.

The light pass determines the interaction of the light and the surface point and ignores everything in between.(Dot product)

The shadow pass asks is there anything in between(Ray-trace).

The final product is the light pass(0-1) * the shadow pass(0-1).


There is only one lightmap texture and UV set. If the UVs overlap, the shadow pass sets the brightness to the darkest value at that UV.

For example, a simple cube with overlapping UVs for all faces sitting on the ground plane(no light on the bottom) will appear completely black on all sides in a non-emissive texture.

\$\endgroup\$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.