isometric projection or orthogonal oblique projection

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Yohanna
Posts: 25
Joined: Sat Dec 11, 2010 2:12 am

isometric projection or orthogonal oblique projection

Post by Yohanna »

Hi all,
I wonder if I can use Irrlicht to project a scene as an isometric projection or orthogonal oblique projection with specific horizontal and vertical angles. At the moment I am trying to simulate the oblique orthogonal projection by calculating a new look at point or target point in relation to the horizontal and vertical rotation angles while the camera position stays the same. I suppose the orthogonal projection will be in parallel to the normal of the image plane, so if I changed the target point then the normal of the image plane is the same as the line starting from the camera location and ending in the target point, for this reason if we changed the target point to a location so that the normal to the image plane makes the required horizontal and vertical angles and then we project the scene orthogonally as usual, in this approach the resulting projection will be equivalent to the isometric projection or oblique projection with the selected angles.
I would be grateful if you recommend an alternative easier way to get such a projection or just to advice me about my way whether or not it is correct and simulates the required projection.
Many thanks
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: isometric projection or orthogonal oblique projection

Post by mongoose7 »

I don't know if I understand you correctly. But for an isometric view, you would need to set the camera to orthogonal projection, not perspective projection. You would have a clear "up" vector as your world is really flat, yes? So, as long as you keep the angle of the camera with the up vector the same (usually 120 deg), you would retain the isometric view. You could translate the camera freely, but only rotate around the up vector.
Yohanna
Posts: 25
Joined: Sat Dec 11, 2010 2:12 am

Re: isometric projection or orthogonal oblique projection

Post by Yohanna »

Thank you Mongoose7,
your idea is what I am looking for, I need to rotate the camera around a vector such us up vector. I wonder if there is any function to do this rotation for me. I could not find such a function therefore, I calculated new coordinates of the target point so that the vector starting from the camera to the new target point makes an angle with the vector between the camera and the old target point. This angle is the required rotation angle in the case when the camera rotates around the up vector which is generally different to (0, 1, 0).
Is it correct what I have done? Is that equivalent to the rotation around the up vector? If not is there any function to do that for me instead of reinventing the wheel?
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: isometric projection or orthogonal oblique projection

Post by mongoose7 »

I don't know that I can help you. I find the descriptions of the camera functions to be unclear.

I can suggest you try

Code: Select all

 cam->setRotation(irr::core::vector3df(0, n, 0));
If it behaves well, it should rotate the camera 'n' degrees around the Y-axis.

If this doesn't work, you can investigate bindTargetAndRotation, but I can't make any sense of the description.
Post Reply