|
|
Here's the stuff I promised. Note that in order for this to work, you need to
know where the edges of your object are. But hey, you built it, right??
//Code Start, Simple Cube
#version unofficial MegaPov 0.7;
camera {
location <-3,2.5,-5>
direction 1
look_at 0
}
light_source {<20,20,-40>*200 rgb 1}
light_source {<20,20,-40>*200 rgb .5 shadowless}
light_source {<-10,2,0>*200 rgb .5 shadowless}
#declare Scratching =
texture {
pigment {bozo color_map {[.2 rgb 1.25][.25 rgbt 1]} scale <20,20,1> scale
1/10 rotate 71657}
finish {ambient 0 diffuse 1 phong .25 metallic}
}
#declare Scortching =
texture {
pigment {bozo color_map {[.275 rgbt <0,0,0,.75>][.375 rgbt <0,0,0,.625>][1
rgbt <0,0,0,1>]} scale <1,1,5> warp {turbulence 1/2} scale 1/3}
finish {ambient 0 diffuse 1 phong .25 metallic}
}
#declare Dirt =
texture {
pigment {bozo color_map {[0 rgbt <.5,.3,.2,.5>][.25 rgbt <.5,.3,.2,.875>][.5
rgbt <.5,.3,.2,1>]} scale <1,1,3> warp {turbulence 1} translate 45 scale 1/4}
finish {ambient 0 diffuse 1 phong .25 metallic}
}
#declare Base_Tex1 =
texture {
pigment {rgb 1/2}
finish {ambient 0 diffuse 1 phong .75 metallic}
}
texture {Scratching}
texture {Scratching rotate -56767}
texture {Scratching rotate 8967}
texture {Scortching scale 2*z}
#declare ScratchingPig =
pigment_map {[.25 rgbt 1][.35 bozo color_map {[.55 rgbt 1][.6 rgb 1]} scale
1/8 turbulence 1][.75 rgb 1.25]}
#declare DirtPig =
pigment_map {[0 rgbt <0,0,0,1>][.5 bozo color_map {[.25 rgbt <0,0,0,1>][.75
rgb <0,0,0,.625>]} scale 1/4 turbulence 1/2]}
#macro Edges(Radius,Strength)
//Upper
cylinder {<-1,1,-1>,<-1,1,1>,Radius, strength Strength density_function 0, 1}
cylinder {<-1,1,1>,<1,1,1>,Radius, strength Strength density_function 0, 1}
cylinder {<1,1,1>,<1,1,-1>,Radius, strength Strength density_function 0, 1}
cylinder {<1,1,-1>,<-1,1,-1>,Radius, strength Strength density_function 0, 1}
//Lower
cylinder {<-1,-1,-1>,<-1,-1,1>,Radius, strength Strength density_function 0,
1}
cylinder {<-1,-1,1>,<1,-1,1>,Radius, strength Strength density_function 0, 1}
cylinder {<1,-1,1>,<1,-1,-1>,Radius, strength Strength density_function 0, 1}
cylinder {<1,-1,-1>,<-1,-1,-1>,Radius, strength Strength density_function 0,
1}
//Middle
cylinder {<0,-1,0>,<0,1,0>,Radius, strength Strength density_function 0, 1
translate <1,0,1>}
cylinder {<0,-1,0>,<0,1,0>,Radius, strength Strength density_function 0, 1
translate <-1,0,1>}
cylinder {<0,-1,0>,<0,1,0>,Radius, strength Strength density_function 0, 1
translate <1,0,-1>}
cylinder {<0,-1,0>,<0,1,0>,Radius, strength Strength density_function 0, 1
translate <-1,0,-1>}
#end
box {-1,1
texture {Base_Tex1 scale 1/2 rotate 657}
texture {
pigment {
blob {Edges(.25,.75) threshold .1 max_density 1}
pigment_map {DirtPig}
}
finish {ambient 0 diffuse 1 phong .25 metallic}
}
texture {
pigment {
blob {Edges(.075,.75) threshold .1 max_density 1}
pigment_map {ScratchingPig}
}
finish {ambient 0 diffuse 1 phong .25 metallic}
}
}
//Code End
Have fun, and I hope this helps!
H.E. Day
<><
Post a reply to this message
|
|