POV-Ray : Newsgroups : povray.general : Spherical Image Map Server Time
5 Nov 2024 03:17:59 EST (-0500)
  Spherical Image Map (Message 1 to 5 of 5)  
From: Kirk Andrews
Subject: Spherical Image Map
Date: 18 Oct 2007 13:45:00
Message: <web.47179ad7533d4eeb555cae70@news.povray.org>
When using the spherical or cylindrical projection of an image map, it wraps
the image once around the object.  Is there a way to make it wrap multiple
times?  For example, if my image has the letter "M", can I make it wrap 8
"M"s around a cylinder?  I've tried scaling, frequency, converting to a
function, etc., but I can't seem to find a way to do it without simply
editing the image.

Thanks


Post a reply to this message

From: Leroy
Subject: Re: Spherical Image Map
Date: 18 Oct 2007 14:15:36
Message: <4717A2DA.8050700@joplin.com>
Kirk Andrews wrote:
> When using the spherical or cylindrical projection of an image map, it wraps
> the image once around the object.  Is there a way to make it wrap multiple
> times?  For example, if my image has the letter "M", can I make it wrap 8
> "M"s around a cylinder?  I've tried scaling, frequency, converting to a
> function, etc., but I can't seem to find a way to do it without simply
> editing the image.
> 
> Thanks
> 
> 
try this:

  sphere {
      0,1
      pigment {
        image_map{tga "Your image.tga"}
        scale .4 //play with this
        warp {
          spherical
          orientation z
          dist_exp 1//play with this also
        }
      }
    }


Post a reply to this message

From: Trevor G Quayle
Subject: Re: Spherical Image Map
Date: 18 Oct 2007 15:35:01
Message: <web.4717b50d4a0b5ca0c150d4c10@news.povray.org>
Leroy <lrw### [at] joplincom> wrote:
> Kirk Andrews wrote:
> > When using the spherical or cylindrical projection of an image map, it wraps
> > the image once around the object.  Is there a way to make it wrap multiple
> > times?  For example, if my image has the letter "M", can I make it wrap 8
> > "M"s around a cylinder?  I've tried scaling, frequency, converting to a
> > function, etc., but I can't seem to find a way to do it without simply
> > editing the image.
> >
> > Thanks
> >
> >
> try this:
>
>   sphere {
>       0,1
>       pigment {
>         image_map{tga "Your image.tga"}
>         scale .4 //play with this
>         warp {
>           spherical
>           orientation z
>           dist_exp 1//play with this also
>         }
>       }
>     }

Leroy <lrw### [at] joplincom> wrote:
> Kirk Andrews wrote:
> > When using the spherical or cylindrical projection of an image map, it wraps
> > the image once around the object.  Is there a way to make it wrap multiple
> > times?  For example, if my image has the letter "M", can I make it wrap 8
> > "M"s around a cylinder?  I've tried scaling, frequency, converting to a
> > function, etc., but I can't seem to find a way to do it without simply
> > editing the image.
> >
> > Thanks
> >
> >
> try this:
>
>   sphere {
>       0,1
>       pigment {
>         image_map{tga "Your image.tga"}
>         scale .4 //play with this
>         warp {
>           spherical
>           orientation z
>           dist_exp 1//play with this also
>         }
>       }
>     }

Exactly as Leroy has put it.
To clarify:
iamge_maps get mapped from 0,0 to 1,1 on the x-y plane and repeat (unless
'once' keyword is used).  When warping to a cylindrical or spherical
mapping, the pigment (or in this case image_map pigment) is read from 0,0
to 1,1 on the x-y plane and converted to cylindrical mapping.  So to get
what you want to do, after invoking the image_map in the pigment, scale the
the x-axis direction down by the number of repeats you want.  Scaling the
z-axis does nothing, and scaling the y-axis will just require you to likely
have to rescale the y-axis again to get it mapped to the height you want, so
it's best to leave y and z scales at 1.

pigment{image_map {jpeg "image.jpg"} scale <1/n,1,1> warp{cylindrical}}

Where n=the number of times you want it to repeat.

The key is to scale AFTER the image_map, but BEFORE the warp.

This is applicable to repeating around the cylinder or sphere.  If you want
to also repeat up and down on t either, just add the applicable scale to
the y-axis.

-tgq


Post a reply to this message

From: Kirk Andrews
Subject: Re: Spherical Image Map
Date: 18 Oct 2007 22:30:01
Message: <web.471816824a0b5ca07e1bc26d0@news.povray.org>
Exactly what I needed!  Thanks!

-- Kirk


Post a reply to this message

From: Warp
Subject: Re: Spherical Image Map
Date: 19 Oct 2007 14:14:57
Message: <4718f421@news.povray.org>
Kirk Andrews <kir### [at] tektonartcom> wrote:
> When using the spherical or cylindrical projection of an image map, it wraps
> the image once around the object.  Is there a way to make it wrap multiple
> times?  For example, if my image has the letter "M", can I make it wrap 8
> "M"s around a cylinder?  I've tried scaling, frequency, converting to a
> function, etc., but I can't seem to find a way to do it without simply
> editing the image.

  Again something answered in the povQ&T, but people still repeated the
same answer explicitly...

http://tag.povray.org/povQandT/languageQandT.html#cylindricalrepeat

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.