At the moment the project contains two executables, Main which generates a terrain:
And the NiftiyTest where to play arround with constants:
Explanation of constants:
Geometric Error
This is the tolerated geometric error that decides whether to split the node of an Octree into eight children or not.
Smaller Geometric Error generates a more detailed mesh.
MaxClampedAbsolutDensity
This limites the values the density grid is allowed to have.
A small value and less Octrees are split.
0 is no limit.
maxCellSize
The width of a cell cannot be smaller than this value.
minSplitDistanceDiagonalFactor
Don’t split the OctreeNode if nothing is inside.
maxMSDistance
Value for Marching Squares to fix cracks between chunks with level of detail
I read a bit more and dual marching cubes sounds pretty nice:
(This image compares the source (upper left), the marching cubes version (lower left), the dual contouring version (lower right) and the dual marching cubes version (upper right).)
Hm, the dual methods both use a Quadtrees and it seems to be difficult to implement this into a minecraft style world.
Marching Cubes has problems with sharp edges.
It seems that Castle Story does not use such a method at all.
They divide each block in 3 parts in the height. Now they use different variations of ramps.
(http://imageshack.us/a/img826/1492/beztytuuwxc.png)
I’d love to try out dual marching cubes, but I haven’t been able to find an implementation for it that I can understand how to use I’m curious how quick dual marching cubes creates the meshes… it might take longer to calculate a mesh with fewer polygons, negating some of the net performance gains. Let me know if you figure anything out…
Hi, I am back and at the moment I port the Ogre Volume Dual Marching Cubes to JMonkey.
I think I am allowed to share the code with you because Ogre is open source, am I?
Terrain with marching cubes:
Terrain with dual marching cubes (there are some small mistakes but most of it is working)
If you’re reimplementing, you’re free to publish anyway. There’s no copyright on algorithms.
Patents are different, they allow you to publish an algorithms but you’re required to obtain a license before you can run a patented algorithm. (Yes that’s silly. Google for “software patents” to appreciate the full silliness.) Marching Cubes used to be patented under U.S. law, but that patent expired 2005 so this one is in the clear.
<cite>@ogerlord said:</cite>
Hi, I am back and at the moment I port the Ogre Volume Dual Marching Cubes to JMonkey.
I think I am allowed to share the code with you because Ogre is open source, am I?
I’d love to help out with this too. Can you upload it to another site, like MediaFire? I don’t trust anything that says it can’t work in Chrome Incognito mode…
What about an IRC Channel (or something similar) for better communication?
I notice I get more and more stuck and not that everyone is waiting for the others to make new commits.