5
$\begingroup$

I'm trying to use Blenders Shader Nodes (or maybe it's possible with Geometry Nodes?) to project textures on objects similar how it in 3D-Coat works.

This is how 3D-Coats projects a simple brick texture on this objects enter image description here

I can't do it that way in Blender. For this I would need the info of the face normal. In Blender it looks like this for example. Pretty crooked.

enter image description here

I made that this way in Blender. Is there a way to make it with Blender 3.1 so that it looks similar to 3D-Coat? enter image description here

$\endgroup$
1
  • $\begingroup$ The projection you want is built into image texture nodes as "box" (rather than "flat") mapping, with a "blend" greater than 0. Check it out, you probably don't have to build anything. You can't get the vertex normals for your samples, but you can get the sample's interpolated face normal or the true face normal, with geometry/normal and geometry/true normal respectively. $\endgroup$
    – Nathan
    May 7, 2022 at 16:35

3 Answers 3

4
$\begingroup$

The first image look like box projection. The image texture node already has that built-in.

shader nodes

$\endgroup$
1
  • $\begingroup$ I looked at the brick and immediately though it's Brick Texture rather than Image Texture node :D Still there is a subtle difference - I added a comparison to my answer. $\endgroup$ May 7, 2022 at 17:31
4
$\begingroup$

Do you mean something like this?

Comparison with Aryan's answer - the one with bigger top is mine:

The below reproduces box projection except it flips the direction of some sides:

$\endgroup$
5
  • 1
    $\begingroup$ This is much more flexible. You can use it with procedural textures and image textures alike. Can you try threshold value of 0.707 = 1 / sqrt(2) on the top Greater Than node. I think that should make it equivalent to box projection, and have less stretching (near top face B8 UV box) $\endgroup$ May 7, 2022 at 18:22
  • 1
    $\begingroup$ @ShantanuAryan i.imgur.com/YGwctwT.png $\endgroup$ May 7, 2022 at 18:27
  • 1
    $\begingroup$ Looks great : ) $\endgroup$ May 7, 2022 at 18:38
  • $\begingroup$ @ShantanuAryan See edit :) $\endgroup$ May 7, 2022 at 18:43
  • $\begingroup$ Thank you. It's exactly what I was looking for :-) $\endgroup$ May 7, 2022 at 20:48
0
$\begingroup$

I figured out how I can get the face normal

enter image description here

I get this result. It's better but still not good

enter image description here

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .