View Single Post
# 1 13-07-2003 , 08:09 PM
BabyDuck's Avatar
Subscriber
Join Date: Nov 2002
Location: USA
Posts: 1,170

how to: non repeating brick

here is my experience with (almost) nonrepeating brick texture. i always wondered why there was no easy solution to it. and i managed today to create something that was exactly what i want user added image

after a little bit playing i created 2 128x128 file textures with some noise in it. depending on what shade of grey is in it i activate the correct brick. for that i used stencils. each stencil took an equal part of value range (in hsv color space) with key mapping and positive key. the image it produces is pretty much useless for transparency - as it still has many shades in it. but stencil provides an out alpha that has exactly what i need. now i connected the outalpha to tranparency r g and b of the layer in layerd texture that includes my brick. and voila done.

problems: the file texture that feeds the stencils must not be filtered, so that the border from one brick to next is sharp. then to have bricks that are not like a checker needed a little workaround. i mentioned 2 testures with noise as one is for the even rows and the other for the uneven rows. to mix them together i created with 3 checker textures a alpha channel for one of the noise textures. i know i know - i could just have created a 1x2 file texture that has a white and a black pixel in it and just let it repeat. oh well - now i like i got around that with 3 checker textures - here was also important to switch off the filtering, so the edges are sharp.

the example (next post) uses 3 bricks. each is 256x128 pixel big. for not need to place it for even and uneven row seperately, the brick texture has 256x256 pixel - the brick cut in half and change left and right did the trick.

oh i know, the bricks look a bit repeating. but that will be taken care off when i use more than 3 bricks. but for only 3 small brick textures, the result is great - and if you did not notice yet - it is not repeating. well after 128 bricks it is. just imagine a brick about a foot long - and the pattern on the wall repeats after 128 feet. most walls are not that long. and you are not able to see the bricks big enough to make out the pattern anyway. also nobody forces you to use only 128x128 files for the brick distribution ...


here is the shading network:

Attached Thumbnails