UV Mapping Procedural Texture to Cube. I'm Missing Something.

When I try to put a procedural texture like “brick” on a cube, I get poor results. I’ve seen many, many threads trying to explain how to do this, but it seems they ALL contain either flat-out errors, mistakes, or are no longer accurate with current versions. Here’s what Blender gives you without UV mapping:


So, pretty worthless. Regardless, when I add seams and try to UV map the cube, I can’t see any way to add a procedural texture the way one would add an image in the UV window. I can get what I want by breaking the model into parts and adding my procedural texture(s) but it seems there should be a way to do this while still keeping model totality.

In your picture, it’s mapping X,Y world pos to U, V texture coords.

How to change this depends on what kind of texture you’re using, what renderer you’re using, whether you’re using nodes or not.

If you’re using Blender Internal, try changing the texture’s mapping to “cube.”

Wrapping a 2d texture around a 3d object has so many different solutions, that it’s difficult for a computer to do it without any help from the artist (typically by using uvmaps)…
Default objects have the option to be uv unwrapped at creation time, but as we normally manipulate and change those objects to fit our needs, we need to change the uvmap accordingly.

Iirc the brick texture is 2D in nature, unlike noise and voronoi which are 3D. So simply doing object coords (even if adding some random vector to avoid crossing 0 in case that was problematic) won’t work. Your faced with either unwrap, separate objects/faces and rotate coords individually, or download some kind of box projection (I don’t know why this isn’t built in in the first place - only image texture node has this option).

I get what you (all) are saying - it’s not worth trying to apply a procedural texture like this to a cube. I assumed this was possible due to several super-inaccurate posts elsewhere, but I see now why this was a fool’s errand. I will create my own texture in Photoshop instead. Thanks for clearing this up.
It really does seem weird though that the software would, by default, apply a super-stretched image to any of the sides. Seems like a big oversight.

Check out this post I posted ages ago. The material link doesn’t work anymore, but the picture is illustrating enough. The material I setup back then had two “modes”:

  1. Tile tiled white wall mode only works in scenarios where you can see the inner corner only, and fails miserably on 3D generic objects.
  2. The tiled pillars and 3D objects mode only works on generic 3D shapes where the edge don’t align perfectly with the mapping direction. What do you think will happen in this mode if you cover up a whole stone rather than clip it inside? That side would become mortar only.

It’s probably possible to node up a 3D brick texture generator that works perfectly with any cube (like my 3D tiles in that mode). But it would fail miserably with any other shape, maybe even a bevelled cube would have issues. That kinda renders that idea useless.

I’m curious though, does other software have 3D brick generators that works nicely (without any UV’ing)? As I never have to deform anything, UV’ing to me is an unnecessary step.

At a render level? Never seen nor heard of such (well, there are attemps, but all of them have flaws, and just look good in some meshes). There are algorithms that can produce very nice 3d bricks, but they perform mesh analisys in the process, and that is quite expensive to put it inside the render routines… But baking them works pretty well (though we still need UVs).


DId that with a node group I derived from: https://www.blendswap.com/blends/view/78446

and from : https://www.blendswap.com/blends/view/83465

Box mapping by vector input. HF