POV-Ray : Newsgroups : povray.advanced-users : Scaling spherical wrap image in UV dimensions. Server Time
25 Dec 2024 21:49:24 EST (-0500)
  Scaling spherical wrap image in UV dimensions. (Message 1 to 4 of 4)  
From: space cadet
Subject: Scaling spherical wrap image in UV dimensions.
Date: 8 Jun 2006 20:35:00
Message: <web.4488c10d59ab02efc052e9200@news.povray.org>
Hi, I'm hoping this is simple, and I'm just not seeing it.

I have a CSG object that I image_map spherically. I need to scale that image
wrapping in the UV coords, NOT the xyz.

I have this:

intersection { // CSG001
  sphere { sphere stuff}
  cone { cone stuff}
  pigment {image_map {png "pic.png" map_type 1 interpolate 2}
  finish{ ambient 0 diffuse 1}
}

if I add a uniform scale transformation, it has no effect. If I scale with a
nonuniform xyz vector, I get weird results that I dont understand. If I use
the uv_wrapping keyword, it does stuff I dont understand.

Surely there's an easy way to just scale (and/or translate/rotate) the uv
wrapping on this, such that it will repeat.

Please help!  Thanks.


Post a reply to this message

From: Warp
Subject: Re: Scaling spherical wrap image in UV dimensions.
Date: 9 Jun 2006 03:48:09
Message: <448927b9@news.povray.org>
What you probably want is something along the lines of:

pigment
{ image_map { png "pic.png" interpolate 2 }
  scale .25
  warp { spherical }
}


-- 
                                                          - Warp


Post a reply to this message

From: space cadet
Subject: Re: Scaling spherical wrap image in UV dimensions.
Date: 9 Jun 2006 09:50:00
Message: <web.44897b2683c4cc75c052e9200@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> What you probably want is something along the lines of:
>
> pigment
> { image_map { png "pic.png" interpolate 2 }
>   scale .25
>   warp { spherical }
> }
>
>
> --
>                                                           - Warp


Thanks. I found your similar reply to a cylindrical issue last night and
tried it.  It did solve my problem.

However, I gotta say, I have no idea what warp is about. I've read its
documentation to death, and I cant figure out what its trying to say.  I
have no idea what the 'orientation' parameter is for (which isnt even
explained in the docs). When its the default 'z', it works fine, when its
ANYTHING else, nothing at all shows up on my object.  Theres nothing 'z'
oriented about what I'm witnessing. And dist_exp rematins a mystery to me
as well.

Also, it only allows uniform scaling in both dimensions. I'm able to make
that work for this application, but often we need to scale u and v
independently. Is that not available?

I've been able to make it work from following examples, and playing with it,
but still, I dont know why its working the way it does.  And I cant
understand why the straight forward spherical wrapping (maptype 1)
mechanism doesnt allow for scaling.

Anyway, the solution worked, so I'll keep it. I just wish it was clear what
warp is doing so I can use it with some more confidence and control.

Thanks again for your help. :-)


Post a reply to this message

From: Warp
Subject: Re: Scaling spherical wrap image in UV dimensions.
Date: 9 Jun 2006 12:32:28
Message: <4489a29b@news.povray.org>
space_cadet <poc### [at] grcnasagov> wrote:
> However, I gotta say, I have no idea what warp is about.

  A warp is basically a transformation (linear or non-linear; it doesn't
matter with textures) which can be applied in a chain of other transformations
and this order will be preserved (unlike eg. 'turbulence' which does not
preserve the order in which it was given relating to other transformations;
hence 'turbulence' and 'warp { turbulence }' are two different things).

  In this case the warp transformation is useful exactly because it
preserves the order of the transformations: The image is scaled *first*
and *then* a spherical transformation is applied to it.

-- 
                                                          - Warp


Post a reply to this message

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