|
|
On 2/08/2011 22:51, Christian Froeschlin wrote:
> PC John wrote:
>
>> Is there a way to combine the "average result" with the uvmapping
>> pigment? All I
>> want is to multiply them.
>
> I'm not sure I fully understand your input data. Do you have the
> uv-mapping pigment in addition to your other pigments? Otherwise
> you can just use the uv-mapped pigment in the average.
>
> If the pigments in the average are only intended as a filter for
> some base pigment then you should probably make all your pigments in
> the average use colors with filter 1 and then use layered textures
> (if you assign two textures to an object the second will cover the
> first, which only makes sense with some form of transparency).
>
> However, layering textures sometimes does not work if the
> individual textures are too complex.
won't work in this case, you can't layer texture_map textures.
But what you can do, is slightly alter each individual pigment to
incorporate you uv-maps.
You'll probably have to do some pigment-to-function-and-back
conversions, again using the same average-trick (a function can be used
as a pattern, but that's either the red, the green, or the blue channel,
never the full rgb pigment represented in the function), but I'm not
exactly sure how to multiply world-mapped pigments with uv-mapped pigments.
You can multiply each rgb-channel separately, but only before applying
the uv-mapping..
For simple colors, the results are of course the same, but multiplying
eg a bozo pigment with a uv-mapped image_map, might not give you what
you expect, as the bozo pigment will also have to be uv-mapped.
A possible solution is to use pigment_pattern, and again the same
average trick. Not sure if it'll work though
More or less something like this:
pigment {
average
pigment_map {
//red
[1 pigment_pattern {uv_mapping
function{ImagemapConvertedToFunction(x,y,z).red}
pigment_map {
[0 pigment_multiplied_by_0]
[1 pigment_multiplied_by_<1,0,0>]
}
]
...(same thing for green and blue)
}
}
Post a reply to this message
|
|