Sign in to follow this  

3D environment modeling for DirectX

This topic is 4380 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 3D 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
You need to use some sort of spatial partitioning method, which basically means that only immediately relevant parts of the environment are sent to the renderer. For example, it doesn't make any sense for something that's a mile away to be even considered for rendering if the camera can't see that far, or for you to try rendering the inside of a building if you're looking at it from the outside (with the exception of windows, but still certain parts won't be visible). Popular data structures includes BSP trees, quadtrees, octrees, and a host of others. BSP trees are useful for small detailed indoor environments, while quadtrees and octrees work better for larger outdoor environments. Of course you can mix and match various techniques to suit your needs.

Share this post


Link to post
Share on other sites
I agree with the above and you can also try using LOD for you geometry (different level of detail depending on distacen from viewer).
Might be a good idea to optimize the mesh (D3DXOptimizeFaces and D3DXOptimizeVertices) and there is a tool from nVidia as well.

You really need a good scene manager.

Share this post


Link to post
Share on other sites
Here are some tips to begin with:

1) As others stated the first most important part of a 3D engine regarding performance is VSD ( Visible Surface Determination ). System data bus is usually the bottleneck and the speed of transfering data from memory to Graphic Card is much less than manipulating data residing in Graphic Card memory. Aside from that, Graphic Cards ( like everything else ) have limits. The moral of the story is, you should avoid populating bus unnecessarily. The sooner you discard unnecassary data, the more processing power is freed.There are numerous algorithms to help like Binary Space Partitionanig (BSP), Portals, Quad Tree, Using Bounding Boxes and so on ...

2) Try using bump mapping instead of using high number of polygons to achieve realastic look. It's crazy to model a character or an object with 40 thousand triangles while a few hundred one + bump mapping can achieve the same results. This really helps alot if you need good looking scenes.

3) Try to batch function calls, state changes and alike. Batching is the key to success!

4) Using better algorithms. Algorithms, algorithms, algorithms ... That's all computer science is about. It's what most people understimate. I can not emphasize this enough! You should know what data structure to use and what algorithms to apply.

There are alot more to optimization like using SIMD instructions, using efficient memory management, tweaking the code using API specefic parameters ... but those above are the more important ones.

best luck
GoodKnight!

Share this post


Link to post
Share on other sites

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this