|
|
On 16-7-2016 14:47, Bald Eagle wrote:
> Sorry to keep this thing going for this long, but perhaps someone can post some
> working code to clarify HOW to use .hf "IN" (a) function.
>
I have an example right at hand. Two steps:
//step 1:
#declare F_HF_00 =
function {
pigment {
image_map {
tga "MyOwn.tga" gamma 1.0
map_type 0
interpolate 2
}
warp {repeat x}
warp {repeat y}
scale 50
warp {
turbulence <1.5, 9, 1.5>
octaves 1 //[6]
lambda 1 //[2]
omega 0.2 //[0.5]
}
scale 1/50
}
}
//step 2:
#declare Landscape =
height_field {
function 2000, 2000 {F_HF_00(x,y,z).hf}
//smooth
translate <-0.5, -0.5, -0.5>
scale <-1, 1, 1>
scale <MyScale, 100, MyScale>
clipped_by {
box {
<-0.5, -0.5, -0.5>, <0.5, 0.5, 0.5>
scale <MyScale, 1, MyScale> * <0.99, 500, 0.99>
}
}
}
Note: The clipped_by line might be necessary to cut out the artefacts
generated by the function at the borders of the height_field.
--
Thomas
Post a reply to this message
|
|