Michuspo Posted July 29, 2017 Share Posted July 29, 2017 Hi, I'm trying to setup the camera as in a CAD system. I create a video to show you. Also I create a Playground with my setup, but it is not working. Any idea? http://www.babylonjs-playground.com/#HDA7V2 Thanks, CAD Camera.m4v Quote Link to comment Share on other sites More sharing options...
brianzinn Posted July 29, 2017 Share Posted July 29, 2017 I created a scene more or less that looks like your video except for the position.y of the shadow light source. Use the middle mouse button to rotate the view. https://playground.babylonjs.com/#GWK0TQ#8 I noticed you set upVector and useRightHanded system in your PG, but didn't look like those were needed. Quote Link to comment Share on other sites More sharing options...
Michuspo Posted July 30, 2017 Author Share Posted July 30, 2017 Hi Brianzinn, Thanks for your example. It is really nice! Just a point. I need to have the Vertical will be Z instead of Y. What do you recommend? I modify the geometry? Thanks, Quote Link to comment Share on other sites More sharing options...
brianzinn Posted July 30, 2017 Share Posted July 30, 2017 I don't know what kind of geometries you mean. When I export to BabylonJS I use: Forward: -Z forward Up: Y Up. If you are using CSG or your own geometries then you could try to make the mental switch to left handed? Otherwise maybe an example from you... some matrix operations have right-handed options. Depends how you want to modify the geometry - you might get away with a rotation. Quote Link to comment Share on other sites More sharing options...
JohnK Posted July 30, 2017 Share Posted July 30, 2017 Simplest way var myfunction = function(x, y, z) { var myvector = BABYLON.Vector3(x, z, y); //do things } You have to do a bit of thinking to write the code but your users will see a Y up system. Quote Link to comment Share on other sites More sharing options...
Michuspo Posted July 31, 2017 Author Share Posted July 31, 2017 Thanks for your answers. Basically the problem is CAD industry uses Z up, it means that all models, and all devices like 3d scanners. Maybe, I can apply a transformation, but for example, if I need to analyze a coordenate, section, ... I need to switch back the results too. For that reason, I think is easier to use Z+ positive. Thanks, Quote Link to comment Share on other sites More sharing options...
Arte Posted July 31, 2017 Share Posted July 31, 2017 12 hours ago, JohnK said: Simplest way var myfunction = function(x, y, z) { var myvector = BABYLON.Vector3(x, z, y); //do things } You have to do a bit of thinking to write the code but your users will see a Y up system. That's what I'm doing. 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.