Orthographic Camera not normalized

Jan 28, 2011 at 2:11 PM

As I look into using the Orthographic Camera, I am finding that it is not normalized and does not pan and zoom in an expected fashion.  Has anyone used the Balder.Orthographic camera?  If not, is there anyone out there that can help me to extend it and implement it correctly?

Jan 29, 2011 at 11:24 PM

I'm having a bit of trouble getting to grips with this concept myself. I know I started the implementation of it, but can't quite understand my intentions behind it and what I was trying to accomplish myself. 

But I did however find that the Matrix method that creates the ortho projection matrix was faulty, it was mixing handedness and doing things wrong. I've fixed that and at least it should act as expected. For the Camera and its behavior, I'm not sure what to implement. 

Maybe you could go more in-depth on what you're feelings are for its functionality - right now all it does is change the ProjectionMatrix from a Perspective based to a Orthogonal projection matrix (Orthographic) - http://en.wikipedia.org/wiki/Orthographic_projection


Also worth mentioning - the implementation of the Matrix creation is based upon Direct3D and left handed coordinate system : http://msdn.microsoft.com/en-us/library/bb204940(v=vs.85).aspx

Jan 30, 2011 at 1:02 AM

Let me look at and see if the issues that you found will change that much.  I have been experimenting with it.  There are two things that I would like. One is proper scaling.  When I render a model that is one hundred units wide in a 600 unit wide viewport, the model takes up 1/6 of the viewport.  If I add a way to input the width and height that I want to display, forcing the model to fill the viewport, then mouse selection goes out the window, because the viewport coordinates for the model is still in the 1/6 screen area of the original camera view.  When I do scale the image, pan is working, but zooming will need to have a version for an orthographic camera, which is independent of z.


I can send you images directly for you to see what I am seeing. 

Jan 30, 2011 at 1:32 AM

I had actually already found that, along with a slightly different normalization that factors down a little differently.  The overall result is nearly identical.  I will send you some images.  When it is forced to display the model fito to viewport, it looks very nice.