|
![](/i/fill.gif) |
a small update after finding the original german thread:
extension of the functions to 3d
// position "inside" the stone
#declare fn_brick_x = function { x - floor(y)*brick_length/2 - floor((x -
floor(y)*brick_length/2)/brick_length)*brick_length }
#declare fn_brick_y = function { y - floor(y) }
#declare fn_brick_z = function { z - floor(y)*brick_length/2 - floor((z -
floor(y)*brick_length/2)/brick_length)*brick_length }
// middle point of the stone
#declare fn_brick_n_x = function { floor((x -
floor(y)*brick_length/2)/brick_length)*brick_length }
#declare fn_brick_n_y = function { floor(y) }
#declare fn_brick_n_z = function { floor((z -
floor(y)*brick_length/2)/brick_length)*brick_length }
// mask for motar
#declare fn_mortar = function {
max (
select(x-brick_d,1,select(brick_length-brick_d-x,1,0)),
select(z-brick_d,1,select(brick_length-brick_d-z,1,0)),
select(y-brick_d,1,select(1-brick_d-y,1,0))
)
}
this will probably lead to a lot of motar on the surface. a translation of
the texture should help in that case.
e.g.
translate <.25,0,.25>
Post a reply to this message
|
![](/i/fill.gif) |