POV-Ray : Newsgroups : povray.binaries.images : Using UV mapping with checker pigment on a sphere - no clue at all! : Re: Using UV mapping with checker pigment on a sphere - no clue at all! Server Time
27 Apr 2024 12:33:08 EDT (-0400)
  Re: Using UV mapping with checker pigment on a sphere - no clue at all!  
From: clipka
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

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