Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Camera setup...

This topic is 5345 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I want to create an isometric view of my 3d terrain (like in warcraft 3 or age of mythology), so i set my lookat vector of my cam to g_globalCam.SetLook(D3DXVECTOR3(0.0f, -1.0f, 1.0f)), i see my terrain is iso-metric, but my FPS falls down to around 50''s, but when i revert back my lookat vector to g_globalCam.SetLook(D3DXVECTOR3(0.0f, 0.0f, 1.0f)); my FPS goes higher than 70.. i''m guessing its because of the additional view space transformation. so is there any work-around so that i can create an isometric view of the terrain and not loose around 20FPS? any suggestions would be greatly appreciated. thanks

Share this post

Link to post
Share on other sites
It doesn''t have anything to do with what your view matrix is. The reason for the drop in performance is probably because many more objects are in your field of view when the camera is looking down than when it is looking horizontally.

When your camera was horizontal, many of your objects were not actually rendered because they ended up being outside your field of view. But when you look down, many more objects become visible. That''s why you see a drop in performance.

To get around this, you''ll need to implement some optimizations. First thing you should do is minimize texture/shader/material changes. Draw all of the geometry that uses the same texture first, then switch textures and draw the geometry that uses that texture, etc...

Another simple optimization that should help is viewport culling. A more advanced topic is to store your object into some sort of space partitioning structure (like a BSP or an Octree) and only render the objects that are visible by the camera.

All of these topics have been discussed here in the forums. Do a search and you''ll find all the info you need.


Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!