0
$\begingroup$

I am attempting to make a semi-procedural material that is intended for use in walls. To ensure proper tiling of the texture, I intended to use geometry position as the vector and normal as the rotation, which just gave me the same weird streaks as just position. I spent a good while separating out each cardinal direction using comparisons between x & y as a mask. This sort of worked, but resulted in slightly stretched textures on the diagonals.

First experiment

Acceptable results

I figured this was fine, but as I worked, I found that due to the rotation of the texture mapping, the normal maps were facing the wrong direction, so that the face was lit at odd angles and rarely when the light was straight on.

Adding all the textures

Odd lighting

Effed up normals

Effed up normals

I tried to use vector rotation on each cardinal to correct the issue, but it seemed that each face had a different rotation offset, making it impossible to correct without rotating literally every face, defeating the purpose of the material.

Still effed normals

Still effed normals

So, my question is; is there an easier way to do this that does not require UV mapping? Or is this simply an impossible endeavor?

$\endgroup$
6
  • 2
    $\begingroup$ Check this answer from @Rich Sedman .. it talks about the Bricks procedural, but should apply to any 2D texture? $\endgroup$ – Robin Betts Oct 9 '20 at 8:16
  • 1
    $\begingroup$ ... Having just tried it myself, I think you may have to multiply the X component (on the way into the Combine XYZ which gives the texture's Vector) by -1. $\endgroup$ – Robin Betts Oct 9 '20 at 8:46
  • $\begingroup$ Indeed triplanar mapping is what you are looking for $\endgroup$ – Iyad Ahmed Oct 9 '20 at 9:42
  • $\begingroup$ The triplanar method from the post Robin referenced does definitely clean up the nodes, but it still results in mangled normals. I'm going to try and correct it with this new method to see if that changes anything $\endgroup$ – Tyree Bingham Oct 10 '20 at 8:41
  • $\begingroup$ For anyone who runs across this question, this article has some really good information about triplanar mapping and how to overcome various problems you might face while implementing it. It'll be a pain to do it with blender nodes, though, as it's all done in C#. $\endgroup$ – Tyree Bingham Oct 11 '20 at 4:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.