POV-Ray : Newsgroups : povray.newusers : uv_mapping with the checkers pattern Server Time
1 Nov 2024 11:15:50 EDT (-0400)
  uv_mapping with the checkers pattern (Message 1 to 4 of 4)  
From: Noam L 
Subject: uv_mapping with the checkers pattern
Date: 19 Oct 2005 10:21:57
Message: <uhlcl1hibge063hsicsorm31l42u7kt96e@4ax.com>
I'm trying to move a sphere in an animation, and I notice that the
checkers pattern doesn't "stick" to the sphere.
I tried using uv_mapping but then only the first color of the checker
is used as the pigment of the sphere.

How do I move a sphere and make the initial checkers pattern "stick"
to it?


Post a reply to this message

From: Mike Williams
Subject: Re: uv_mapping with the checkers pattern
Date: 19 Oct 2005 10:52:22
Message: <3iCO3BAg2lVDFwKs@econym.demon.co.uk>
Wasn't it Noam L. who wrote:
>I'm trying to move a sphere in an animation, and I notice that the
>checkers pattern doesn't "stick" to the sphere.
>I tried using uv_mapping but then only the first color of the checker
>is used as the pigment of the sphere.
>
>How do I move a sphere and make the initial checkers pattern "stick"
>to it?


  texture {uv_mapping pigment {checker} scale <0.1, 0.147> }

With uv_mapping, the part of the texture that would normally cover the
square from <0,0> to <1,1> is mapped to the whole surface, even if the
sphere is much larger than that. But for the checker pattern, each of
the coloured checkers is a 1x1 square, so to see any pattern you need to
scale down.

[Because the pattern is in uv-space instead of xyz-space, only the first
two dimensions of scaling are meaningful.]

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Tim Nikias
Subject: Re: uv_mapping with the checkers pattern
Date: 19 Oct 2005 11:10:46
Message: <435661f6@news.povray.org>
> How do I move a sphere and make the initial checkers pattern "stick"
> to it?

I think your problem lies less with the uv-mapping, but more with where you
apply the transformation to the sphere. Is it after the texture is applied,
or before?

If you apply the transformations before the texture, the texture doesn't
transform/move with the sphere, if it is applied after the texture, the
texture gets transformed as well.

Regards,
Tim

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>


Post a reply to this message

From: Noam L 
Subject: Re: uv_mapping with the checkers pattern
Date: 22 Oct 2005 18:04:05
Message: <9pdll11268j4jcphe66jp9ubl4rdojod1n@4ax.com>
That did it, thank you

On Wed, 19 Oct 2005 15:52:16 +0100, Mike Williams
<nos### [at] econymdemoncouk> wrote:

>Wasn't it Noam L. who wrote:
>>I'm trying to move a sphere in an animation, and I notice that the
>>checkers pattern doesn't "stick" to the sphere.
>>I tried using uv_mapping but then only the first color of the checker
>>is used as the pigment of the sphere.
>>
>>How do I move a sphere and make the initial checkers pattern "stick"
>>to it?
>
>
>  texture {uv_mapping pigment {checker} scale <0.1, 0.147> }
>
>With uv_mapping, the part of the texture that would normally cover the
>square from <0,0> to <1,1> is mapped to the whole surface, even if the
>sphere is much larger than that. But for the checker pattern, each of
>the coloured checkers is a 1x1 square, so to see any pattern you need to
>scale down.
>
>[Because the pattern is in uv-space instead of xyz-space, only the first
>two dimensions of scaling are meaningful.]


Post a reply to this message

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