POV-Ray : Newsgroups : povray.general : slope pattern bug? : Re: slope pattern bug? Server Time
1 Aug 2024 08:21:01 EDT (-0400)
  Re: slope pattern bug?  
From: Kenneth
Date: 18 Jan 2006 02:15:01
Message: <web.43cde912e7742b911f99adeb0@news.povray.org>
"Kenneth" <kdw### [at] earthlinknet> wrote:
> "Trevor G Quayle" <Tin### [at] hotmailcom> wrote:

> > If, as I understand it, you want a texture only on the top half,
> > you wouldn't use the hi_slope and lo_slope, instead, in the slope map, you
> > would have no texture from index 0 to 0.5, and texture from 0.5 to 1.0.
>
> Yes, I agree, that does work beautifully....
>

I should qualify that: It worked beautifully, because I applied the slope
map pattern over a previous texture. But used by itself (as the only
texture), strange things happen, as I've since discovered.

Can someone p*l*e*a*s*e explain why the following two examples show
different slope pattern results? I have some theories, but they're all pure
wacky guesswork.

The first example shows the way the slope pattern worked succesfully for me
(and it makes sense) :  The pattern is applied over a previous (white)
texture, and its red color fades to transparency as it reaches the opposite
side of the sphere.  Just what I wanted! But the second example--using the
slope pattern alone--shows the red color appearing on BOTH sides of the
sphere. Why so?

Help!!!

FIRST EXAMPLE:
sphere {0, 1
// 1st texture
 texture{pigment{color rgb 1} // WHITE
     finish{
    ambient .3
    diffuse .7
               }
             }

// 2nd texture
  texture {
    pigment {
        slope {<1,0,0>}
       color_map {
                        [0 color rgb <1,0,0>] // RED
                        [.2 color rgb <1,0,0>]
                        [.5 color rgbt 1]
                        [1 color rgbt 1] // TRANSPARENT
                            }
                    }
       finish{
          ambient .3
          diffuse .7
                 }
               }
           } // end of sphere


2nd EXAMPLE:
sphere {0, 1
  texture {
    pigment {
        slope {<1,0,0>}
       color_map {
                        [0 color rgb <1,0,0>] // RED
                        [.2 color rgb <1,0,0>]
                        [.5 color rgbt 1]
                        [1 color rgbt 1] // TRANSPARENT
                            }
                    }
       finish{
         ambient .3
         diffuse .7
                }
               }
              } // end of sphere


Post a reply to this message

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