Please help to solve this problem:
I use 2 maps - light map and AO (Ambient occlusion). When only AO is applied I see that it works well, it adds shadows in the corners. When I add a light map, AO no longer has any effect. AO can be turned off - no difference.
Link to the project: PlayCanvas 3D HTML5 Game Engine
Hi @Palya30 and welcome,
That may be the expected outcome, usually lightmaps will include color and shadows (with ambient occlusion included).
@mvaligursky may know more on this.
I think @Leonidas is correct.
When you do not have lightmaps specified, the rendering uses ambient light setup in Settings->Rendering. And the ambient light is “darkened” by the ambient occlusion.
But if you use lightmap instead, that is used a a replacement of the ambient light, and so the occlusion is not used - as no ambient is added.
But I think ideally it would still apply it on lightmaps, I don’t see why not. But it does not currently. Feel free to request this feature here: Issues · playcanvas/engine · GitHub
But don’t count on this being done very soon - bake your AO into your lightmaps for now.
Was playing around with the Archviz Example,
The AO (gloss based) and lightmap both effect the scene, so if you have a prefiltered cubemap on a material, and the AO is gloss based, it will effect the gloss at the edges and the lightmap as usual is being used for lightmapping.
Check this video, so both AO and lightmap can work together