Flatten normals procedurally

I’d like to create a procedural texture whose normals behave like those of this mesh:

The hexagonal pattern is not the issue; what I’m after is to assign every point within each hex tile the normal at the center of the tile.

Does anyone know whether this can be done in blender?

the normal is always at the center of faces !

so can you elaborate what you mean ?

happy bl

But I don’t want to create the hex tiling with geometry! I want to create a procedural texture with this pattern that could be applied to any type of geometry, in particular a much less dense one.

i saw an OSL proc text is that good enough ?

happy bl

You want to SET the normal based on a random color, converted into a normal, instead of modifying the existing one? I was trying to achieve something similar earlier today - think flat bricks appearing as actual flat bricks without curvature, no matter the resolution of the curved geometry - but I failed. Crazy thing is I’m pretty sure I’ve done it before, but now I can’t relocate the project.

Yes, this is more or less what I try to achieve, of course, the normals should not be completely random (that would be easy).

How would it be easy? That’s the effect I’m trying to achieve. Or at least some random color output → Sep.XYZ → Com.XY0.5 → Normal map, but if 0 that would be completely flat. With math. Which I’m missing

You can try to use a voronoi texture’s random color output.

Make a 32 sided smooth shaded cylinder. Now I want to shade it as if it was a 10 sided cylinder with perfectly flat “sides”. Any random color → normal would have to be done afterwards.

The colors are not the problem, the normals are…

Of course, in this particular case, you could compute the normals from the UV coordinates, but only because the surface of the cylinder can be expressed in simple mathematical terms.

Bake the normals to a texture, and then set a fixed uv coordinate for each cell (like the position output of the Voronoi) and use it as the Vector for the normal texture.

2 Likes

Yep, works like a charm!

1 Like