[vtkusers] How To Texture Map a patch with vtkGlobeSource

Aashish Chaudhary aashish.chaudhary at kitware.com
Tue Nov 2 11:10:34 EDT 2010


Hi Donny,
- Show quoted text -
I have not used vtkTextureMapToSphere myself but can you try to
generate your own texture coordinates? globe source does produce
normals and in its very simplistic approach  ...

you can have

tx = asin(Nx)/PI  + 0.5
ty = asin(Ny)/PI + 0.5

In a shader you can do it easily.  Not sure why vtkTextureMapToSphere
didn't work. Will find out.

Can you post a snapshot?

On Tue, Nov 2, 2010 at 12:01 AM, Donny <donnyz at charter.net> wrote:
> I have created a globe patch with vtkGlobeSource for the general area of the
> United States (Lat 24 to 50 Deg, Lon -126 to -66 Deg.) using
> SetLatitudeStart, SetLatitudeEnd ….. I also have a .bmp image that
> corresponds to these extents and cannot find a filter to generate the
> texture coordinates for this patch so I can texture it. I tried
> vtkTextureMapToSphere and turned auto generate sphere to off but it only
> displayed a small portion of the image onto the patch. How can I generate
> the texture coordinates for a patch such as this?
>
>
>
> Thanks.
>
>
>
> Donny Zimmerman
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



-- 
| Aashish Chaudhary
| R&D Engineer
| Kitware Inc.
| www.kitware.com



More information about the vtkusers mailing list