|
|
Am 19.04.2018 um 00:53 schrieb Bill Pragnell:
> This is fun! I always meant to make some random bricks, so I've just had a go
> myself. I ended up with almost exactly what you've got (more or less) which is
> good. However, I don't think you need the oversized offset value - just 1.5 in x
> and z is fine.
>
> I've boiled it down a little. Here's a macro to insert a pigment - I went with
> the same principle of using the brick pattern for the mortar and the cells
> pattern for the bricks themselves.
>
> (BrickSize is a vector describing the brick dimensions, BaseCol and MortarCol
> are colour vectors, and MortarThickness is just the mortar float value.)
>
>
> #macro RandBrick(BrickSize, BaseCol, MortarCol, MortarThickness)
> #local RBrick = pigment {
> cells
> color_map { [0 rgb BaseCol] [1 rgb 0.25*BaseCol] }
> translate z*0.5
> warp { repeat y offset <1.5, 0, 1.5> }
> scale BrickSize
> }
> pigment {
> brick
> pigment { rgb MortarCol },
> pigment { RBrick }
> brick_size BrickSize
> mortar MortarThickness
> }
> #end
>
>
>
I never came up with the idea to use the cells pattern this way. But my
goal was not different textured bricks but rubble work. So i played a
little bit with the brick pattern (and still need some time to get a
better approximation). One of the most annoying issues was that I had
only two textures (mortar and brick). But now you gave me a new
direction to play a little bit more with something like this:
#declare BrickSize = <8,3,4.5>; // Default, but needed to scale the
cells pattern
#declare CellsStoneTex = texture {
cells
texture_map {
[ 0.00 T_Grnt20 ]
[ 0.25 T_Grnt7 ]
[ 0.50 T_Stone21 ]
[ 0.75 T_Stone10 ]
[ 1.00 T_Grnt28 ]
}
translate z*0.5
//warp { repeat y offset <1.5,0,1.5> }
scale BrickSize
}
texture {
brick
texture { T_Grnt1 finish { phong 0.5 } }, // Mortar
texture { CellsStoneTex }
brick_size BrickSize
mortar 0.2
scale 0.1
warp { turbulence 0.4 octaves 8 lambda 3 omega 0.5 }
}
Many thanks to both of you!
Best regards
Michael
Post a reply to this message
|
|