|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I have a little problem with transparency. Let's say I have a sphere textured
with a crackle pattern. I want a brick pattern to appear on the surface of my
sphere only in some spots. Is there a way to add a noise pattern to the
transparency channel of my brick pattern to achieve this?
NOTE: I need to do this with patterns, can't solve this with image_map.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
If I understand your question correctly, overlaying one pigment or texture onto
another--in only some spots--is a simple trick; no need for actual 'noise.' The
idea is to pigment the sphere with crackle first, then add brick
on top of it--held back in some areas using the transparency of a third pattern,
as a 'mask.'
Here's an example, done two different ways. I used the bozo pattern as a
substitute for your 'noise' idea--any other pattern could also be used. BTW,
you'll see that the scale of the bozo 'mask' also scales the pigments within its
pigment_map--so the various scales are interdependent.
// #1
sphere {0,1
texture {
pigment {crackle scale .1}
finish{ambient .2 diffuse .8}
}
texture{
pigment{
bozo
scale .1
pigment_map{
[0.0 rgbt 1] // the transparent parts of the mask
[0.5 rgbt 1]
[0.5 brick scale .5]
[1.0 brick scale .5]
}
}
finish{ambient .2 diffuse .8}
}
}
OR...
// #2
sphere{0,1
texture{
pigment{
bozo
scale .1
pigment_map{
[0.0 crackle scale .8]
[0.6 crackle scale .8]
[0.6 brick scale .5]
[1.0 brick scale .5]
}
}
finish{ambient .2 diffuse .8}
}
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> I have a little problem with transparency. Let's say I have a sphere textured
> with a crackle pattern. I want a brick pattern to appear on the surface of my
> sphere only in some spots. Is there a way to add a noise pattern to the
> transparency channel of my brick pattern to achieve this?
>
> NOTE: I need to do this with patterns, can't solve this with image_map.
>
>
You can layer several textures. In your case, start with the brick
pattern. Then, add your crackle pattern with a color_map that contains
some transparency. The seams of the crackle corespond to low values and
the centers to high values. It can be something like:
texture{pigment{brick...}}
texture{pigment{crackle color_map{[0 rgb 1][1 rgbt 1]}}
Change the "[x" values to controll the point where the transition occurs
and it's sharpness. If the values are very close together, or even
equal, the transition get sharper. If the lower value increase, the area
where the brick pattern is visible get smaller. Reduce the larger value
to see more of the brick pattern. The sample gives you the fuzzyest
transition.
You can also have a texture in another texture by using texture_map.
It can look like: (where Texture_One and Texture_Two are previously
defined textures using a #declare)
texture{crackle
texture_map{[0 Texture_One][0.78 Texture_Two][0.8 texture{brick...}]}//
end of map
} // end of texture
You can also use another pattern:
pigment{bozo color_map{
[0.80 pigment{crackle...}]
[0.85 pigment{brick...}]
}
}
Here, 15% of the surface will use the brick pattern, 80% will use the
crackle and you get a fuzzy transition of 5%.
This is legal: color_map{[0.5 rgb<1, 0.5, 0.1>][0.5 rgb<0.2, 0.6, 0.4>]}
From 0 to 0.5, you use the first color, and from 0.5 to 1, you use the
second one.
color_map need pigments or simple patterns.
texture_map use textures that can include a finish.
Alain
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Alain wrote:
> This is legal: color_map{[0.5 rgb<1, 0.5, 0.1>][0.5 rgb<0.2, 0.6, 0.4>]}
Great! Didn't know this ;)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Alain wrote:
>
>> This is legal: color_map{[0.5 rgb<1, 0.5, 0.1>][0.5 rgb<0.2, 0.6, 0.4>]}
>
> Great! Didn't know this ;)
Several samples scenes use that. If you look around, you'll find many
scenes that use that. I use it from times to times.
Alain
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thanks Kenneth and Alain, I tried Kenneth 2nd method but using texture maps
instead of pigment maps and worked great. Then came back here and found Alain
had posted an example using texture maps. You've made me happier :)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |