POV-Ray : Newsgroups : povray.general : slope pattern bug? : Re: slope pattern bug? Server Time
1 Aug 2024 08:14:51 EDT (-0400)
  Re: slope pattern bug?  
From: Trevor G Quayle
Date: 18 Jan 2006 09:00:00
Message: <web.43ce4926e7742b916c4803960@news.povray.org>
"Trevor G Quayle" <Tin### [at] hotmailcom> wrote:
> Now how to get around this may be a tad more complex, I'll have to think
> about that.

Ah, figured something out.  You can use interior_texture, which applies a
different texture to the interior of the object.  For the slope map
texture, you need it to basically be opposite the exterior texture as the
mormals of the inside are opposite.  Do this by using the same slope
pattern inside, but reverse the slope normal (ie, <1,0,0> becomes <-1,0,0>)


//START
sphere {0, 1
  texture{
    pigment{slope {<1,0,0>}
       color_map {[0.0 color rgb <1,0,0>] // RED
                  [0.2 color rgb <1,0,0>]
                  [0.5 color rgbt 1]
                  [1.0 color rgbt 1] // TRANSPARENT
        }
    }
    finish{ambient .3 diffuse .7}
  }
  interior_texture{
    pigment{slope {<-1,0,0>}
       color_map {[0.0 color rgb <1,0,0>] // RED
                  [0.2 color rgb <1,0,0>]
                  [0.5 color rgbt 1]
                  [1.0 color rgbt 1] // TRANSPARENT
        }
    }
    finish{ambient .3 diffuse .7}
  }
} // end of sphere
//END


-tgq


Post a reply to this message

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