culeaalex Posted September 12, 2014 Share Posted September 12, 2014 Hello, I want to make a orthographic scene that will use rendered images from 3D Studio Max. Can I set the camera in the same way is in 3D Studio Max scene? Image of the settings attached. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 12, 2014 Share Posted September 12, 2014 Unfortunately right now the exporter only exports freeCamera but you just have to execute this code once the scene is loaded:cam.mode = BABYLON.Camera.ORTHOGRAPHIC_CAMERA;You can then control the view with cam.orthoLeft/orthoRight/orthoBottom and orthoTop Quote Link to comment Share on other sites More sharing options...
culeaalex Posted September 12, 2014 Author Share Posted September 12, 2014 Unfortunately right now the exporter only exports freeCamera but you just have to execute this code once the scene is loaded:cam.mode = BABYLON.Camera.ORTHOGRAPHIC_CAMERA;You can then control the view with cam.orthoLeft/orthoRight/orthoBottom and orthoTop My code:var camera = new BABYLON.FreeCamera("camera1", new BABYLON.Vector3(0, 5, -10), scene);camera.setTarget(new BABYLON.Vector3.Zero());camera.attachControl(canvas, false);camera.mode = BABYLON.Camera.ORTHOGRAPHIC_CAMERA;camera.orthoLeft = 5;camera.orthoRight = 5;camera.orthoTop = 5;camera.orthoBottom = 5;The view is too far whatever I do. I must say I have never worked with 3D before, and I have few to no clues on what to do. Quote Link to comment Share on other sites More sharing options...
culeaalex Posted September 13, 2014 Author Share Posted September 13, 2014 After a night sleep I have found the way to do it.Great script, but very disappointed of the documentation.Can anyone explain what the orthoLeft, orthoRight etc mean? What do they actually do? (I use them to set the orthographic render ratio 16:9 or whatever the canvas size is) Quote Link to comment Share on other sites More sharing options...
Temechon Posted September 13, 2014 Share Posted September 13, 2014 Hi, If you use the search bar, there is an example of what you could have find: http://www.html5gamedevs.com/topic/8712-ortho-camera/?hl=ortholeft#entry51822 Quote Link to comment Share on other sites More sharing options...
culeaalex Posted September 13, 2014 Author Share Posted September 13, 2014 Hi, If you use the search bar, there is an example of what you could have find: http://www.html5gamedevs.com/topic/8712-ortho-camera/?hl=ortholeft#entry51822 I found that answer. Than I had to deduct that somehow is a zoom for orthographic view and also I have to multiply with the ratio of the canvas.And again, no answer on why exactly is there a orthoLeft etc. 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.