My imported gltf/glb model doesn’t look exactly the same like I have in the blender. I’m not able to understand why it is happening. Did I not export it correctly from blender? Did I need any specific configuration to add on three js?
Am I missing any shading configuration in Babylon js? Or, the exported model missing any shading configurations. I’ve searched a lot but didn’t find any solutions. I’ve just started with Babylon js, didn’t know much. Please help me!!!
Lighting is tricky to get right. In my translation oriented .babylon / JSON exporter for Blender I do a lot of process to get the best approximation. Here is the spot light python section:
I am not sure what is captured from export into GLB interchange format, or how it used on import, but looks like a maybe some of these are not aligned. Even with a direct translation, I did not get particularly close.
Hey, @sebavan Thanks for the response. In the playground example or even in my local code if comment out the createDefaultEnvironment still it doesn’t look the same. If you see in the local code example I’ve given, I’ve already commented on that and just logged the loaded scene.
Even in the playground after commenting createDefaultEnvironment, two of the lights are not visible. It’s gone.
What about the tone mapping and exposure of the light? Can we handle them manually in Babylon?
I think playing with the light exposure and tone mapping could be helpful. What do you suggest?
Please elaborate on this with any example. It’ll be really helpful. Thanks!!!
Krishna_Vishwakarma:
Thanks for the response. In the playground example or even in my local code if comment out the createDefaultEnvironment still it doesn’t look the same.
Just removing the IBL in Babylon is not the solution as Blender is probably using a IBL for the rendering, so you should use the same one in Babylon.js if you want to get a similar display. Also, have you tested your .glb with another viewer (like https://gltf-viewer.donmccurdy.com/ or glTF Sample Viewer)?
Krishna_Vishwakarma:
What about the tone mapping and exposure of the light?
You can manage this in the inspector, when clicking on “Scene”:
Just removing the IBL in Babylon is not the solution as Blender is probably using a IBL for the rendering, so you should use the same one in Babylon.js if you want to get a similar display.
By this you mean, I need to use createDefaultEnvironment using blenders’ IBL configuration, right?
If yes, then I don’t know how to check the blenders’ IBL setting. Is there any way we can see this on the blender?
Do you think that while exporting my model to glb/gltf, I’m missing any settings related to lights/mapping/exposure?
Also, I can now able to manage exposure and mapping using Babylon inspector, but don’t know how to update these settings programmatically in Babylon js. I tried enabling the tone mapping using these commands -
I’m just focusing on how can I set exposure values programmatically on Babylon js.
Krishna_Vishwakarma:
I’m trying to find a solution like how I can give exposure value to my model/lights
I’m not sure if you are speaking about the image processing exposure property (scene.imageProcessingConfiguration.exposure), but we don’t have an exposure value for model/lights, it’s a global setting. Note, however, that you can set a different image processing object per material, so it’s possible to have different tone mapping/exposure/… at the material level.
What I’m trying to achieve is something similar like google Maps does. Like, after certain level of zooming google maps shows the name of the cities. Again, after certain zoom level it shows the name of places.
In my model, I want after certain zoom level I want to show some text labels over the continents. Which will again show more texts on zooming again.
Also, after certain zoom level I want to load a building over the continents and on click of any building camera should move towards them and focus into that building.
Lazy loading the model something like dynamic asset loading.
Do you guys think I can achieve these use cases with Babylon js? Can we have any example related to that in Babylon js? Or what concept should I look into to achieve this with Babylon js?
It would be really helpful, if someone can help me with this. Thanks!
Krishna_Vishwakarma:
Do you think, exporting the model without lights from the blender and setting up lights manually will help me?
I’m not sure, the lights you export from Blender should be exported correctly, you won’t get more control over the lights by creating them manually…
Krishna_Vishwakarma:
What I’m trying to achieve is something similar like google Maps does.
You should look into this forum, I think we had several posts about this subject in the past.