|
|
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
|
|
|
|
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
|
|
|
|
> 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
|
|