Accessing material and pixel properties in UV mapped 3D regions of interest for mine-craft like game world

I am currently generating some search paths using vtkCutter with vtkPlane for surface contours near object texture material(s) imported with OBJImporter

My preliminary first try with libvtk is a simple test of a libvtk 9 contours example

My current plan is to use a vtkRectilinearGrid point proximity to these 2D planer contour paths to decompose into a set of voxels which incorporate the predominant material/texture properties on the local 3D model surface (area of texture RGBA + material opacity).

However, I am unsure where to start for:

  1. constrained search on a 3D region of interest
  2. accessing the material and pixel properties in UV mapped 3D regions of interest
  3. setting RGBA + material opacity voxel stack locations efficiently (like a mine-craft game world)
  4. handling nested translucent surfaces (like a jellyfish)
  5. easier consistent auto-scaling filter

I plan to use a pixel Histogram of a 3D search region of interest around the contours aligned nearest to a defined vtkRectilinearGrid coordinate. And in a differing approach from the marching cubes examples, generate an index of separate colored/translucent 3D cubes that approximate the original textured model (similar to coloring a point cloud in other libraries).

My current plans seem overly complex (only have a week of holidays), so I thought there must already be a simpler way of getting the same functionality from a mature slicer library.

The goxel project doesn’t really handle the data I wish to use for my project.

Any advice or hints would be welcome =)


Due to the the lack of consistency in how texture data is handled, pointData data may be stripped off by default. Note the VTK textbook does not make it clear which relationships may be reliably chained.

For further details see to repo: vtkTransformTextureCoords.cxx

And specifically enable the preservation of texture coordinate information:

vtkNew clipper;

clipper–>PassPointDataOn(); //trivial iff you already know the pipeline is lossey

Good luck fellow travelers, you are going to need it with this library =)