dominikwodniok / dualmc Goto Github PK
View Code? Open in Web Editor NEWSimple C++ implementation of the (manifold) dual marching cubes algorithm from Gregory M. Nielson
License: BSD 3-Clause "New" or "Revised" License
Simple C++ implementation of the (manifold) dual marching cubes algorithm from Gregory M. Nielson
License: BSD 3-Clause "New" or "Revised" License
It seems that the gentables.h file is missing in the repository.
Can you maybe check this?
Your screenshot looks like surface nets?!
For my 261x131x137 volume the result exhibits strange distortions:
Every second z-voxel-layer is empty and the y-voxels seem to be duplicated.
If i scale the grid up to 261x261x261 it works flawlessly.
Do you have any idea what may cause this?
Hi, I really like this marching cubes. Especially that it outputs quads rather than triangles.
But I am having trouble with using this library to generate tiled output. I always get holes in between tiles (or overlapping triangles on seams). Could you please help me? I have prepared a simplified example app.
https://github.com/malytomas/dualmc-tiles-test/tree/master
This is a really great Manifold Dual Marching Cubes implementation!
How would you extend buildSharedVerticesQuads
to update only a subsection of its quad&vertex output instead of exporting everything at once?
I want to use dualmc to make an editable Voxel terrain system that updates small parts of a large terrain in realtime.
For example, a data set of 512^3 would be divided into 8x8x8 chunks, and editing the iso of a voxel at location (0,0,0) only updates the mesh output for (0,0,0) to (7,7,7).
Some pseudocode for chunk processing:
int32_t chunkx = 0;
int32_t chunky = 0;
int32_t chunkz = 0;
int32_t chunksize = 8;
....
void DualMC<T>::buildSharedVerticesQuads(
VolumeDataType const iso,
std::vector<Vertex> & vertices,
std::vector<Quad> & quads
)
....
for(int32_t cz = 0; cz < reducedZ; ++cz) // iterate voxels
{
for(int32_t cy = 0; cy < reducedY; ++cy)
{
for(int32_t cx = 0; cx < reducedX; ++cx)
{
int32_t x = cx+chunkx; // offset chunk size
int32_t y = cy+chunky;
int32_t z = cz+chunkz;
x = CLAMP(x,chunkx,chunkx+chunksize);
y = CLAMP(y,chunky,chunky+chunksize);
z = CLAMP(z,chunkz,chunkz+chunksize);
x = CLAMP(x,0,reducedX-1);
y = CLAMP(y,0,reducedY-1);
z = CLAMP(z,0,reducedZ-1);
// is this parallelizable?
// can each voxel be processed separately?
CalcDualPoint(x,y,z,
iso,
vertices, quads);
}
}
}
How would you allocate the vertices&quads output vectors once, to the max mesh size needed for a given resolution, then later reuse those same vectors, quickly updating only a small chunk of the mesh output at a time?
Any help would be appreciated, thank you again for the awesome library!
Hi, this is a brilliant Dual MC implementation, thanks for sharing it!
According to the original paper, Dual Marching Cubes should have two-manifold output, but running the caffeine example non-manifold output is generated. (T junctions can be found around the side molecules)
I suspect that the table could have some value(s) off, how was it generated? I'd like to have a go at adjusting the table values to make it generate clean meshes ;)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.