Using a light map as the only light contribution

Hi all, I am probably missing the obvious here, but I have a scene with a single object that has a lightmap and a single pbr material assigned to object. My goal is to not include any lights in the scene since all of the lighting information should be coming from the lightmap. I still would like the metallic contribution to come from the env map though.
My question would be what is the correct way to set a scene up for my use case, or is having a light in the scene required?

If you have scene.environmentTexture you don’t need any lights for PBR materials.
Still there will be some lighting information in .env texture.

Thanks Labris. That’s correct. However, I am trying not to effect my lighting beyond the lightmap itself and essentially only augment reflections with the scene env.

@CanvasGadget Can you create a playground with an example?

I think you can use reflectionTexture on the PBR material to do this, but @sebavan will know better.

I think @MackeyK24 does this in the unity plugin, but I can not remember the exact combination he is using ???

I think you would need to set your lights to not * but add with material.useLightmapAsShadowmap

You will also need to prevent harmonics to contribute diffuse in PBR.

and finally you might need to change the lightmap mode on the analytical lights in your scene to SHADOWS_ONLY

2 Likes

Hello @CanvasGadget just checking in if you need any more help?