Box mapping for procedural brick texture in cycles

(Yashar Khanpour) #1

Hi
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

6 Likes
Sharing: Over-Engineered Mapping Node Alternative
(Koumis) #2

Looks like a great solution, i look into this!

(Yashar Khanpour) #3

Thank you .

(cgCody) #4

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
(bkjernisted) #5

Thank you yashar. Very impressive.

1 Like
(Yashar Khanpour) #6

Nice job :+1::+1:

(onnevan) #7

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?

(Metin Seven) #8

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.

(onnevan) #9

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

(Metin Seven) #10

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

(onnevan) #11

mmm…not necessarily

This is Simon Thommes’s procedural brick shader

1 Like