guycalledfrank / bakery-issues

Bug tracker for Bakery
4 stars 0 forks source link

[REQUEST] Full lighting that allows realtime highlights #25

Open laurentopia opened 3 years ago

laurentopia commented 3 years ago

RT shadows are too expensive on Switch so they are off Full lighting bakes shadow in lightprobes so you can do a scene without RT shadows but you lose highlights Subtractive gives those RT highlights back but the shadows are no longer baked into the lightprobes so objects look too brights I'm proposing the best of both world: full lighting that lets highlights on

this is subtractive, notice the light probes have zero shadow and the grass is too bright - it needs RT shadows to look proper image

full lighting has shadows baked in probes so the grass looks proper image but you lose highlights image

guycalledfrank commented 3 years ago

In full lighting mode you can have highlights if you also bake directional information (either Dominant Direction or SH mode) and use Bakery shader. For URP there are example shadergraphs included in the package (check BakeryLWRPDirSpec material included in Bakery_ShaderGraphLWRP.unitypackage that comes with Bakery).

For subtractive mode make sure to enable Occlusion Probes: https://geom.io/bakery/wiki/index.php?title=Troubleshooting#Light_probes_are_too_bright_in_Subtractive_mode

This is Unity 2019.3.4, with URP 7.3.1, occlusion probes OFF vs ON (subtractive mode):

image

... for some reason Unity also needs to reload the scene after baking it with occlusion probes, to apply them properly.

laurentopia commented 3 years ago

Thanks, I tried #2 as it is easiest for me and the sunlight which is mixed directional blasts through the lightprobe: image image

laurentopia commented 3 years ago

I tried #1 with full lighting baked, dominant direction on, kept occlusion on and used your LWRP dir spec shader result: no highlight at smoothness = 0.5 or any value but bumpmap works perhaps it's not working in URP 10.1 image image

here is the setup: image image image image

guycalledfrank commented 3 years ago

Thanks, I tried #2 as it is easiest for me and the sunlight which is mixed directional blasts through the lightprobe:

Weird - it looks like your light probe visualization is correct (doesn't blast), but your actual sphere object is not. What shader is on the sphere (and other objects)? In my test scene it was URP/Lit.

Can you send me any test project/package? It's quite confusing.

laurentopia commented 3 years ago

URP/lit as well.

Here is the scene: https://we.tl/t-7UbxMdJFcL

laurentopia commented 3 years ago

(this is on yesterday's bakery)