POV-Ray : Newsgroups : povray.binaries.images : Using UV mapping with checker pigment on a sphere - no clue at all! Server Time
7 Nov 2024 09:25:36 EST (-0500)
  Using UV mapping with checker pigment on a sphere - no clue at all! (Message 1 to 3 of 3)  
From: Jörg "Yadgar" Bleimann
Subject: Using UV mapping with checker pigment on a sphere - no clue at all!
Date: 22 Jul 2016 19:10:05
Message: <5792a7cd$1@news.povray.org>
Hi(gh)!

To finally, after 21 years of dabbling with POV-Ray, get my official 
debut scene, I would like to create a checkered sphere - but with UV 
mapping of course.

But when I tried this:

sphere
{
   0, 1
   scale 1000
   texture
   {
     uv_mapping
     pigment
     {
       checker color rgb <0, 0.7, 0.3>, color rgb <0.7, 0, 0.3>
       rotate z*-90
       scale 50
     }
     finish
     {
       ambient 0.05
       diffuse 1
       brilliance 0.3
     }
   }
}

I always get a uniformly colored sphere, regardless how I rotate the 
pattern! Why?

And there is no tutorial around to help me with this - or I'm just too 
stupid to understand them!

See you in Khyberspace!

Yadgar


Post a reply to this message

From: clipka
Subject: Re: Using UV mapping with checker pigment on a sphere - no clue at all!
Date: 22 Jul 2016 20:57:19
Message: <5792c0ef$1@news.povray.org>
Am 23.07.2016 um 01:10 schrieb Jörg "Yadgar" Bleimann:
> Hi(gh)!
> 
> To finally, after 21 years of dabbling with POV-Ray, get my official
> debut scene, I would like to create a checkered sphere - but with UV
> mapping of course.
> 
> But when I tried this:
> 
> sphere
> {
>   0, 1
>   scale 1000
>   texture
>   {
>     uv_mapping
>     pigment
>     {
>       checker color rgb <0, 0.7, 0.3>, color rgb <0.7, 0, 0.3>
>       rotate z*-90
>       scale 50
>     }
>     finish
>     {
>       ambient 0.05
>       diffuse 1
>       brilliance 0.3
>     }
>   }
> }
> 
> I always get a uniformly colored sphere, regardless how I rotate the
> pattern! Why?

Because you want to use (e.g.) "scale 0.02" instead of "scale 50" :)

With uv_mapping, it's virtually always the unit square from <0,0,0> to
<1,1,0> of the pigment that will be mapped onto the primitive (provided
it supports UV mapping at all of course). The raw checker pattern (which
in 3D space actually is a cube pattern, so rotation shouldn't matter) is
already uniform in the <0,0,0> to <1,1,1> unit cube, but thanks to the
scaling you have increased that cube to the range from <0,0,0> to
<50,50,50>.

Scale it down instead of up, and the <0,0,0> to <1,1,0> range should
start to show some variation.


Post a reply to this message

From: Bald Eagle
Subject: Re: Using UV mapping with checker pigment on a sphere - no clue at all!
Date: 22 Jul 2016 21:20:00
Message: <web.5792c531f16d9b345e7df57c0@news.povray.org>
> I always get a uniformly colored sphere, regardless how I rotate the
> pattern! Why?

I'd say that the "uniformly colored" is a huge hint about the pattern being
scaled too large.

When starting out in unfamiliar territory, I'd probably create a scene with a
large variation in object sizes, or a large variation in texture scales, or set
it up so that it's an "animation" and a large number of scenes get rendered to
show a wide range of size and/or scaling values.

As clipka noted, the pattern is 3-dimensional.   Perhaps if you render a very
large box, with transparency, you'll be able to see the scale of the pattern
directly.   Or just a very large box/sphere with the camera far enough away to
see the whole visible surface.

Keep at it, and I know you'll find some great things to experiment with   :)


Post a reply to this message

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