Improve vertex formats

Create issue
Issue #23 new
David Williams created an issue

PolyVox currently provides two vertex formats (PositionMaterial and PositionNormalMaterial) and this should be more flexible. In particular:

  1. Vertex formats could store the positions as integers/chars where this makes sense (e.g. with the CubicSurfaceExtractor).
  2. More control is needed over which properties of a voxel get copied into the vertex data, and an appropriate format should be used. Differentiate between renderable and non-renderable properties, so that colour, material id, light intensity, etc could be copied across while health and physical properties would not be.

Also consider that if a mesh is being generated for physics purposes (i.e. a collision mesh) then we may want the physical properties but not the renderable ones.

We already have some relevant work in the cubiquity-version branch, but there is still a lot of work required to do this properly.

Comments (2)

  1. David Williams reporter

    A lot of improvements have been made here (see CubicVertex and MarchingCubesVertex) but it is still not as flexible as the system described above. Further work would therefore still be interesting.

  2. Log in to comment