Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Efficiency of Marching Cubes. #18

Open
deadsy opened this issue Mar 6, 2017 · 3 comments
Open

Efficiency of Marching Cubes. #18

deadsy opened this issue Mar 6, 2017 · 3 comments

Comments

@deadsy
Copy link

deadsy commented Mar 6, 2017

For each cube you do an evaluation on the 8 vertices of the cube.
Cubes are adjacent so many vertices will get evaluated up to 8 times - to produce the same result each time.
I borrowed your code for my project and improved it by evaluating and caching 2D layers.
It's a nice speed up if you care about STL generation (which I do).
https://github.com/deadsy/sdfx/blob/master/sdf/marching.go
Thanks for the code!

@fogleman
Copy link
Owner

fogleman commented Mar 6, 2017

That looks awesome. You using this for 3D printing?

@deadsy
Copy link
Author

deadsy commented Mar 6, 2017

3D printing?

Yes. I was frustrated by OpenSCAD and thought that SDFs would be a way to get blended surfaces without too much work. It turns out that SDFs are pretty good value for the code, so I'm pleased by that. I can use pt to do a ray marched render, but these days I mostly just use marching cubes to render straight to an STL. Now I'm looking for a mesh generator that uses less triangles and has less aliasing on edges...

@fogleman
Copy link
Owner

fogleman commented Mar 6, 2017

Yeah, I recently wrote some code to simplify meshes generated via marching cubes, but never got it to a final state. I'd be curious to see if you find a better way.

I see you also wrote a rasterizing software renderer. I did that too recently: https://github.com/fogleman/fauxgl

Are you on Twitter or any other place I can follow your work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants