POV-Ray : Newsgroups : povray.beta-test : Non-rotating slope maps in 3.5.beta.11.incl.win32 Server Time
1 Nov 2024 23:16:38 EDT (-0400)
  Non-rotating slope maps in 3.5.beta.11.incl.win32 (Message 1 to 9 of 9)  
From: Greg M  Johnson
Subject: Non-rotating slope maps in 3.5.beta.11.incl.win32
Date: 14 Feb 2002 09:40:37
Message: <3c6bcc65$1@news.povray.org>
// unrotated slope map
sphere{0,2
  rotate 0*z
  translate -3*x+10*z
  pigment {slope {y}frequency 4}
  finish{ambient 0.5}}

// rotated slope map looks the same:
// IMHO I don't like this.
// I had a scene where I wanted it
//to stay "with the object"
sphere{0,2
  rotate 90*z
  translate 3*x+10*z
  pigment {slope {y}frequency 4}
  finish{ambient 0.5}}


Post a reply to this message

From: Greg M  Johnson
Subject: Re: Non-rotating slope maps in 3.5.beta.11.incl.win32
Date: 14 Feb 2002 09:42:47
Message: <3c6bcce7@news.povray.org>
Contrast this effect with that of:
//#declare piggy=pigment {slope {y}frequency 4}
#declare piggy=pigment {bozo}

// unrotated slope map
sphere{0,2
  rotate 0*z
  translate -3*x+10*z
  pigment {piggy}
  finish{ambient 0.5}}

// rotated slope map looks the same:
// IMHO I don't like this.
sphere{0,2
  rotate 90*z
  translate 3*x+10*z
  pigment {piggy}
  finish{ambient 0.5}}


Post a reply to this message

From: Anders K 
Subject: Re: Non-rotating slope maps in 3.5.beta.11.incl.win32
Date: 14 Feb 2002 10:18:47
Message: <3c6bd557$1@news.povray.org>
> // unrotated slope map
> // rotated slope map looks the same:

You're applying the texture after you rotate/translate the sphere. Try
applying it before the rotation and translation instead, so it will get
rotated and translated with the object like you want it to.

Anders

--
light_source{6#local D#macro B(E)#macro A(D)#declare#declare C=mod(E
D);E=(E-C)/D;C#end#while(E)#if(A(8)=7)#declare D=D+2.8;#else#if(C<3)
}cylinder{0(C=<1 2>).2translate<D+C*A(2)A(4)#else}intersection{torus
{1 .2}box{-2y}rotate<1 0C>*90translate<D+1A(2)*2+1#end-2 13>pigment{
rgb x}finish{specular 1}#end#end#end=-8;1B(445000298)B(519053970)B(
483402386)B(1445571258)B(77778740)B(541684549)B(42677491)B(70)}


Post a reply to this message

From:
Subject: Re: Non-rotating slope maps in 3.5.beta.11.incl.win32
Date: 14 Feb 2002 10:28:03
Message: <0iln6u4fvrbjbbhsusi14upnbapsfg1kvm@4ax.com>
On Thu, 14 Feb 2002 10:19:11 -0500, "Anders K." <and### [at] prostard2gcom>
wrote:
> You're applying the texture after you rotate/translate the sphere. Try
> applying it before the rotation and translation instead, so it will get
> rotated and translated with the object like you want it to.

Have You tested your answer ? I tried this before your post but it not works. 
Afaik  described behaviour of slope_map's vector is not precised in
documentation so we can't know - is it bug or design. But something could be
done: clarification in documentation.

Anyway confirmed with
POV 3.5 b 11 icl on WinNT Sp 6 PII 233 with 128 MB

ABX


Post a reply to this message

From: Greg M  Johnson
Subject: don't tell Ken
Date: 14 Feb 2002 10:42:32
Message: <3c6bdae8@news.povray.org>

news:0iln6u4fvrbjbbhsusi14upnbapsfg1kvm@4ax.com...
> Afaik  described behaviour of slope_map's vector is not precised in
> documentation so we can't know - is it bug or design. But something could
be
> done: clarification in documentation.
>

