Missing texture file in vtkTexturedSphere example?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Missing texture file in vtkTexturedSphere example?

BBerco
This post was updated on .
Hi all,

I have been trying to map a 2D texture onto a spherical surface following the tutorial on vtkTexturedSphere

http://www.paraview.org/Wiki/VTK/Examples/Cxx/Texture/TexturedSphere

Unfortunately, no information on the image used in this example (dimensions, image pre-processing , not to mention the actual file) is provided to the user. Applying the example code to an arbitrary rectangular image results in an incorrect results, as if the texture image was wrapped multiple times around the sphere.

I'm thinking that the input file used in the example was probably applied some sort of transform before being fed to vtk. I tried to use the SetScale method in vtkTexturedSphere, to no avail (I honestly don't know which way to look here).

Any advice as to how I could get rid of the wrapping discrepancies when I'm using a rectangular image such as this one ?

Thanks!

Ben



Reply | Threaded
Open this post in threaded view
|

Re: Missing texture file in vtkTexturedSphere example?

Bill Lorensen
Here is the texture for the example:
https://github.com/lorensen/VTKWikiExamples/blob/master/Testing/Data/earth.ppm


On Fri, Oct 28, 2016 at 6:26 PM, BBerco <[hidden email]> wrote:

> Hi all,
>
> I have been trying to map a 2D texture onto a spherical surface following
> the tutorial on vtkTexturedSphere
>
> http://www.paraview.org/Wiki/VTK/Examples/Cxx/Texture/TexturedSphere
>
> Unfortunately, no information on the image used in this example (dimensions,
> image pre-processing , not to mention the actual file) is provided to the
> user. Applying the example code to an arbitrary rectangular image results in
> an incorrect results, as if the texture image was wrapped multiple times
> around the sphere.
>
> I'm thinking that the input file used in the example was probably applied
> some sort of transform before being fed to vtk. I tried to use the SetScale
> method in vtkTexturedSphere, to no avail (I honestly don't know which way to
> look here).
>
> Any advice as to how I could get rid of the wrapping discrepancies using a
> rectangular image such as  this one
> <http://naturalearth.springercarto.com/ne3_data/8192/textures/2_no_clouds_8k.jpg>
> ?
>
> Thanks!
>
> Ben
>
>
>
>
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/Missing-texture-file-in-vtkTexturedSphere-example-tp5740971.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers



--
Unpaid intern in BillsBasement at noware dot com
_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Missing texture file in vtkTexturedSphere example?

Bill Lorensen
Looks like the example is not working correctly. It is not producing
the image shown on the web page. I'll look into it.

On Sun, Oct 30, 2016 at 12:22 PM, Bill Lorensen <[hidden email]> wrote:

> Here is the texture for the example:
> https://github.com/lorensen/VTKWikiExamples/blob/master/Testing/Data/earth.ppm
>
>
> On Fri, Oct 28, 2016 at 6:26 PM, BBerco <[hidden email]> wrote:
>> Hi all,
>>
>> I have been trying to map a 2D texture onto a spherical surface following
>> the tutorial on vtkTexturedSphere
>>
>> http://www.paraview.org/Wiki/VTK/Examples/Cxx/Texture/TexturedSphere
>>
>> Unfortunately, no information on the image used in this example (dimensions,
>> image pre-processing , not to mention the actual file) is provided to the
>> user. Applying the example code to an arbitrary rectangular image results in
>> an incorrect results, as if the texture image was wrapped multiple times
>> around the sphere.
>>
>> I'm thinking that the input file used in the example was probably applied
>> some sort of transform before being fed to vtk. I tried to use the SetScale
>> method in vtkTexturedSphere, to no avail (I honestly don't know which way to
>> look here).
>>
>> Any advice as to how I could get rid of the wrapping discrepancies using a
>> rectangular image such as  this one
>> <http://naturalearth.springercarto.com/ne3_data/8192/textures/2_no_clouds_8k.jpg>
>> ?
>>
>> Thanks!
>>
>> Ben
>>
>>
>>
>>
>>
>>
>>
>> --
>> View this message in context: http://vtk.1045678.n5.nabble.com/Missing-texture-file-in-vtkTexturedSphere-example-tp5740971.html
>> Sent from the VTK - Users mailing list archive at Nabble.com.
>> _______________________________________________
>> 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
>>
>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com



--
Unpaid intern in BillsBasement at noware dot com
_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Missing texture file in vtkTexturedSphere example?

BBerco
Bill,

thanks a lot!
Ben
Reply | Threaded
Open this post in threaded view
|

Re: Missing texture file in vtkTexturedSphere example?

Bill Lorensen
Ben,

In 2012, a careless developer introduced a bug in the texture
coordinate calculation. I have a patch under review to fix the bug:
https://gitlab.kitware.com/vtk/vtk/merge_requests/2129

I'm surprised that no one noticed this bug. Looks like the regression
baseline images were adjusted to match the bug. That developer has
been admonished by me and if he does this again, I will personally
revoke his check in privileges.

Rather than embarrass him on this list, you will see his name in the
git commit message.

Thanks for reporting this bug.

Bill

On Sun, Oct 30, 2016 at 12:33 PM, BBerco <[hidden email]> wrote:

> Bill,
>
> thanks a lot!
> Ben
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/Missing-texture-file-in-vtkTexturedSphere-example-tp5740971p5740976.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers



--
Unpaid intern in BillsBasement at noware dot com
_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Missing texture file in vtkTexturedSphere example?

BBerco
This post was updated on .
Glad I could contribute to VTK somehow ;) The fix seems to work like a charm.
Don't be too hard on the culprit. Last time I checked he was just an unpaid intern.

Thanks!