|
|
While exploring ways to simulate realistic rocks, I developped the following
code for use with Bill Pragnell's MeshRelief. It looks very much like some
types of layered and weathered sedimentary rocks. For those of you
interested, here follows the code to use with MeshRelief and a suitable rock
object of your choice:
//Pigments:
#declare p4 =
pigment {
quilted
control0 0.99
control1 0.99
frequency 1
color_map {
[0.00 rgb 0.2]
[0.40 rgb 0.5]
[0.45 rgb 1.0]
[1.00 rgb 1.0]
}
warp {turbulence <0.9, 0.2, 0.5>}
scale <0.5, 0.05, 0.4>
warp {turbulence <0.1, 0.1, 0.3>}
rotate 5*z
}
#declare p5 =
pigment {
average
pigment_map {
[1 p4]
[0.5 wrinkles scale 0.5 warp {turbulence 0.2}]
}
}
#declare Pig =
pigment {
quilted
control0 0.99
control1 0.99
frequency 1
color_map {
[0.00 rgb <0.2, 0.10, 0.01>]
[0.40 rgb <0.4, 0.20, 0.10>]
[0.45 rgb <0.1, 0.03, 0.01>]
[1.00 rgb <0.1, 0.05, 0.00>]
}
warp {turbulence <0.9, 0.2, 0.5>}
scale <0.5, 0.05, 0.4>
warp {turbulence <0.1, 0.1, 0.3>}
rotate 5*z
}
//Usage:
#declare dep = 0.1;
object {
MeshShape(MyObj, inobj, Center, 500, p5, dep, no, no, "")
texture {pigment {Pig} normal {granite 0.8 scale 0.001}}
}
--
All the best,
Thomas
Post a reply to this message
Attachments:
Download 'BP_meshdemo.jpg' (88 KB)
Preview of image 'BP_meshdemo.jpg'
|
|