Jump to content
  • Advertisement
Sign in to follow this  
frankhevans

Chicken-n-egg situation in Mesh simplification

This topic is 3789 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've hit a chicken-n-egg situation in Mesh simplification. I have a large array of vertices, CustomVertex.PositionColored[80000]. I'd like to construct and simplify a mesh. The SimplificationMesh seems to work well, but its constructor requires an existing mesh. When I try to create a mesh with more than 64000 vertices I get an exception. I've read there's an upper limit for meshes (DirectX 9.0c). I can write code which iterates over the Vertex array and constructs meshes in blocks of 32000 vertices, simplify each one, then then merge them back together. Is this the right approach?

Share this post


Link to post
Share on other sites
Advertisement
80k vertices should be little over a megabyte of storage so I'd imagine your problem is with the indices - are you specifying that you want a 32bit mesh rather than the default 16bit one?

If that's a dead-end then yes, splitting and merging is a reasonable option but the best one would be to implement your own simplification algorithm. It tends to be a quite popular aspect of computer graphics so you'll find plenty (albeit cryptic) resources online - maybe even a ready-made algorithm you can port from C to C# if you're lucky...

hth
Jack

Share this post


Link to post
Share on other sites
jollyjeffers:

Yes, the "MeshFlags.Use32Bit" did the trick. Funny how long I've lived with a perceived limitation on VertexCount. Lots of doors were just blown off their hinges. Thanks very much!!!

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!