最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

javascript - Getting started with marching cubes in three.js - Stack Overflow

matteradmin2PV0评论

I am new to Three.js and looking for a tutorial to get me started on how to use Marching Cubes in three.js. Some of the projects I have seen so far in three.js which use this are a bit plicated for me, so a simple tutorial would be nice.

Thank you.

I am new to Three.js and looking for a tutorial to get me started on how to use Marching Cubes in three.js. Some of the projects I have seen so far in three.js which use this are a bit plicated for me, so a simple tutorial would be nice.

Thank you.

Share Improve this question asked Dec 18, 2011 at 9:36 miki725miki725 27.9k17 gold badges108 silver badges122 bronze badges 2
  • 1 I don't know about adapting it to three.js but there is marching cube code here if you want to try webglsamples.googlecode./hg/blob/blob.html – user128511 Commented Dec 18, 2011 at 19:43
  • I wrote a marching cubes algorithm in Javascript, to draw isosurfaces. Are you still looking for that? – Stéphane Laurent Commented Jul 25, 2018 at 14:46
Add a ment  | 

3 Answers 3

Reset to default 8

Like yourself, I was looking for a non-metaballs example of the Marching Cubes algorithm -- I am particularly interested in graphing implicitly defined surfaces. Since I couldn't find one, I wrote an introductory Marching Cubes example that uses Three.js and posted it at:

https://stemkoski.github.io/Three.js/Marching-Cubes.html

For more details on the theory, you should check out the article at

http://paulbourke/geometry/polygonise/

I looked at three.js and their marching cubes demo. It seems to have been built specifically for rendering meatballs :-) I started fresh and copied over the lookup tables and rewrote the main functions and linear interprolation methods and got a new working engine working. My advice would be to do a rewrite yourself (it took me some time), but it will be a lot easier to integrate your own code with this new implementation. Especially, if you want to do more than just meatballs with a single texture. I actually used this site polygonize more while trying to understand the Al Gore Rhythm.

Here is a video of it in action -> http://youtu.be/_oML6USPs20

You can track the release date here highdensitygames.

I'll be releasing the source once I release this game in the Chrome App marketplace. I'm not so sure it will help you though. It would be just like looking at the three.js source. You will need to dig in yourself with your own implementation. Good luck!

Maybe not quite a tutorial but the 3 dreams of black demo has a metaballs sample with source

Post a comment

comment list (0)

  1. No comments so far