[vtkusers] LIC on unstructured surface grids in 3D, texturing questions
Markus Ringlander
makkan at gmail.com
Sat May 27 20:19:15 EDT 2006
Hi vtk-users,
I will do my MSc thesis in scientific visualization, and specifically
the task is to do Line Integral Convolution (LIC) on unstructured
surface grids in 3D. I am supposed to use VTK for this task. After
having studied the online documentation for VTK, and done searches on
this mailing list, I have a few wonderings I hope someone can shed a
light on. Let me try to explain them.
The basic technique I will use for this 3D surface LIC is to generate
a texture for each polygon in the grid. I have seen examples on a few
texture mappings, where one can assign texture coordinates to vertices
of the polygons building up the grid. In the end one uses
actor-SetTexture(...). But all examples I have seen refer to one
sample image/texture as source.
In my case, I am going to traverse the elements in the grid, and
generate a 2D texture/image for each element. So I will have many
separate textures.
A bit simplified, I was thinking something like this:
1) Read my unstructured grid from a file.
2) Iterate through each polygon in the grid.
3) For each polygon in the iteration, perform the LIC algorithm on it,
which here gives a texture as output for each polygon.
4) Map texture coordinates from this specific image/texture to the
corresponding real world polygon.
5) Back to 3)
6) Output the whole textured grid on the screen.
As I stated earlier, I have only seen examples of a single actor for
texturing, refering to a single image/texture file. In my case I am
wondering if I need to set up an actor for each texture I create? It
can then be over 10,000 textures...
Please help me with some information wheather this is doable in VTK,
and if so, any helpful code snippet for the assignment of the textures
to each polygon.
Thanks!
/Mark
More information about the vtkusers
mailing list