|
|
"Thomas de Groot" <tDOTdegroot@interDOTnlANOTHERDOTnet> wrote:
> I roughened the surface a bit up and applied a slope/altitude texture to the
> dirt for more reflections around the water and none higher up. I might be
> able to use this same texture as a pigment_pattern to vary the cobbles'
> finish in the same way.
Thomas, here's a simple example of what I was suggesting about breaking up the
paver reflections more via a pigment_pattern mask.
In this way each brick can have its own unique pigment and normal, but the
finish is applied across the union of all bricks (as long as the texture is
applied /after/ the brick transformations):
//-------------------Start Code-------------------
#declare R = seed(0);
#declare R1 = seed(0);
#declare Brick = superellipsoid {<0.1,0.1> scale <8, 2.5, 4>/4 scale 0.975}
#declare Show_Pigment_Pattern = 0;
#macro Build_Texture()
#local n1 = RRand(0.05,0.25,R);
#local n2 = RRand(0.25,0.75,R);
#local n3 = RRand(0,100,R);
#local c1 = RRand(0.1,0.8,R1);
#local c2 = RRand(0.1,0.8,R1);
// simple mask to define scattered reflection areas
pigment_pattern { dents scale 1.5 turbulence 0.5 }
texture_map {
[0
#if (Show_Pigment_Pattern)
pigment { rgb 0 }
#else
pigment { bozo pigment_map { [0.5 rgb c1][1 rgb c2] } }
normal { granite n1 scale n2 translate n3 }
finish { specular 0 reflection 0 diffuse 0.25 }
#end
]
[1
#if (Show_Pigment_Pattern)
pigment { rgb 1 }
#else
pigment { bozo pigment_map { [0 rgb c1][1 rgb c2] } }
normal { granite n1 scale n2 translate n3 }
finish {
specular 1.5 roughness 0.02
reflection { 0.5, 1 fresnel on } conserve_energy
}
#end
]
}
#end
#declare Floor = object {
Center_Object(
union {
#local cnt=0;
#local xx=0;
#local nx=0;
#while (nx<10)
#local zz=0;
#local nz=0;
#while (nz<30)
object { Brick
rotate <RRand(-2,2,R),RRand(-2,2,R),RRand(-2,2,R)>
translate <xx, RRand(-0.05,0.05,R),zz>
#if (mod(cnt,2)=0) translate x*2 #end
texture { Build_Texture() }
}
#local cnt=cnt+1;
#local zz=zz+2;
#local nz=nz+1;
#end
#local xx=xx+4;
#local nx=nx+1;
#end
},x+y+z
)
}
object { Floor translate z*10 interior { ior 1.33 } }
//-------------------End Code-------------------
I hope this helps...
Cheers,
Rob
-------------------------------------------------
www.McGregorFineArt.com
Post a reply to this message
Attachments:
Download 'reflectionmaskingbricks.png' (760 KB)
Preview of image 'reflectionmaskingbricks.png'
|
|