3

I have an object made of points, lets say its point cloud, i want to render object from those points, i want object to look like those points were wrapped in a sheet of paper. I want to animate it, so first thing that came on my mind was marching cubes, but my object will not be a ball or cube, it will morph, is there any simpler approach than marching cubes?

Brad Larson
  • 170,088
  • 45
  • 397
  • 571
ZZZ
  • 678
  • 2
  • 10
  • 26

3 Answers3

4

Depending on what you mean by "wrapped" a 3D convex hull may produce the effect that you want.

Animate your vertices however you want and re-run the hull algorithm each time.

genpfault
  • 51,148
  • 11
  • 85
  • 139
  • Marching cubes can certainly work.. it is in essence an algorithm that determines a 3D convex hull. As for animating, I have an instance running in javascript in webgl and even in javascript when I "dig" in my terrain it seems to animate pretty darn quik -> http://youtu.be/_oML6USPs20 – John David Five Dec 24 '11 at 18:02
  • marching cubes are used to generate the iso-surface of the object (given a static or dynamic threshold). It is not necessarily convex. It's not clear whether 'wrapped in a sheet of paper' means convex or not. – killogre Apr 16 '12 at 17:13
3

The Marching Cubes algorithm seems like the best fit to what you're looking for -- not all point clouds are convex. The algorithm may seem intimidating because of the large lookup table, but it is actually pretty straightforward. I have posted an example (using Three.js) at:

http://stemkoski.github.com/Three.js/Marching-Cubes.html

Stemkoski
  • 8,936
  • 3
  • 47
  • 61
-1

This seems like what you're looking for: http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=25

RobinJ
  • 5,022
  • 7
  • 32
  • 61