Hi,
I have a problem in a gltf scene that uses pbr materials.
Some additional obj meshes are loaded
If I don’t define an hemispheric light, obj meshes are rendered as black.
The problem adding an hemispheric has impact on the gltf scene highlighting.
Is there a way either in modifying obj materials or other method to be able to render these obj files without adding an hemispheric light ?
Regards
The light has an array of excluded meshes that you can push meshes onto and they won’t be affected by it. For example here the box mesh is affected by the HemisphericLight but the imported model isn’t (you can see on line 44 where I excluded it). Another solution could be to use a separate scene for the meshes that need the light…
But also I might be misunderstanding and a playground showing the issue could help us understand and help fix it better.
The objects will appear black because they think there is no light, so it’s like being put into a pitch-black room. If you don’t want to add any lights within Babylon you can use an environment texture: Using An HDR Environment For PBR | Babylon.js Documentation or you could bake out the lighting you currently have in your scene (in a 3d editor like Blender). The latter will be more time-intensive and tedious depending on your lighting environment, but if done right it’ll look great and be performant.
You could also use the albedo texture (color texture) for the emissive texture as well and it’ll essentially be self-illuminated. This is easier than baking but may also affect the overall look because things like roughness or metallic values may be overpowered.