[vtkusers] Access polydatas vtkFloatArrays from shader materials

Meister, Martin MM (E F CI C5 5) martin.meister at siemens.com
Mon Feb 25 10:52:15 EST 2013


Thanks to Gerrick Bivins for initial help


-> unfortunately I am still stuck in how to access a polydata's data in a shader, I try to render the data as RGB, as a test, sending it from vertex to fragment shader:

Attached is the code, in python. Any of the shader and VTK programming gurus out there willing to take a look?


Help greatly appreciated,
I am really missing a tutorial with a simple example that shows how you can access data from a vtkpolydata in a shader.


Thanks,
Martin

PS: shader based on sandia's phong

________________________________
Von: Meister, Martin MM (E F CI C5 5)
Gesendet: Freitag, 22. Februar 2013 11:54
An: vtkusers at vtk.org
Betreff: [vtkusers] Access polydatas vtkFloatArrays from shader materials

Hello vtkusers,

I am looking for documentation on how I can access a polydata's float arrays from a shader material.
Is there an example that demonstrates this?

I did a test with a polydata and points float array that I mapped the "normal" way as colours per point. Then I changed to a material phong shader and wonder, how I can get the colours from the array back (applicationuniforms ?). Now, I only see the geometry with the specified "diffusecolor" of the property.


Thanks for any hints,
Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130225/2a40639d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: material_test.py
Type: application/octet-stream
Size: 2056 bytes
Desc: material_test.py
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130225/2a40639d/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PhongAtt.xml
Type: text/xml
Size: 3254 bytes
Desc: PhongAtt.xml
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130225/2a40639d/attachment.bin>


More information about the vtkusers mailing list