PDA

View Full Version : how to convert 3d to 2d



mithun_daa
11-04-2003, 11:55 AM
i have 3d view volume in one window. i need the same scene as a 2d map on the second window as though lookin from top. how can i convert the 3d to 2d other than using a 3d ortho projection?

Coconut
11-04-2003, 12:16 PM
what's wrong with 3d ortho projection?

mithun_daa
11-04-2003, 12:45 PM
when i zoom in into the ortho proj, i can still c some depth information, i can c the peaks n stuff, i want just a map. a 2d image which showz me the whole scene.


Originally posted by Coconut:
what's wrong with 3d ortho projection?

mithun_daa
11-04-2003, 12:46 PM
also when i zoom in it has to be just one plane, like a map and not the real world.


Originally posted by mithun_daa:
when i zoom in into the ortho proj, i can still c some depth information, i can c the peaks n stuff, i want just a map. a 2d image which showz me the whole scene.

virtualchetan
11-04-2003, 01:33 PM
U can do 3d orthographic projection from top and use the 'screenshot' as the map (using an external program or glReadPixels / glDrawPixels).

The problem u mentioned about 3d ortho projection is not because of ZOOOMING IN, its because of TRANSLATING THE CAMERA TOWARDS THE SCENE,

'Zooming in' means reducing FOV( Field of View) and not moving the camera.


Hope that helps,

- Chetan

jwatte
11-04-2003, 01:43 PM
That's exactly what Ortho projection is.

There is no "zoom" in Ortho, there's only widening/narrowing the viewing rectangle, and moving it around. Specifically, when you move the rectangle closer to some object, that object will NOT get bigger on the screen, if you're using an Ortho projection.