POV-Ray : Newsgroups : povray.newusers : Filters With Texture : Re: Filters With Texture Server Time
4 Nov 2024 13:02:17 EST (-0500)
  Re: Filters With Texture  
From: Ken
Date: 12 Aug 2003 22:13:24
Message: <3F39A03B.7B258FF2@pacbell.net>
Brent G wrote:
> 
> Here's my code:
> difference {
>          box {
>                  <-2, -1, 0.1>, <2, 1, 1>
>                  texture { T_Stone10
>                            color filter clock }
>          }
>          text {
>                  ttf "timrom.ttf" "Text" 0.15, 0
>                  pigment { BrightGold
>                            color filter clock }
>                  finish { reflection .25 specular 1 }
>                  translate -1.05*x
>          }
> }
> 
> Which is What I want to do, but isnt' valid.  What I'm trying to do is
> change the transparency of the objects for an animation so they fade in
> over the course of the animation. clock goes from 0 to 1.

In the box object statement you are trying to filter a predeclared texture
which in not allowed in POV-Ray. You have to apply the filter to the individual
pigments in the color_map for T_Stone10 in stones1.inc or copy it to your
working scene file and modify it there. You have to remember that the stone
textures are layered so you may have to adjust the filter amounts to get the
effect you are looking for.

Below is an untested example to get you started.

#declare T_Grnt3a =
texture {
pigment
 {granite
  turbulence 0.6
  color_map
   {[0.000, 0.153   color rgbt <0.831, 0.631, 0.569, 0.447*clock>
                    color rgbt <0.925, 0.831, 0.714, 0.678*clock>]
    [0.153, 0.297   color rgbt <0.925, 0.831, 0.714, 0.678*clock>
                    color rgbt <0.871, 0.702, 0.659, 0.475*clock>]
    [0.297, 0.441   color rgbt <0.871, 0.702, 0.659, 0.475*clock>
                    color rgbt <0.831, 0.631, 0.569, 0.918*clock>]
    [0.441, 0.763   color rgbt <0.831, 0.631, 0.569, 0.918*clock>
                    color rgbt <0.937, 0.882, 0.820, 0.655*clock>]
    [0.763, 1.001   color rgbt <0.937, 0.882, 0.820, 0.655*clock>
                    color rgbt <0.831, 0.631, 0.569, 0.447*clock>]
   }
 }
 }

#declare T_Grnt17a =
texture {
pigment
 {granite
  turbulence 0.6
  color_map
   {[0.000, 0.034   color rgbt <0.027, 0.012, 0.012, 0.000*clock>
                    color rgbt <0.851, 0.812, 0.741, 0.235*clock>]
    [0.034, 0.342   color rgbt <0.851, 0.812, 0.741, 0.235*clock>
                    color rgbt <0.792, 0.694, 0.690, 0.839*clock>]
    [0.342, 0.462   color rgbt <0.792, 0.694, 0.690, 0.839*clock>
                    color rgbt <0.631, 0.506, 0.471, 0.608*clock>]
    [0.462, 0.632   color rgbt <0.631, 0.506, 0.471, 0.608*clock>
                    color rgbt <0.851, 0.812, 0.741, 0.922*clock>]
    [0.632, 0.983   color rgbt <0.851, 0.812, 0.741, 0.922*clock>
                    color rgbt <0.647, 0.655, 0.655, 0.282*clock>]
    [0.983, 1.001   color rgbt <0.647, 0.655, 0.655, 0.282*clock>
                    color rgbt <0.027, 0.012, 0.012, 0.000*clock>]
   }
 }
 }

#declare T_Stone10 =
texture{pigment{color Black*clock}}
texture{T_Grnt17a scale <3, 6, 2> rotate <0, 0, 50>}
texture{T_Grnt3a scale <1, 2, 1> rotate <0, 0, -50>
        finish{phong 1.0 phong_size 90}
}


In the text object, if you remove the 'color' keyword, it will work as is.

-- 
Ken Tyler


Post a reply to this message

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