Box mapping for procedural brick texture in cycles

As mentioned before there is no box mapping for procedural brick texture in cycles like the box mapping option in image texture.
Unwrapping is not efficient for walls and buildings because of the extra work and size dependency.

There is a work around here named Triplanar mapping that mix three copies of texture projected from three axis to wrap around the object.

I made a simplified version which mix only the projection UVs and doesn’t need texture duplication.
Some math node with greater than .5 operation added to axis masks to prevent fading and doubling on flat faces which are not perpendicular to the projection axis.

Here are some screen shots and the blend file
Box Mapping.blend (576.6 KB)

Final result

Node Graph

Original Node Graph at Triplanar mapping

Default Object mapped UV (Projected from Z axis)

Box mapped UVs (Mixed from X and Y axis projection)

X mask

Y mask

Default Object mapped brick texture

Box mapped brick texture

With Procedural brick texture model modification and extrusion are free-hand and without UV distortion


Looks like a great solution, i look into this!

Thank you .

This is great! I’ve incorporated this setup into a procedural texture of my own.

I originally had gone with a triplanar setup, but didn’t like the idea of tripling all of my nodes just to get some blending. This is much more elegant.

1 Like

Thank you yashar. Very impressive.

1 Like

Nice job :+1::+1:

This is amazing! just what I needed. Could you explain what those nodes do? also, could blendeing be added for round corners, maybe with a very tiny noise map?

Select Box projection in the Image Texture node, and set it to Blend. Then adjust the Blend value to your liking. Blended Box mapping is comparable to Tri-Planar mapping.

But it’s brick texture what I’m talking about, not image texture, tht’s why I was asking if that could be done with a tiny noise mask or maybe a color ramp

Ah, I see. :slightly_smiling_face: You could use a brick texture with Blended Box mapping. It’s more realistic. :wink:

mmm…not necessarily

This is Simon Thommes’s procedural brick shader

1 Like