|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wasn't it Brent G who 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.
1. For a plain colour like BrightGold, a valid syntax is like this:
text {
ttf "timrom.ttf" "Text" 0.15, 0
#declare CFC = color filter clock;
pigment { BrightGold + CFC }
finish { reflection .25 specular 1 }
translate -1.05*x
}
2. For a complicated texture like T_Stone10 you can't apply filter to
the whole thing. What you'd have to do is take a copy of the
T_Grnt3a, T_Grnt17a and T_Stone10 declarations from stones1.inc and
change all the rgbt colours into rgbft, inserting "clock," as the
fourth component, like this:
#declare T_Grnt3a =
texture {
pigment
{granite
turbulence 0.6
color_map
{[0.000, 0.153 color rgbft <0.831, 0.631, 0.569, clock, 0.447>
color rgbft <0.925, 0.831, 0.714, clock, 0.678>]
[0.153, 0.297 color rgbft <0.925, 0.831, 0.714, clock, 0.678>
color rgbft <0.871, 0.702, 0.659, clock, 0.475>]
[0.297, 0.441 color rgbft <0.871, 0.702, 0.659, clock, 0.475>
color rgbft <0.831, 0.631, 0.569, clock, 0.918>]
[0.441, 0.763 color rgbft <0.831, 0.631, 0.569, clock, 0.918>
color rgbft <0.937, 0.882, 0.820, clock, 0.655>]
[0.763, 1.001 color rgbft <0.937, 0.882, 0.820, clock, 0.655>
color rgbft <0.831, 0.631, 0.569, clock, 0.447>]
}
}
}
3. However, this doesn't cause the object to fade in during the course
of the animation. That's not what "filter" does, you are probably
thinking of "transmit". This is particularly noticeable in the case
of the Black layer of T_Stone10. When the layer is "Black + filter 0"
it is opaque and black. When the layer is "Black + filter 1" then
light is considered to pass through the object, but on the way
through the colour of the light is changed to being completely black.
You can easily do the plain colour with transmit, but the layers of that
stone texture already contain some transmit. So you'd have to modify
them so that the transmit varies from the initial value when clock=0 to
1 when clock=1, something like this:
#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+0.553*clock>
color rgbt <0.925, 0.831, 0.714, 0.678+0.322*clock>]
[0.153, 0.297 color rgbt <0.925, 0.831, 0.714, 0.678+0.322*clock>
color rgbt <0.871, 0.702, 0.659, 0.475+0.535*clock>]
[0.297, 0.441 color rgbt <0.871, 0.702, 0.659, 0.475+0.535*clock>
color rgbt <0.831, 0.631, 0.569, 0.918+0.082*clock>]
[0.441, 0.763 color rgbt <0.831, 0.631, 0.569, 0.918+0.082*clock>
color rgbt <0.937, 0.882, 0.820, 0.655+0.545*clock>]
[0.763, 1.001 color rgbt <0.937, 0.882, 0.820, 0.655+0.545*clock>
color rgbt <0.831, 0.631, 0.569, 0.447+0.553*clock>]
}
}
}
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Program ended abnormally on 2003-08-12 22:19, Due to a catastrophic Ken
error:
>
>
> Below is an untested example to get you started.
>
>
> #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>
I think that in this case, he can safely omit multiplying by "clock".
;)
--
/*Francois Labreque*/#local a=x+y;#local b=x+a;#local c=a+b;#macro P(F//
/* flabreque */L)polygon{5,F,F+z,L+z,L,F pigment{rgb 9}}#end union
/* @ */{P(0,a)P(a,b)P(b,c)P(2*a,2*b)P(2*b,b+c)P(b+c,<2,3>)
/* videotron.ca */}camera{orthographic location<6,1.25,-6>look_at a }
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Francois Labreque wrote:
> > {[0.000, 0.034 color rgbt <0.027, 0.012, 0.012, 0.000*clock>
>
> I think that in this case, he can safely omit multiplying by "clock".
Well, I said some modifications might be necessary... ...didn't I?
--
Ken Tyler
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wasn't it Brent G who 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.
I just found a neat trick for dealing with complicated textures like
T_Stone10. Take an average of T_Stone10 with Clear, varying the ratios
of the two component textures as the clock changes.
box {
<-2, -1, 0.1>, <2, 1, 1>
texture {
average
texture_map {
[clock T_Stone10]
[1-clock pigment {Clear}]
}
}
}
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|