[vtkusers] texture mapping problem

Rex.Schilasky at contiteves.com Rex.Schilasky at contiteves.com
Thu Jul 26 09:24:34 EDT 2001


Hi,

    I have a problem in understanding the
    texture mapping method. I try to map
    the bitmap image "vtk.bmp" on an actor.
    The actor based on a vtkPolyDataMapper,
    which is based on a
    vtkStructuredGridGeometryFilter. If I map
    the texture on the actor, the actor gets white
    (background color of the image) but I cant
    see the vtk logo. How can I scale the texture ?
    Should I scale the texture ?? :-)

    Here is a part of the code

    ...

    set dimensions "4 3 1"

    ...

    vtkStructuredGrid sg
    eval  sg SetDimensions $dimensions
      sg SetPoints points

    vtkStructuredGridGeometryFilter sggf
      sggf SetInput sg

    vtkPolyDataMapper pdm
      pdm SetInput [sggf GetOutput]

    vtkBMPReader bmpreader
      bmpreader SetFileName "vtk.bmp"

    vtkTexture texture
      texture SetInput [bmpreader GetOutput]

    vtkActor actor
      actor SetMapper pdm
      actor SetTexture texture

    ren1 AddActor actor

    ...


    I'm a beginner in VTk, but it's a really great
    framework.

    ThanX ReX






More information about the vtkusers mailing list