Questions tagged [marching-cubes]

An algorithm for creating a triangular mesh from a three-dimensional scalar field, or graphing an implicit function of the form f(x,y,z) = c.

Marching cubes is a computer graphics algorithm for creating a triangular mesh from a three-dimensional scalar field, or equivalently, graphing an implicit function of the form f(x,y,z) = c.

For more information, see:

144 questions
2
votes
1 answer

Three.js Render not getting cleared after using ImmediateRenderObject

I am trying to mask a 3D scene with another 3D scene. I managed to get it working with regular THREE.Mesh objects as shown below: The main scene has a bunch of low poly spheres. The mask scene has a red cube. Both scenes are passed as textures to a…
imbrizi
  • 3,788
  • 1
  • 25
  • 26
2
votes
2 answers

Error in Geometry Shader from large array

When I try to link my Geometry Shader it throws the following error: 0(76) : error C5041: cannot locate suitable resource to bind variable "triTable". Possibly large array. In reference to this array declared in the shader: const int…
Alex Coats
  • 115
  • 2
  • 16
2
votes
2 answers

Marching Cubes Issues

I've been trying to implement the marching cubes algorithm with C++ and Qt. Anyway, so far all the steps have been written, but I'm getting a really bad result. I'm looking for orientation or advices about what can be going wrong. I suspect one of…
BlastDV
  • 143
  • 5
2
votes
3 answers

C++ Marching Cubes Algorithm Explanation

I am trying to understand how the marching cubes algorithm works. Source: http://paulbourke.net/geometry/polygonise/ What i don't understand is how do you calculate the "GRIDCELL" values. To be exact the double val[8]; part is not clear for me…
Playdome.io
  • 3,137
  • 2
  • 17
  • 34
2
votes
0 answers

Fast volume representation, modification and polygonisation

I am looking for ideas for algorithms and data structures for representing volumetric objects. I am working on a sculpting system, like sculptrix or mudbox, and want to find a good implementation strategy. I currently have a very nice dynamic…
DaleyPaley
  • 201
  • 2
  • 11
2
votes
2 answers

What is the difference between marching cube and octree?

Is octree a special case of marching cube ?? I mean does octree use same triangulated cubes of marching cube. I know that octree is a 3d form of quadtree. I just want to know whether I am in correct direction or not. After the tree have been…
solti
  • 4,339
  • 3
  • 31
  • 51
1
vote
1 answer

Proper density functions for Voxel-based terrains?

I've managed to implement the Marching Cubes algorithm in C#. Up to now I've tried the algorithm to render a sphere. That's an easy one because the density function is not very complex to code. But now I want to get the algorithm to go further and…
user32004
  • 2,203
  • 3
  • 17
  • 17
1
vote
0 answers

Weird Lighting on Marching Cubes mesh in Unity3D

I'm working on an implementation of the Marching Cubes algorithm in Unity. I just implemented smooth shading to my mesh and now I'm getting some weird lighting effects. I'm new to this algorithm and I admit I don't really know what I'm doing to well…
1
vote
0 answers

Marching Cubes not rendering properly after n cycles

I have an issue where I made a marching cubes algorithm and it works perfectly, up until rendering an arbitrary cube n, where n is dependant on the dimensions of the render area, where any cube after n renders in a seemingly random location. It…
JimMcTim
  • 11
  • 2
1
vote
0 answers

Marching Cubes Algorithm not Registering a Point's Value

I am generating a sphere with the marching cubes algorithm, the sphere is split up into chunks and whenever I try to terraform near a chunk border, instead of a bump being added to the sphere a rift forms on the chunk border breaking up the bump…
Whatever
  • 21
  • 5
1
vote
1 answer

How to generate 3D mesh from a numpy binary mask

I did a 3D segmentation of an organ in a 3D volume of data acquired in CT. The output of the segmentation is defined as a binary 3D ndarray, where 1 is inside the organ, and 0 is outside the organ. What is the best tool to extract the surface of…
BayesianMonk
  • 540
  • 7
  • 23
1
vote
1 answer

Read and index data from .raw volume file with Java

I am working with volume data in raw format. I think that it is basically a 3D matrix of voxels that I want to load into a 3D array. I have no experience with this, and I’m unable to find much information on how it is done. My main problem is that I…
1
vote
1 answer

one int variable works as an array index but another one doesn't

I'm working on a marching cube compute shader in unity at some point i need to find an index so that i can make vertices by connecting those edges here is the code uint cubeIndex = 0; for (int i = 0; i < 8; i++) { if (cube[i].isInside == 1) …
1
vote
1 answer

Sorting of vertices after intersection of 3d isosurface with plane

Here is another geometric problem: I have created an 3-dimensional triangulated iso-surface of a point cloud using the marching cubes algorithm. Then I intersect this iso-surface with a plane and get a number of line segments that represent the…
stef
  • 69
  • 3
1
vote
1 answer

Marching cubes not creating expected meshes

I have been trying to implement marching cubes in unity with c# but the meshes that are being created all have a rotation that is off by 90 degrees. in this example I am trying to create a cube. this is my current code that I have if any one can…
Paradox
  • 13
  • 2