ercerc Posted July 11, 2018 Share Posted July 11, 2018 Apologies for the rookie question but I am new to 3D graphics and to BabylonJS. I have successfully created a model from custom meshes through the Babylon APIs. The model displays but parts of it disappear and reappear depending on the relative position of the model and the camera. Here's a sample: https://geekart3.azurewebsites.net/babylon.html If you watch the model rotate you see pieces appearing and disappearing. You can also move the camera position and see the same issue. The meshes in the model do not change, they are only generated on load. I am digging in to see if I can solve it but any pointers as to what may be wrong would be welcome. Enrique Quote Link to comment Share on other sites More sharing options...
MarianG Posted July 11, 2018 Share Posted July 11, 2018 Hi @ercerc and welcome! Here is an 'easy to debug' version. And to avoid that flickering, I just removed alpha from vertex, see line 38. But I don't know if this is the expected result. Quote Link to comment Share on other sites More sharing options...
dbawel Posted July 11, 2018 Share Posted July 11, 2018 @ercerc Welcome to the forum! We all ask rookie questions from time to time. And we're glad you're asking, as we love new devs.? Just adjust your clipping planes for your camera(s) by using: camera.minZ = 'babylon world unit numerical value'; and camera.maxZ = 'babylon world unit numerical value';. DB Quote Link to comment Share on other sites More sharing options...
dbawel Posted July 11, 2018 Share Posted July 11, 2018 @ercerc Now that I read @MarianG's response, I took a look at your scene. I would first try to set the rendering group ID by using the .renderingGroupId attribute. Here is a link to the docs below: https://doc.babylonjs.com/resources/transparency_and_how_meshes_are_rendered#rendering-order DB Quote Link to comment Share on other sites More sharing options...
ercerc Posted July 11, 2018 Author Share Posted July 11, 2018 Thanks much for the prompt help! I'll take a look and try to take it from here. Enrique Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.