Hello,
I'm using PolyVox since quite a lot of time and it works like a charm, however I hit a problem since last week.
I'm using PolyVox 0.2.1 and the CubicSurfaceExtractor, everything worked fine until I started to introduce seams in my terrain, and since then I started experiencing random crashes that were pointing to SurfaceMesh::removeUnusedVertices in release mode.
After quite a lot of struggle I was able to export one portion of the terrain that is giving me the problem and edit the BasicExample to reproduce it.
In debug mode, it hits the assert in CubicSurfaceExtractor::addVertex
This is the main.cpp of the BasicExample with my modifications (sorry for the mess, I tried to replicate my internal code as close as possible but it was quite hard to decouple it from my application):
http://pastebin.com/cMj4J8BCTo reproduce the issue you will need this file where I saved the raw data from the volume in my application:
https://www.dropbox.com/s/q5ijkgxjbfabbo8/test.dataI hope you can help me with the issue since I don't know much about the internals of the library, maybe I'm doing something wrong?
Thanks in advance, and if you need any additional information just ask.
EDIT: I forgot to mention I changed type of the material in PositionMaterial from float to uint32_t since I had some precision problems under certain circumstances, and changed the line 263 of CubicSurfaceExtractor.inl to
Code:
if(m_meshCurrent->getVertices()[q1.vertices[0]].getMaterial() == m_meshCurrent->getVertices()[q2.vertices[0]].getMaterial())
to accout for that, but I tried changing it back and it gives the same problem.