Hey there.
Lately I've been playing with polyvox, and decided to try out Dual Contouring ( I merged it from it's branch with master ).
As the controller I decided to try and use DefaultMarchingCubes controller. It didn't work and I had to make the "get" functions be constant in the mentioned controller class. That solved it.
Then, I've found out that dual contouring forces voxel type to be a double (?), so I've tried to feed it with SimpleVolume<double>, but no dice - I couldn't get any vertices / indices generated, even after filling the volume with data ( I've set the doubles to either 10 thousand, 50 thousand or 1 ). I'm not really sure how do thresholds and density work together, but I just wanted a cube.
My question is - does dual contouring really work with doubles only? What about materials, then? (I couldn't supply it with MaterialDensityPair44, as it required the density to be signed, so I tried to feed it with MaterialDensityPair<int16_t,8,8>, but I was getting some other kinds of errors. Not really fixable to me )
If yes, what data (double values) do I give to it so that it actually generates something? (what density)
And lastly, is it possible to include material id along density value with dual contouring?
Sorry that it's so many questions about an under development feature, but I'd really like to try it.
|