|
|
High this is the code used in my rocks image - be warned it is very slow.
Enjoy
Mick
//--------------------------------------------------------------------------
-----
#declare fn_G = function{ f_ridged_mf(x, y, z, 0.2, 3.3, 9 ,0.6, .6, 2.25) }
#declare PigmpOne = pigment_map{
[0 rgb <1.0, 0.85, 0.6>*.45]
[0.1 rgb <0.5, 0.9, 0.2>*.15]
[0.2 rgb <0.75, 0.95, 0.2>*.15]
[.325 rgb <.9, 0.75, 0.65>]
[.5 rgb <.9, 0.75, 0.55>]
[.65 rgb <.2, 0.1, 0.05>]
[.75 rgb <.95, 0.75, 0.45>]
[.825 rgb <0.15, 0.375, 0.05>*.475]
[.875 rgb <0.35, 0.45, 0.0125>*.5]
[1 rgb <1, 0.5, 0.2>]
}
#declare PigmpTwo = pigment_map{
[0 rgb <1.0, 0.85, 0.6>*.3]
[0.1 rgb <0.5, 0.9, 0.2>*.1]
[0.2 rgb <0.75, 0.95, 0.2>*.1]
[.325 rgb <.9, 0.75, 0.65>]
[.5 rgb <.9, 0.75, 0.55>]
[.65 rgb <.2, 0.1, 0.05>]
[.75 rgb <.95, 0.75, 0.45>]
[.825 rgb <0.15, 0.375, 0.05>*.325]
[.85 rgb <0.35, 0.45, 0.0125>*.35]
[1 rgb <1, 0.5, 0.2>]
}
#declare RockTex =
texture {
pigment{
bozo pigment_map{
[0
wrinkles
turbulence .6 octaves 5
pigment_map{PigmpOne}
scale .75
]
[1
agate
turbulence .6
pigment_map{PigmpTwo}
scale .5
]
}
scale<.25 ,2,.25>
}
finish {
diffuse 1
ambient 0
specular .35
}
rotate x*-90
scale <.5,12,1>
scale .25
}
//=============================
#declare fn_Grnd =function {
pigment {
leopard
color_map {
[0 color rgb 0]
[1 color rgb 1.25]
}
scale .5
}
}
#declare fn_Grnd2 =function {
pigment {
leopard
color_map {
[0 color rgb 0]
[1 color rgb 1.5]
}
scale .5 translate <1.5,0,1.5>
}
}
#declare CF = function{pigment{crackle form<.25,0,.25> ramp_wave scale .2
turbulence .3 rotate x*-90 rotate y*-45 }}
#declare CF2 = function{pigment{
gradient y pigment_map{[0 wrinkles
turbulence .3 scale 5]
[1 crackle solid
ramp_wave
rotate x*-45
rotate z*-35 rotate y*-25
turbulence
.4 frequency 2
scale
<.05,.15,.15>*2.5
translate <.3,.5,.3>
]
}}}
#declare CF3 = function{pigment{
gradient y
//bozo
pigment_map{ [0 wrinkles turbulence .3 scale
5]
[0.99 wrinkles
turbulence .3 scale 5]
[1 average
pigment_map{
[1
crackle solid ramp_wave
color_map{
[0
rgb .5]
[0.3 rgb .35]
[1
rgb 0]
}
]
[1
crackle solid scallop_wave
color_map{
[0
rgb .5]
[0.3 rgb .35]
[1
rgb 0]
}
]
}
]
}
rotate x*-45
rotate z*-70 rotate y*35
turbulence
.5
scale
<.05125,.15,.15>*5
}}
#declare Rocks =
isosurface {
function {
y
- fn_G(x, y, z)*0.3
- fn_G(x*3, y*3, z*3)*0.1
-fn_Grnd(x/2, y, z/2).gray*.5
+f_noise3d(x/3,y/2,z/3)*.0125
+(CF (x*2,y*2,z*2).gray)*(.175/2)
+CF3(x*3,y*2,z*3).red*.025
}
max_gradient 1.5
contained_by { box {<-5,-.1 , -30>, <5, 1, 20> }}
}
object{Rocks
scale <14,120,30>
scale <-1,1,1>
translate <-55,-5,1200>
texture{RockTex}
hollow
}
Post a reply to this message
|
|