babylon’s lightmap seem’s very different with other engine.
By default the lightmap and the model’s color are added together to calculate the final color.
The ambient light and IBL both affect the model color but not the lightmap.
So if the IBL intensity (i.e. envirment intensity) is 0, only the lightmap color will be displayed.
I thought lightmap is an additive of the ambient light color would be more reasonable, like threejs dose. The object will be illuminated by the lightmap in black ambient light.
babylonjs:
// _____________________________ LightMappping _____________________________________
#ifdef LIGHTMAP
#ifndef LIGHTMAPEXCLUDED
#ifdef USELIGHTMAPASSHADOWMAP
finalColor.rgb *= lightmapColor.rgb;
#else
finalColor.rgb += lightmapColor.rgb;
#endif
#endif
#endif
#define CUSTOM_FRAGMENT_BEFORE_FOG
threejs:
#if defined( RE_IndirectDiffuse )
#ifdef USE_LIGHTMAP
vec4 lightMapTexel = texture2D( lightMap, vUv2 );
vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;
irradiance += lightMapIrradiance;
#endif
#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )
iblIrradiance += getIBLIrradiance( geometry.normal );
#endif
#endif