Volumes Of Fun
http://www.volumesoffun.com/phpBB3/

Retrieving vertices, normals, and indices from SimpleVolume
http://www.volumesoffun.com/phpBB3/viewtopic.php?f=14&t=630
Page 2 of 2

Author:  RisingForce [ Fri Mar 06, 2015 12:04 am ]
Post subject:  Re: Retrieving vertices, normals, and indices from SimpleVol

Quote:
The CubicSurfaceExtractorWithNormals is removed in recent versions of PolyVox (just CubicSurfaceExtractor is present) so I can't easily test this at the moment.


I saw there was a BitBucket repository and a note that said to take the master branch version but it wasn't changed in two years so I just grabbed the zip. I hope that is okay.

Quote:
That's very strange... does this seem to occur in the PolyVox examples?


I didn't build the examples, sorry. I get 36 indicies(single solid cube) correctly with the following code. So, maybe it's just an issue with only 1,1,1 volume.

Code:
PolyVox::SimpleVolume<Uint8> terrainVolume(PolyVox::Region(PolyVox::Vector3DInt32(0, 0, 0), PolyVox::Vector3DInt32(3, 3, 3)));
terrainVolume.setVoxelAt(1, 1, 1, 255);

PolyVox::SurfaceMesh<PolyVox::PositionMaterialNormal> terrainMesh;
PolyVox::CubicSurfaceExtractorWithNormals<PolyVox::SimpleVolume<Uint8>> surfaceExtractor(&terrainVolume, terrainVolume.getEnclosingRegion(), &terrainMesh);

surfaceExtractor.execute();

std::vector<GLuint> indicies(terrainMesh.getIndices());

for (std::vector<GLuint>::size_type i(0); i < indicies.size(); i++)
{
     Log("indicies", indicies[i]);
     Log("indicies", "\n");
}

Author:  David Williams [ Fri Mar 06, 2015 9:34 am ]
Post subject:  Re: Retrieving vertices, normals, and indices from SimpleVol

RisingForce wrote:
I saw there was a BitBucket repository and a note that said to take the master branch version but it wasn't changed in two years so I just grabbed the zip. I hope that is okay.


That's fine, I was only mentioning it because if there is a problem in that code then it probably won't get fixed, as the code is replaced in the latest version.

RisingForce wrote:
I didn't build the examples, sorry. I get 36 indicies(single solid cube) correctly with the following code. So, maybe it's just an issue with only 1,1,1 volume.


Ok, good, then we will assume it's not a problem for now.

Page 2 of 2 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/