Jump to content
  • Advertisement
Sign in to follow this  

3D urban environment modeling for DirectX

This topic is 4716 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

My idea is to make desktop application capable of rendering large urban environment using DirectX APIs. I am using 3DS MAX for modeling. DirectX programming is used to put rendering/ interactivity / Collision detection etc. I tried to render some small model with DirectX, but while rendering my camera moves very slow. It also consumes lot of hardware time. The number of polygons/vertices/faces is large. please suggest me what are the parameters that I should consider while modeling the environment. Is 3DS MAX good for modeling 3d world used for DirectX. How I should make polygons / map textures etc while making 3d urban environment so that it runs smoothly with DirectX APIs?

Share this post

Link to post
Share on other sites
Any modelling package that exports polys can be used to create nice realtime 3D worlds - so no worries about that [smile].
Regarding rendering performance and number of polys per scene - there is no definite answer to that.

Modern graphics hardware is capable of pushing millions of textured triangles per frame at reasonable (read >25fps) framerates.
Most applications are CPU-bound so I guess the problem isn't geometry, but the number of draw-calls and state-switches.
Try to log the number of triangles you send to the graphic card per frame and measure the number of frames per second. Multiplying the framerate with the number of triangles per frame gives you the number of triangles per second.

If this measure (triangles per second) is below 1,000,000 triangles (depending on your gfx card this number can be much higher or only half that figure) you could have too many draw calls or state switches.
Optimisation step number one is batching geometry. Draw as many polys as possible per call to DrawIndexedPrimitives. Also sort your geometry by shader and then by texture.

Once you've done that you can get further improvements by using culling techniques such as octrees, quadtrees and occlusion culling (the latter should give you a big performance boost, since you render urban environments).
Also make sure you render front to back and clear your z-buffer as well as your colour buffer using Clear().

Check out some of the performance optimisation guides by NVIDIA: Performance Guides sorted by date and ATI: GDC 2005 Presentation, ATI-sponsored GDC 2005 session about performance optimisation in Direct3D.


Fixed a typo.

[Edited by - darookie on December 20, 2005 12:31:04 AM]

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • 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!