Jump to content
  • Advertisement
LifeIsGood

A novel approach to (non-manifold) Dual Contouring

Recommended Posts

7 hours ago, Gnollrunner said:

You will of course generate a better corner as you go down to a smaller grid, but the algorithm can never guarantee a perfect corner, unless you have some way of subdividing unevenly which creates a another whole complexity.

This is the primary reason that most of the fancier isosurface extraction algorithms operate on an octree, rather than a uniform grid.

Dual contouring on an octree is still (relatively) straight forward, and you can vary the resolution locally to capture fine features, while not blowing out the polycount in areas with a lower rate of change.

Share this post


Link to post
Share on other sites
Advertisement
On 7/1/2018 at 9:00 PM, swiftcoder said:

This is the primary reason that most of the fancier isosurface extraction algorithms operate on an octree, rather than a uniform grid.

 

For my stuff I'm already using an octree.  IMO the octree stuff isn't so bad. It's the chunking that's the killer.  Stuff like getting the normals to all match up on the edges of chunks can be a bit tricky.  Then if you want to allow for both smooth shading as well as sharp transitions it gets even worse.  :P

Share this post


Link to post
Share on other sites
12 hours ago, Gnollrunner said:

It's the chunking that's the killer.  Stuff like getting the normals to all match up on the edges of chunks can be a bit tricky

That another area that Dual Contouring implementations tend to punt on. If you wave your hands and say "we have hermite data", then the normals come from the underlying surface data, and this problem doesn't really exist.

Of course, most of us don't really have hermite data, and one can only get so far via central-differencing...

Share this post


Link to post
Share on other sites

I have adjusted the algorithm a little to address the problem with sharp features like corners.

If the vertex has been smoothed out, I'm pretty much just taking the smooth vertex, averaging all the normals together (let's call this new vector A) and interpolating from the smooth vertex position in direction A to find a point lying on that line, where SDF (point) = 0.
Also, I had to add a little bias to the new found vertex, but I guess that's just precision problems since I'm using floats right now.

The average of the normals is represented by the black lines in the video.
https://www.youtube.com/watch?v=C8s3rpk4pZw&feature=youtu.be

I'll have to do some more testing to see if this new solution works for the general case.

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

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