Custom Lightmaps on material


I’m trying to get my head around what format to use for custom lightmaps assigned to Standard material. Last, we used png’s with an alpha channel, but now I see these file are huge. Do we have to use an alpha channel or can they be flat aswell? (if so, what background color to use, black white or 50% grey? can they be Greyscale instead of RGB? The documentation is sparse on this point.

Greyscale flattened files would save us a LOT of space.

Hi @bjorn.syse,

I don’t think alpha is used anywhere for lightmaps, give a plain jpg file a try. Even though you can use a grayscale color scale for your lightmaps WebGL textures should always contain at least RGB color channels.

But you can always pack your lightmaps together each on a different channel to save space. The Playcanvas standard material allows to select the correct color channel each time.

Also don’t forget to use texture compression to save VRAM.

1 Like

Great, thanks!

Ok, perhaps I should turn them back to RGB then. I was struggling with the correct way to remove transparency in photoshop, placing black behind or white behind but nothing did the trick. For anyone wondering, this would be the way to do it:

  1. Layer -> Layer Mask -> Layer mask from transparency

  2. Right click mask -> Disable layer mask

1 Like