|
![](/i/fill.gif) |
clipka wrote:
> Sorry, I forgot that with that hf_function1 being a pigment function,
> you'll need to evaluate a particular color component, so instead of
>
> hf_function1(...)
>
> you need to write:
>
> hf_function1(...).grey
>
> (or .red, .green or .blue, but if I'm not mistaken the height_field
> object uses the combined grey value as well, so the same should be used
> as the basis for the curvature computations.)
Thanks! However, all I see is black. Here are the relevant portions of
my scene.
-Mike
//START
#local hf_pigment1 = pigment
{
image_map {png "hf_big.png"}
rotate x * 180 // flipped
}
#local hf_function1 = function {pigment {hf_pigment1}}
#local dv_D = 1/1024;
#local dv_Sqr = function(x) {x * x}
#local dv_G = function(x,y,z)
{
sqrt
(
dv_Sqr(hf_function1(x - dv_D,y,z).gray + hf_function1(x +
dv_D,y,z).gray - 2 * hf_function1(x,y,z).gray)
+
dv_Sqr(hf_function1(x,y - dv_D,z).gray + hf_function1(x,y -
dv_D,z).gray - 2 * hf_function1(x,y,z).gray)
)
}
height_field
{
function 1024, 1024 {hf_function1(x,y,z).gray}
smooth
texture
{
pigment
{
function {dv_G(x,y,z)}
color_map
{
[0 rgb 0]
[1 rgb 1]
}
}
finish {ambient 1}
}
translate <-1/2,0,-1/2,>
}
//END
Post a reply to this message
|
![](/i/fill.gif) |