|
|
"Kenneth" <kdw### [at] gmailcom> wrote:
> I just spent four days probably 're-inventing the wheel'; but I wanted to
> investigate the behavior of the brick pattern, when using warp{repeat...} with
> an embedded cells pattern.
>
Five or six days now, I've lost count!
I went back to POV-Ray's own 'brick' pattern, and worked it all out with full
textures and normals this time. The process has been an experimentatl one,
changing one value after another to see what happens. But the code looks stable
now.
Bill P's code certainly looks less complicated! (I need to take a look at it in
detail... after I take a coffee break!)
//------------
#version 3.71;
global_settings {assumed_gamma 1.0}
camera {
perspective
location <0, 0, -7>
look_at <0, 0, 0>
right x*image_width/image_height
angle 46 // 46
}
light_source {
0*x
color rgb 1.0
translate <20, 50, -10>
}
// background
plane{z,60
no_shadow
pigment{bozo
scale 3*<4,1,1>
color_map{
[.2 rgb .6]
[.3 rgb .8]
[.35 rgb 1]
[.40 rgb 1]
[.58 rgb <.5,.7,1>]
}
scale .5
warp{turbulence .3 omega .7}
scale 1/.5
}
}
#declare BR_RATIO = <4,2,4>; // the brick dimensions (just a ratio, not
// really a scaler.) For matching SIDE walls, z needs to equal x--
// a 'square brick'.
#declare MORTAR_THICKNESS = .12; // this is in a different 'scale' than
// POV-Ray's own brick pattern. Here, it's 0.0 to 1.0
// This is get BR_RATIO.y to always be 1.0, for technical reasons that are
// hard to explain ;-)
#declare XYZ =
<BR_RATIO.x/BR_RATIO.y,
BR_RATIO.y/BR_RATIO.y,
BR_RATIO.z/BR_RATIO.y>;
//--------------
box{0,9.75
texture{
brick
texture{ // the MORTAR
pigment{rgb .4} //bumps scale .04 translate 100}
normal{bumps scale .09 bump_size .7
}
finish{ambient .1 diffuse .9}
}
texture{ // the BRICKS
pigment{
average
pigment_map{
[1
cells
pigment_map{
blend_mode 2
blend_gamma 2.2
[0 rgb .1*<1,.28,.24>]
[1 rgb .85*<1,.28,.24>]
}
]
[.5 bumps scale .08*<1/XYZ.x,1/1,1/XYZ.z>
color_map{
blend_mode 3
blend_gamma 2.2
[.5 rgb .3]
[.5 rgb .3*<1,.28,.24>]
}
]
}
warp{repeat y offset <1000.5,0,999.5>}
translate .5*z
scale <XYZ.x,1,XYZ.z>
} // end of this pigment
normal{
average
normal_map{
[1.0 quilted scale 1 bump_size 5] // This pattern doesn't
// need the warp{repeat...} below, which affects it an odd and subtle way;
// note the darker brick 'shadows' in every alternate row of bricks in y.
[0.4 crackle scale .6*<1/XYZ.x,1/1,1/XYZ.z> bump_size 5]
[0.3 crackle scale .2*<1/XYZ.x,1/1,1/XYZ.z> bump_size 3 translate 50*x]
}
warp{repeat y offset <1000.5,0,1000.5>}
translate .5*z
scale <XYZ.x,1,XYZ.z>
}
finish{ambient .1 diffuse .9}
} // end of this texture
// still part of the overall 'brick' TEXTURE
brick_size <XYZ.x,1,XYZ.z>
mortar MORTAR_THICKNESS
scale 1 // FINAL scale
// play with this!
scale 6
warp{turbulence .35 omega .6}
scale 1/6
translate <-.09,-.09,-.09> // because of warp{turbulence} effects
} // end of overall texture
translate -5
rotate 30*y
rotate 15*x
translate 20*z
}
Post a reply to this message
Attachments:
Download 'temp 6.jpg' (775 KB)
Preview of image 'temp 6.jpg'
|
|