Cycles Brick Tricks 0.1

Lets cut to the chase, what can you do with it?

A while ago I submitted a patch to the brick texture in blender, which got less than enthusiastic feedback, new procedural texture options were not something the devs were looking for. so new task unlocked: enable new (gpu usable) procedurals without having to make changes to the blender codebase, solution: nodegroups!

Why nodegroups and not OSL? The hexagon image above? 60+ minutes using osl scripts, same math put in a nodegroup and rendered on the gpu? 10 minutes! that’s why! OSL is great for prototyping (and all these nodes have been prototyped in osl) but it’s not a fast renderer…

Initially I extended the brick texture, but there were just some things the brick texture was not meant to do, and making a single node do everything just turned awkward really quickly.

Solution: split it up into several stages:

  • Stage 1: Get a tile UV map!
  • Stage 2: Customizable Bricks / tiles

Stage 1:
Here we have the following options:

  1. uv_map_brick_wall : Classic Brick wall , similar to the one we already have in blender

  2. uv_map_tile_pattern_1 : a classic 2x2 brick pattern

  3. uv_map_tile_pattern_2 : a classic zig zag brick pattern

  4. uv_map_swirl : a nice swirly pattern (great for patio’s!)

Stage 2: tiles!

  1. brick_square_corner : Your standard square brick

Has the basic options, to set border and feather so you can control both the size and smoothness of the brick

  1. brick_rounded_corner : a rounded brick

just the corners, completely round? it’s all possible!

you can even overdo it, and get some kind of diamond shaped pattern, great for some scifi metal plate work

Basic Setup

Left to right:

Texture coordinates: Since nodegroups cannot have a default input like texture nodes have, you have to manually plug in the coordinates, annoying, but that’s just how things are.

uv_map_tile_pattern_1 : get the uv map

brick_square_corner : I went for a basic square brick

Diffuse: nothing special here, needed to see output of the previous blocks


At this point, you have a nice height map for your tiles, you can plug it into a bump map node, or perhaps use some micro displacement and use it for displacement.

Shaping your Brick

By default feather applies a linear slope to your brick, which looks kinda weird when you use it with a basic displacement setup like this:

I bet there’s uses for it, lets be honest but it’s not the prettiest thing around.

The fix? RGB Curves! This allows you to tweak the edge of the tile to get nice natural looking results

Basic Variations
All of the uv_map nodes have a cellID output node, this gives you a unique value per brick, this allows you to apply some variations to each brick, in this case you assign a random color based on the cellID

Basic Variations - 2 : uv_map_rotate
In the real world no brick layer is perfect and sometimes, some bricks are not quite on the same angle as other bricks, here’s where our next node shines. This builds on previous setup with a color per brick, and adds a small rotation per brick

Basic setup:

Bonus Content:

bonus_hexagon, I couldn’t get the uv mapping working the way i wanted with this one, even in it’s less than optimal state, this one was just too much fun to leave out.


More Advanced setup:

Naturally the things i’ve shown only scratch the surface of the possibilities, but here’s some basic variations you can make with this kit.

Download: (most if not all materials in the collage above are included)
brick_tricks v0.1.blend (1.87 MB)

If you make something neat with it, feel free to show the results of your handy work below!

Update: now an addon, available here:

Update 2019-05-18 The latest version on github has been updated to support 2.80, The 2.79 release is still available in the release tab.


wow, you must really like the brick texture. and i like your dedication


I actually love you for that hexagon texture!


Got it.

Will give it a go at a later date (when I’m working on a scene that needs it).

I didn’t know you could already do that stuff with the brick node (and especially good that you don’t need OSL).

Damn that’s neat! :eyebrowlift2: I’m curious with the UV mapping thing… Is it now possible to have different images plopped onto each brick? So we could use the grayscale of the usual brick color randomizing thing and have a few different images placed by thresholds within that value range. So randomly chosen images for each brick?

It’s something I thought of before while trying to make an image collage, but the default brick texture settings fell short of being able to do it. Might be something to look into now.

Looking great. I love the neon brick render. It really shows what potentials it has. Great work!


Did a crappy try for bee wax:


It’s not difficult to implement that in the nodes, but you can do it outside of the nodegroups, with the CellID and UV outputs. Just a matter of scaling the UV down and add the CellID to it.

Cycles doesn’t really offer a node to chose a random image, so you always end up with a bunch of mix nodes and do it your self , but yeah sure, it’s not hard to do:

impressive work

Nice work what material have you used for the honeycomb bee wax ?

Regular Subsurface scatter shader with slight mix with glass. But I’m not fluent in nodes, still learning. I don’t think the glass shader did anything. Also rendered it with a special build with denoiser. Otherwise it would be crazy noisy-

Again to LazyDodo: Awesome stuff!

That’s not brick tricks, that’s black brick magic :slight_smile: Awesome and very generous of you to share it. Thanks a lot for this, LazyDodo!

That’s a awesome set of nodes. Great work.

Had a look at your node group, did you write an OSL -> Node converter perchance??

I did, however, it’s very limited though, there’s only a small subset of osl you can express in svm nodes but most of the mathy stuff works. basic if then else constructs, and loops with known bounds are unrolled automatically. The bad news is, it’s really not ready for general consumption (if ever) there’s just too many limitations.

1 Like

Thats super cool. I was thinking about writing one myself but never have had the time!

Tkz !
I like it !!!

You did a good job.

Thank you for sharing it.

Awesome job :slight_smile: Thank you for sharing

Amazing job! And very sad to know that OSL is much slower than a web of nodes.