Camera Zooming Effect

Started by
3 comments, last by paparoach 19 years, 6 months ago
Hello to all of you, I have to develop a project which is called the radar simulator. I am not a guy of computer graphics but i have learned alot of D3d during my project period. I have developed the camera which works fine with my requirements that are as follows, (this all done with keypresses) 1. camera rotates with its axis of rotation. 2. camera translates and can be at any place in my scene and then rotates lying at the exact position which translation gave, this means no revolution. 3. camera can move in the direction where it looks. Now related to my problem, the camera zooming effect. I have to only zoom the camera (just like the real camera zooms) with not changing the position of camera. Press 'I' When the camera zooms In, it has to be as the near objects should look more bigger in size and the objects at distance should look more bigger than before. After zooming I have to rotate the camera and/or translate having the camera zoom effect still there. Press 'K' then camera zooms Out. Any help is appreciated. Thanx in advance. Note: Development is being done on VC++ and DirectX 8.
I RuLz tha GamE...
Advertisement
Lower your projection matrix FOV.
to implement zoom, the simpliest way is to narrow the field of view in you projection matrix give a good zoom :)
What real cameras do when you zoom, is change the field of view angle, so, yeah, that's how you do it in graphics too.

Note that when you narrow the field of view, your sky box and similar far-away art start needing really high resolution textures to look good. If looking good isn't a priority, or you don't have a skybox, this of course won't be as much of a problem.
enum Bool { True, False, FileNotFound };
thanx for the posts u guys done...
infact I used this a long ago but i was'nt using it in my render function :)
well thanx all of u guys anyway
I RuLz tha GamE...

This topic is closed to new replies.

Advertisement