Jump to content
  • Advertisement
Sign in to follow this  
pernyblom

Marching Cubes result to indexed mesh issue ("Solved")

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

Hello!

I have just implemented the "vanilla" Marching Cubes algorithm and now I want to make a nice indexed triangle mesh from the result. The algorithm that I implemented just outputs all the triangles separated without any point sharing and I really want to share points.


I see two possible ways out of this:

1. Use a general method for joining points with some spatial index perhaps. Somebody knows a good structure/method for this?

2. Use a smart indexing scheme for the edges when performing the Marching Cubes algorithm. I have thought about this but every solution I come up with seems to complicated. Has anyone done this and live to tell about it?


/Per

[Edited by - pernyblom on July 14, 2010 2:23:12 AM]

Share this post


Link to post
Share on other sites
Advertisement
I went for solution 1 and preprocessed the triangles with a KD tree for checking duplicates/close points. It seems to scale up reasonably well but an index scheme would be much better.

Anyway, this issue can probably be considered solved. At least from my point of view :)

Share this post


Link to post
Share on other sites
On a related note (I have marching cubes up and running also) I want to know if stream-out buffers are relocatable. That is, after generating the triangles for all the voxels in a chunk, can I write the stream out buffer to disk, load it back in later, and have DrawAuto() work with it?

(I suppose this is really a DirectX question)

Share this post


Link to post
Share on other sites
I couldn't get DrawAuto() to work with a streamed in buffer (from disk) as I wanted, although since the buffer size is known at that point, I can draw the streamed in buffer triangles using regular Draw(fileSize/sizeof(gsOutput), 0).

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!