|
|
spa### [at] raf256com news:Xns9590DDE145B7Eraf256com@203.29.75.35
> Parse Error: Cannot layer a patterned texture over another.
>
After a bit of reading manual, actually there is a sollution,
2.3.4.12 Limitations Of Special Textures
For example, say we have a layered texture called Speckled_Metal, which
produces a silver metallic surface, and then puts tiny specks of rust all
over it. Then we decide, for a really rusty look, we want to create patches
of concentrated rust, randomly over the surface. The obvious approach is to
create a special texture pattern, with transparency to use as the top
layer. But of course, as we have seen, we would not be able to use that
texture pattern as a layer. We would just generate an error message. The
solution is to turn the problem inside out, and make our layered texture
part of the texture pattern instead, like this
// This part declares a pigment for use
// in the rust patch texture pattern
#declare Rusty = pigment {
granite
color_map {
[ 0 rgb <0.2, 0, 0> ]
[ 1 Brown ]
}
frequency 20
}
// And this part applies it
// Notice that our original layered texture
// "Speckled_Metal" is now part of the map
#declare Rust_Patches = texture {
bozo
texture_map {
[ 0.0 pigment {Rusty} ]
[ 0.75 Speckled_Metal ]
[ 1.0 Speckled_Metal ]
}
}
And the ultimate effect is the same as if we had layered the rust patches
on to the speckled metal anyway.
...sorry for easy question then. And bless manual :)
--
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics
Post a reply to this message
|
|
|
|
pov### [at] tomandlucouk news:418298ab@news.povray.org
> Yep - I nearly posted an example (I forgot that this was covered in
> the manual).
Btw, more complicated example:
#declare GRASS =
texture {
bozo
texture_map {
[0.0 textGrass1 ]
[0.7 textMud1 ]
}
}
where textGrass1 and Mud1 already are layered textures.
Now we wont to make it more advanced:
#declare EARTH =
texture {
granite y
[0 GRASS]
[1 MOUNTAINS]
}
How can I achive this result? Because if I understand correctly, then now I
would need to add this granite y to every one component of GRASS and of
MOUNTAINS, with gives several textures that need to be modyfied.
Imho this is quite not-comfortable... perhaps it would be a good idea to
allow "normal" definitions?
--
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics
Post a reply to this message
|
|