|
|
Mike Horvath <mik### [at] gmailcom> wrote:
>
> Is it possible to create an empty texture? In this case, I could swap
> out the current textures and instead apply one texture to the entire
> scene. Without too much effort on my part if it works.
>
Yes, you can create an empty texture, like this... texture{} .... which, as
far as I know, is the same as having no texture statement at all-- in which case
POV-Ray substitutes it's own default texture (the common black color which we've
all seen.) BUT, if you create your *own* #default{....} texture, then the
'empty texture' statement will use that instead. Which leads to something
interesting...
> Stephen wrote:
> Why not put your textures in an INC file then you could put your
> alternative textures in another INC file. If they have the same names
> you can select which set of textures to use by using the #include command.
Combining Stephen's idea with the above #default texture scheme could produce
what you're looking for-- the 'color blend' on all the objects in your scene,
from z = 0 to z = *whatever distance*. (I can't say that it's less WORK than
simply commenting-out your original scene textures, the way Thomas and I
mentioned earlier, but it's worth trying.)
The idea is to put all of your 'main' scene textures into one #include file, and
the RED-to-GREEN 'overall depth texture' into another #include file (this will
be your #default texture.) Then you #include one or the other of these files
into your scene. I just tried this scheme, and here's an example of how it would
work:
(Assume that you have only three objects in your scene, just as a
demonstration:)
--- main scene file--
// the three objects
sphere{.... texture{TEX_1}
box{.... texture{TEX_2}
cylinder{.... texture{TEX_3}
The two #include files would be written like this (simple text files):
--- 'main' textures file called "REAL TEXTURES" --
#declare TEX_1 =
texture{
pigment{srgb <.7,.3,.5>}
finish{ambient .2 diffuse .8}
}
#declare TEX_2 = // different from TEX_1
texture{
pigment{srgb <.2,1.3>}
finish{ambient .5 diffuse .5}
}
#declare TEX_3 = // different from TEX_1 and TEX_2
texture{
pigment{srgb .5}
finish{ambient .2 diffuse .8}
}
--- the 'color blend' texture file, called "COLOR BLEND TEXTURE" ---
#default{
texture{ // blend of RED to BLUE along z-axis
pigment{
gradient z
color_map{
[0 srgb <1,0,0>] // RED
[1 srgb <0,0,1>] // BLUE
}
scale 1000*z // or similar, to cover entire z-depth of scene
}
finish{ambient .2 diffuse .8}
}
}
#declare TEX_1 = texture{}
#declare TEX_2 = texture{}
#declare TEX_3 = texture{}
-----------
Then just #include one or the other of these files into your scene (at the
beginning somewhere.) The 'main' textures will all be changed to the single
color-blend texture, on all the objects.
The only drawback is how to get an exponential or logarithmic color blend in the
color_map, rather than a linear blend (referring to your other post); offhand, I
don't know how that could be done.
Post a reply to this message
|
|