(I discovered this feature in mega 0.7a).


Post a reply to this message

From: Anders K 
Subject: Re: Non-rotating slope maps in 3.5.beta.11.incl.win32
Date: 14 Feb 2002 10:47:40
Message: <3c6bdc1c$1@news.povray.org>
Aha -- you're right. There is indeed a bug here, although it wasn't shown by
his sample scene. A better example is:

// unrotated slope map
sphere {
  0, 2
  pigment { slope { y } frequency 4 }
  finish { ambient 0.5 }
  rotate 0*z
  translate -3*x + 10*z
}

// rotated slope map looks the same:
sphere {
  0, 2
  pigment { slope { y } frequency 4 }
  finish { ambient 0.5 }
  rotate 90*z
  translate 3*x + 10*z
}

Anders

--
light_source{6#local D#macro B(E)#macro A(D)#declare#declare C=mod(E
D);E=(E-C)/D;C#end#while(E)#if(A(8)=7)#declare D=D+2.8;#else#if(C<3)
}cylinder{0(C=<1 2>).2translate<D+C*A(2)A(4)#else}intersection{torus
{1 .2}box{-2y}rotate<1 0C>*90translate<D+1A(2)*2+1#end-2 13>pigment{
rgb x}finish{specular 1}#end#end#end=-8;1B(445000298)B(519053970)B(
483402386)B(1445571258)B(77778740)B(541684549)B(42677491)B(70)}


Post a reply to this message

From: Ken
Subject: Re: don't tell Ken
Date: 14 Feb 2002 10:47:58
Message: <3C6BDCDB.B86A94BB@pacbell.net>
"Greg M. Johnson" wrote:

> (I discovered this feature in mega 0.7a).

I heard that!

-- 
Ken Tyler


Post a reply to this message

From: Christopher James Huff
Subject: Re: Non-rotating slope maps in 3.5.beta.11.incl.win32
Date: 14 Feb 2002 10:59:26
Message: <chrishuff-BA3BC9.10590714022002@netplex.aussie.org>
In article <3c6bcce7@news.povray.org>,
 "Greg M. Johnson" <gregj:-)565### [at] aolcom> wrote:

> Contrast this effect with that of:
> //#declare piggy=pigment {slope {y}frequency 4}
> #declare piggy=pigment {bozo}
> 
> // unrotated slope map
> sphere{0,2
>   rotate 0*z
>   translate -3*x+10*z
>   pigment {piggy}
>   finish{ambient 0.5}}
> 
> // rotated slope map looks the same:
> // IMHO I don't like this.
> sphere{0,2
>   rotate 90*z
>   translate 3*x+10*z
>   pigment {piggy}
>   finish{ambient 0.5}}

As someone else mentioned, you forgot to put the transformation after 
the texture, so of course it isn't being rotated.
Also, you aren't using a slope map, you are using the slope pattern. 
They are two completely different features, slope_map is more the analog 
of color_map for the normal statement.

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

From: Greg M  Johnson
Subject: Re: Non-rotating slope maps in 3.5.beta.11.incl.win32
Date: 14 Feb 2002 12:59:49
Message: <3c6bfb15$1@news.povray.org>
// try a succession of deleting the # after "piggy"
#declare piggy1 = texture{pigment {slope {y} frequency 4} finish{ambient 1}}
#declare piggy2 = texture{pigment {bozo      frequency 4} finish{ambient 1}}
#declare piggy3 = texture{pigment {rgb 1}
                        normal {
                                gradient x
                                slope_map {
                              [0   <0, 1>]
                              [0.5 <1, 1>]
                              [0.5 <1,-1>]
                              [1   <0,-1>]
                                }
                                frequency 4
                                }
                        finish{ambient 0.25}
                        }


// unrotated slope map
sphere{0,2
  texture{piggy}
  rotate 0*z
  translate -3*x+10*z
                     }

// rotated slope map

sphere{0,2
  texture{piggy}
  rotate 90*z
  translate 3*x+10*z }

light_source{ y*10 rgb 1}


Post a reply to this message

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