[vtkusers] Example for vtkProjectedTexture usage

chandan chandan.yeshwanth at siemens.com
Wed Nov 22 06:24:49 EST 2017


Thanks for the example Bill.

I am trying to project 2 different images onto the same object (an STL
actor). Is this possible with vtkProjectedTexture? For simplicity, I am
projecting a simple red square and blue square onto the object from 2
different locations. I set 2 different locations for the vtkProjectedTexture
objects and create a vtkLight at each location as well. The light is
required to create shadows on the rest of the object which is not covered by
textures. However, only the second (blue image) gets projected onto the
object, and this gets illuminated by both lights.

I have tried these approaches - 
- combine the TCoords obtained from both ProjectedTexture objects, by
concatenating the vtkFloatArray objects.
(projectedTexture.GetOutput().GetPointData().GetTCoords()). 
-  reuse the vtkPolyData object returned by
projectedTexture.GetPolyDataOutput()

Both of these gave the same result that I mentioned above.

Thanks,
Chandan



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html


More information about the vtkusers mailing list