|
|
> I'm trying to muddle through the process of using an image file to create a
> 3D-ish looking ornate picture frame.
>
> I kinda 'get' that I'll probably have to nest 1 or 2 of these
> image/pigment/pattern/map(s) together in order to get this to work, but I'm
> getting all twisted up.
> I finally figured out how to FILL the border and center of the frame with a
> transparent color in Paint.Net, so I have a frame composed of white, black, and
> the transparent parts that I don't wish to be visible when rendered.
>
> I haven't done much with these commands, but I've seen that folks reference
> their use a lot, so they seem like a powerful tool.
>
> Can someone give me a clue?
>
> height_field {png "Frame2.png" smooth
> translate<-0.5,-0.0,-0.5>
> scale <946, 15, 799>/5
> rotate -x*90
>
> texture {
> image_pattern { png "Frame2.png" once}
> texture_map {
> [0 MyGold]
> [1 pigment { transmit 1 } ]
> }
> }
> }
>
>
Well... you really didn't need alpha for this: the height_field
object has a "water_level" statement wich allows you to cut the
undesired parts. This way you don't need to use a texture map, just a
regular texture. For this to work, just paint the border and center with
total black, and the desired frame with a grayscale above black, then
use "water_level 0.01" or so (might need some trial&error to find the
best level).
height_field {png "Frame2.png" smooth
water_level 0.01
texture {MyGold}
translate<-0.5,-0.0,-0.5>
scale <640, 15, 400>/5
rotate -x*90
}
Anyhow, on the example you posted, I guess you are missing some
transformations on the texture: if you want it to align with the object.
My prefered way would be:
height_field {png "Frame2.png" smooth
texture {
image_pattern { png "Frame2.png" once}
texture_map {
[0 MyGold]
[1 pigment { transmit 1 } ]
}
rotate 90*x
}
translate<-0.5,-0.0,-0.5>
scale <946, 15, 799>/5
rotate -x*90
}
Also, I guess you may want to reverse the texture map entries and
adjust the transition...
Regards,
--
jaime
Post a reply to this message
|
|