Visam Posted December 8, 2016 Share Posted December 8, 2016 Hi I am importing a scene from .babylon file usung the method BABYLON.SceneLoader.ImportMesh What is the best way to calculate camera.maxZ and camera.minZ for the loaded mesh? What is the best way to recalculate camera.maxZ and camera.minZ during zoomin in/out to avoid clipping the mesh? Brg Mikhail Quote Link to comment Share on other sites More sharing options...
RaananW Posted December 9, 2016 Share Posted December 9, 2016 Hi iTekVR, (is the "i" coming from the apple i, or the "me" i? or maybe from high-tech? Just wodnering) It depends on many many factors. The size of your mesh, it's scaling, the distance of the camera from the object, how many other objects are there, would you actually like to have some clipping? The way I see it - if you just loaded your mesh, you look at it, and it is clipped, something is wrong. Your units might be wrong. Before playing around with z clipping, try scaling your mesh down a bit, try positioning your camera somewhere else, see if that helps. But! without seeing what you are actually seeing, it will be very hard to give a proper answer. Quote Link to comment Share on other sites More sharing options...
Visam Posted December 9, 2016 Author Share Posted December 9, 2016 3 minutes ago, RaananW said: Hi iTekVR, (is the "i" coming from the apple i, or the "me" i? or maybe from high-tech? Just wodnering) It depends on many many factors. The size of your mesh, it's scaling, the distance of the camera from the object, how many other objects are there, would you actually like to have some clipping? The way I see it - if you just loaded your mesh, you look at it, and it is clipped, something is wrong. Your units might be wrong. Before playing around with z clipping, try scaling your mesh down a bit, try positioning your camera somewhere else, see if that helps. But! without seeing what you are actually seeing, it will be very hard to give a proper answer. Hi RaananW Thank you for you answer. I am using FbxExporter.exe to convert FBX file ( https://www.dropbox.com/s/rr8k9brbgdv1e9x/M20.fbx?dl=0 ) to Babylon file ( https://www.dropbox.com/s/381modoxlyivrx2/M20.babylon?dl=0 ). Trying to load the babylon file to the SandBox http://www.babylonjs.com/sandbox/ One problem is clipping the model when I am starting to use arrow buttons. Another one is orientation of the model. If I am opening the original (FBX) file using NavisWorks, I can see the correct orientation. brg Mikhail Quote Link to comment Share on other sites More sharing options...
Visam Posted December 9, 2016 Author Share Posted December 9, 2016 17 minutes ago, RaananW said: Hi iTekVR, (is the "i" coming from the apple i, or the "me" i? or maybe from high-tech? Just wodnering) all together RaananW 1 Quote Link to comment Share on other sites More sharing options...
RaananW Posted December 9, 2016 Share Posted December 9, 2016 I find it odd that the orientation is wrong. About the clipping, the model is probably really big. Which is relative, of course. Try scaling it down, it'll look the same but will avoid the clipping Quote Link to comment Share on other sites More sharing options...
Visam Posted December 9, 2016 Author Share Posted December 9, 2016 12 minutes ago, RaananW said: I find it odd that the orientation is wrong. About the clipping, the model is probably really big. Which is relative, of course. Try scaling it down, it'll look the same but will avoid the clipping If I will scale the model, probably measurements between two points will give me wrong result. We are in the engineering (CAD) area that is why we have to have real coordinates. Accuracy is very important for us. Any other ideas to avoid the clipping? It seems that orientations in NavisWorks and Babylon are different. Quote Link to comment Share on other sites More sharing options...
Visam Posted December 9, 2016 Author Share Posted December 9, 2016 27 minutes ago, RaananW said: I find it odd that the orientation is wrong. About the clipping, the model is probably really big. Which is relative, of course. Try scaling it down, it'll look the same but will avoid the clipping RaananW if I am loading the same FBX model (before conversion to Babylon format) to Autodesk A360 Viewer ( https://a360.autodesk.com/viewer/ , "Upload your design" button), I can see the correct clipping and orientation. I am just trying to set correct clipping and orientation in Babylon to have the same result in Babylon 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.