Skip to main content
gamedev.net
🔒 Locked

Camera setup...

Started by krad7 Mar 5, 2004 at 10:44 AM 0 replies 550+ views
Original Post
krad7
krad7
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
Slow and steady wins the race.
neneboricua19
neneboricua19
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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.