|
|
I'm having a bit of difficulty structuring my texture statement for a
black&white frame. I'm guessing that I somehow need to use "use_alpha", and
then have another level of the hierarchy specify the mapping of the textures for
the black and white regions of the image.
NOT using the use_alpha keyword and just texture_map from 0.01 to 1 didn't seem
to quite give me what I wanted. I still seem to be experiencing a bit of
confusion with all the different map types and how to structure them.
Can anyone jump in with an explanation, or some example code?
Thanks!
#declare ImageMap =
texture {
image_pattern { png "AlphaMirror2.png" use_alpha once}
texture_map {
[0.00 texture_map {
[0.00 pigment {Black}] // DullGold]
[1.00 pigment {White}] // DullGold]
}]
[1.00 pigment { transmit 1 }]]
}
}
Post a reply to this message
|
|
|
|
Am 23.10.2014 21:35, schrieb Bald Eagle:
> I'm having a bit of difficulty structuring my texture statement for a
> black&white frame. I'm guessing that I somehow need to use "use_alpha", and
> then have another level of the hierarchy specify the mapping of the textures for
> the black and white regions of the image.
>
> NOT using the use_alpha keyword and just texture_map from 0.01 to 1 didn't seem
> to quite give me what I wanted. I still seem to be experiencing a bit of
> confusion with all the different map types and how to structure them.
>
> Can anyone jump in with an explanation, or some example code?
> Thanks!
>
>
>
> #declare ImageMap =
> texture {
> image_pattern { png "AlphaMirror2.png" use_alpha once}
> texture_map {
> [0.00 texture_map {
What pattern is this texture_map supposed to be using?
> [0.00 pigment {Black}] // DullGold]
> [1.00 pigment {White}] // DullGold]
> }]
> [1.00 pigment { transmit 1 }]]
^
Extraneous closing bracket.
> }
> }
Presuming that "AlphaMirror2.png" is a greyscale image with additional
transparency information, you're actually /almost/ there; the code
should look something like this:
texture {
image_pattern { png "AlphaMirror2.png" use_alpha once }
texture_map {
[0.00
image_pattern { png "AlphaMirror2.png" once }
texture_map {
[0.00 pigment { Black }]
[1.00 pigment { White }]
}
]
[1.00 pigment { transmit 1 }]
}
}
Each texture_map needs its own pattern statement; "use_alpha" takes the
pattern information from the image's alpha channel, while the normal
image_pattern takes the pattern information from the image's greyscale
value.
Post a reply to this message
|
|