• Advertisement

Archived

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

Camera setup...

This topic is 5103 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
Advertisement
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.

neneboricua

Share this post


Link to post
Share on other sites

  • Advertisement