Sign in to follow this  
Flimflam

Landscape engine idea using D3DXMesh

Recommended Posts

I've actually been posting quite a bit in different forums with different questions that ultimately lead to the same project... I was wondering if it was possible (or logical) to create a landscape engine around a D3DXMesh class. To better explain, say I have a vertex and index buffer made by hand, that uses a heightmap to set heights for each point, etc. Now I was wondering if it was possible to convert these elements to a D3DXMesh, then convert THAT to a D3DXSPMesh, so I could increase/decrease the overall quality of the landscape at will (to reduce the extreme high quality, although I would not be changing it constantly, mainly once apon load.) Would using this method be illogical?

Share this post


Link to post
Share on other sites
Yea, that sounds ok. A lot of people like to roll their own mesh structures, simply for customization purposes. Also, many have a multiple implementations of a mesh - for example, a CharacterMesh, TerrainMesh, ect. Usually, the only problem with this is when you want to use the D3DX geometry APIs - then its a pain to create a new ID3DXMesh, copy in your data, run the routine, and then copy it back out again.

However, if you don't forsee any limiations with using ID3DXMesh, go for it. Just be aware that terrain rendering usually has some pretty specific algorithms that may be bulky to use with it.

Share this post


Link to post
Share on other sites
Hi,

You should do some tests befor using this interface. First, you need to now if you'll see "popping" artefact when vertices are collapsed. Then, you should know how well it performs with a lot of vertices (a terrain usually is pretty big. If not, you can brute force render it, then ^^)

Unfortunately, the new mesh viewer don't offer the possibility to convert a mesh to SP mesh and then play with the number of vertices, so you'll have to write some code (or find an older version of the viewer) to test it :(

Share this post


Link to post
Share on other sites

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