[vtkusers] Hatching

Wes Turner wes.turner at kitware.com
Wed Sep 17 11:27:51 EDT 2008


There is also vtkProjectedTexture that works like a slide projector to
"Project" textures (calculate texture coordinates) onto actors.  If your
Polydata is largely oriented normal to a particular view direction, or can
be broken up into a small number of actors each of which is largely normal
to a particular view direction, this can be quite useful.  You can use a
small pattern, as David suggests, then turn RepeatOn on the vtkTexture
object to repeat the pattern across the entire PolyData.

- Wes

On Wed, Sep 17, 2008 at 10:41 AM, David Gobbi <david.gobbi at gmail.com> wrote:

> Hi Ben,
>
> It is possible, but AFAIK there isn't an easy way to do it.  You would
> have to apply a texture, ideally just a very small texture with a size
> of around 16x16 that can be tiled to create the pattern that you want.
>  The trick is that, in order to get it to display nicely, you will
> have some work ahead of you to properly compute and the set texture
> coordinates for the polydata.  VTK's own texture coordinate
> computation classes (vtkTextureMapToPlane, vtkTextureMapToSphere) are
> meant for applying large textures to polydata, rather than small
> hatching-pattern textures.
>
>   David
>
>
> On Wed, Sep 17, 2008 at 10:31 AM, Ben Held <ben.held at staarinc.com> wrote:
> > Is it possible to display a hatching on a vtkPolyData?  I'm thinking just
> a
> > simple cross hatching.  Any pointers?
> >
> >
> >
> >
> >
> > Ben Held
> > Simulation Technology & Applied Research, Inc.
> > 11520 N. Port Washington Rd., Suite 201
> > Mequon, WI 53092
> > P: 1.262.240.0291 x101
> > F: 1.262.240.0294
> > E: ben.held at staarinc.com
> > http://www.staarinc.com
> >
> >
> >
> >
> >
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
> >
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



-- 
Wesley D. Turner, Ph.D.
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x120
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080917/3444aaae/attachment.htm>


More information about the vtkusers mailing list