|
|
In povray.general there's been a recent discussion on using functions to
define height fields on the fly. I had the thought height_fields a good
way to see how wave modifiers and warps can be used to change up
patterns and 'terrain' too.
Attached is an image of 8 height_fields based upon a based on the
granite pattern. Seven use only wave modifiers to change up the terrain.
One uses a warp of directional turbulence.
Posting in this pov4 forum due using a couple of povr specific wave
modifier updates. The ideas apply to official POV-Ray releases too.
Bill P.
// The core code for reference.
#declare FnBase = function { pattern {
granite scale 0.7
warp {
turbulence <0.25,0.05,0> octaves 4 omega 0.6 lambda 2.3
}
}
}
#declare FnCubic = function { pattern {
// Povr's cubic_wave changed from POV-Ray's
granite cubic_wave phase 0.3 frequency 1.77 scale 0.7 }
}
#declare FnSine = function { pattern {
granite sine_wave scale 0.7 }
}
#declare FnScallop = function { pattern {
granite scallop_wave scale 0.7 }
}
#declare FnTri = function { pattern {
granite triangle_wave scale 0.7 }
}
#declare FnTriInv = function { pattern {
// Povr added an inverse wave modifier
granite triangle_wave inverse scale 0.7 }
}
#declare FnPoly2_0 = function { pattern {
granite poly_wave 2.0 scale 0.7 }
}
#declare FnPoly0_2 = function { pattern {
granite poly_wave 0.2 scale 0.7 }
}
//---------
#declare Orange = srgb <1,0.50196,0>;
#declare HF_Base = height_field {
function 800, 800 { FnBase(x,y,z) }
smooth // With smooth runs faster.
scale <1,0.05,1>
pigment { color Orange }
}
#declare Acorn = srgb <0.41569,0.36471,0.10588>;
#declare HF_Cubic = height_field {
function 800, 800 { FnCubic(x,y,z) }
smooth // With smooth runs faster.
scale <1,0.05,1>
pigment { color Acorn }
}
#declare Akaroa = srgb <0.83137,0.76863,0.65882>;
#declare HF_Sine = height_field {
function 800, 800 { FnSine(x,y,z) }
smooth // With smooth runs faster.
scale <1,0.05,1>
pigment { color Akaroa }
}
#declare Alpine = srgb <0.68627,0.56078,0.17255>;
#declare HF_Scallop = height_field {
function 800, 800 { FnScallop(x,y,z) }
smooth // With smooth runs faster.
scale <1,0.05,1>
pigment { color Alpine }
}
#declare Amazonite = srgb <0,0.76863,0.6902>;
#declare HF_Tri = height_field {
function 800, 800 { FnTri(x,y,z) }
smooth // With smooth runs faster.
scale <1,0.05,1>
pigment { color Amazonite }
}
#declare AndroidGreen = srgb <0.64314,0.77647,0.22353>;
#declare HF_TriInv = height_field {
function 800, 800 { FnTriInv(x,y,z) }
smooth // With smooth runs faster.
scale <1,0.05,1>
pigment { color AndroidGreen }
}
#declare Apricot0 = srgb <0.92157,0.57647,0.45098>;
#declare HF_Poly2_0 = height_field {
function 800, 800 { FnPoly2_0(x,y,z) }
smooth // With smooth runs faster.
scale <1,0.05,1>
pigment { color Apricot0 }
}
#declare AppleBlossom = srgb <0.68627,0.30196,0.26275>;
#declare HF_Poly0_2 = height_field {
function 800, 800 { FnPoly0_2(x,y,z) }
smooth // With smooth runs faster.
scale <1,0.05,1>
pigment { color AppleBlossom }
}
//---------
#declare Union00 = union {
object { HF_Base }
object { HF_Cubic translate <-1.0,0,0>}
object { HF_Sine translate <-0.5,0,1> }
object { HF_Scallop translate <-2.0,0,-0.5> }
object { HF_Tri translate <-1.0,0,-1> }
object { HF_TriInv translate <0,0,-1> }
object { HF_Poly2_0 translate <-0.5,0,-2>}
object { HF_Poly0_2 translate <1,0,-0.5> }
}
Post a reply to this message
Attachments:
Download 'hf_wavemods.jpg' (267 KB)
Preview of image 'hf_wavemods.jpg'
|
|