guycalledfrank / bakery-issues

Bug tracker for Bakery
4 stars 0 forks source link

MonoSHSpecGraph missing reflection in URP. #161

Closed othercrow closed 1 month ago

othercrow commented 1 month ago

The Bakery MonoSHSpecGraph shader is missing reflections in URP.

Possibly relevant:

Here's a quick comparison of the URP Lit shader vs MonoSHSpecGraph. They should both be reflective. bakerypls

guycalledfrank commented 1 month ago

I'm not really supporting MonoSHSpecGraph anymore. All the separate graphs were merged into BakeryURPLit which is easier to use (and easier to debug/fix). You can grab latest URP graph updates here: https://geom.io/bakery/wiki/index.php?title=Bakery_-_GPU_Lightmapper Set BakeryURPLit mode dropdown to MonoSH, and it should do the job (reflections included). Can you check it?

othercrow commented 1 month ago

image Ok thanks I upgraded and swapped everything to BakeryURPLit. Reflections are back but shadows in the reflections seem overly harsh on metallic objects. Are there recommended settings for the section I've marked in red? All of my materials are variants of the one shown here.

othercrow commented 1 month ago

Possibly relevant: Lightmaps disappear often after loading a scene or moving an object. Loading the scene again restores them. Before moving the highlighted pot: image After moving the pot slightly: {7B11C7E1-E34B-47E5-877C-7BF928DED942}

othercrow commented 1 month ago

Solved the problem with too-dark reflections. There seems to be an underlying bug (with Unity?) that causes Reflection Probes that previously had custom cubemaps to not respect switching back to Baked type. So no matter how many times I baked reflection probes, objects were still getting the custom cubemap reflections from several weeks ago.

This fixed it:

  1. Select all Reflection Probes.
  2. Change Type from Baked to Custom.
  3. Set Cubemap: None.
  4. Change Type back from Custom to Baked.
  5. Bake reflection probes.

Still having issues with lightmaps in general loading as black the first time but that's a separate issue.

guycalledfrank commented 1 month ago

Reflections are back but shadows in the reflections seem overly harsh on metallic objects.

Metallic surface are basically full-reflection. If you use "Lightmap specular as reflection occlusion", you narrow the reflection with SH specular mask... and there is no diffuse to fill the void. If the only thing you got is the reflection, then occluding it leaves nothing. So really it shouldn't be used with metallic surfaces.

Lightmaps disappear often after loading a scene or moving an object. Loading the scene again restores them.

Do you, by any chance, have "reload scene" disabled? https://geom.io/bakery/wiki/index.php?title=Troubleshooting#Lightmaps_disappear_on_play

There seems to be an underlying bug (with Unity?

OH! I didn't know that.

Still having issues with lightmaps in general loading as black the first time but that's a separate issue.

Can you check if it's still the case even when using the latest github patch?