MarchingCubes Example. Where is the geometry used for the scene?

I am interested in using a the MarchingCubes class for a project I am developing. I have a few questions about how it interfaces with the scene.

  1. I don’t see a geometry object which along with material is used by a mesh handed to the scene. Where is this?

  2. In notice that for large grid sizes (greater the 32) the palette and normal-caches get humungous. What are these? How are they used? My usage of MarchingCubes of for a static object so I don’t need the caching. Can remove them?

There is no geometry object since THREE.MarchingCubes is derived from THREE.ImmediateRenderObject. These are special 3D objects which are rendered in a fast code path by WebGLRenderer. However, it is necessary to manage the raw buffer data within the object. Because of this, the class is intended for advanced users.

Unfortunately, there is not much documentation so it’s best if you debug the marching cube example in detail. I can’t answer your other question since I would have to study the code first.

Actually. I found what I needed. The method generateGeometry() is what I was looking for.

1 Like

So - presumably - I can using MarchingCube as a triangle generator and then using the generated geometry directly. Just a matter of taste.