|
![](/i/fill.gif) |
Wasn't it ShiJie who wrote:
>Dear NG,
>
>I lack much knowledge on many of the features of PovRay. So I better ask the
>people here who are more knowledgeable than me, before I try this out.
>
>Is this
>http://www.comet-cartoons.com/toons/3ddocs/hair/
>possible on PovRay?
>(I didn't understand it 100%) but it seems to be only UV-mapping..
>(uh..uhm.. I'm not sure if Texture-mapping is also a UV-mapping.. in fact I
>don't know what UV-mapping exactly is..) but there is also opacity mapping
>(sorry if this is also a UV-mapping.. but I have the feeling that it is
>not)
>
>Sorry for my stupidity, I'll read more on UV-mapping when I get the time.
>
>Is there a way one can make the tutorial above PovRayable?
Opacity mapping is something slightly different. You achieve it in POV
something like this:
#declare HairTex = texture {
pigment_pattern {image_map {png "opacity.png" interpolate 2}}
texture_map {
[0 pigment {rgbt <0,0,0,1>}]
[1 pigment {image_map {png "texture.png" interpolate 2}}]
}
}
What happens with this code is that you use two image maps. The first
one is your opacity map and the second contains a conventional pigment
map.
The opacity map is a greyscale image. Where it is black (value 0) we've
told POV to use the texture {pigment {rgbt <0,0,0,1>}} which is
completely transparent. Where the opacity map is white (value 1) we've
told POV to use texture {pigment {image_map {jpeg "texture.jpg"
interpolate 2}}}. Where the opacity map is grey, POV produces a blend of
the two textures.
The tutorial also uses a specularity map. The main purpose of this is to
ensure that the transparent bits don't have highlights. I suggest using
the same map for opacity and specularity, which makes things much easier
in POV. All you have to do is to ensure that the invisible texture has a
finish that is completely matt (which is the default) and the visible
texture contains shiny finish parameters.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
![](/i/fill.gif) |