2
$\begingroup$

I'm working on this procedural wood texture (I'm going for a stylized look) using a musgrave texture as a base. As pictured below, this works well with vertical surfaces, but when viewed from the top the pattern looks off. Ideally, I would like the pattern to look the same from all angles, though I understand that the top side's patter will need to go either in one direction or the other.

Anyway, what does the trick here is adjusting the scale value on the "Mapping" node, but you can only make t work in two directions at once, but not all 3. So, I tried making two Mapping nodes with the settings I wanted and combining them using the "Combine XYZ" node, but I'm not getting the results I want because when you re-combine the nodes the pattern is distorted again.

So, what I'm thinking I need to do is somehow filter one axis, then combine it with the other two, but I'm not sure how to do that, so any tips will be greatly appreciated!

THE LEFT AND RIGHT SIDES (X and Y) LOOK GOOD, THE TOP SIDE IS THE PROBLEM (Z):

enter image description here

Here's the shader setup: enter image description here

$\endgroup$
1
  • 2
    $\begingroup$ I don't think you can do that with the Generated or Object output, but if you use the UV output you'll have your stretched texture on all axis $\endgroup$
    – moonboots
    Commented Apr 21, 2023 at 6:55

1 Answer 1

3
$\begingroup$

Use a Wave Texture on the Z-Axis attached to Object Coordinates and scaled to .1 - run it through a ColorRamp set to Constant to create a mask that isolates the "top" and "bottom" of the cube (since these are the faces that do not scale with the "sides"). Use this as a mix factor between 2 versions of your generated textures - the one that works for the "sides", and the one that works on the "top and bottom":

Mask

Mix

$\endgroup$
1
  • $\begingroup$ That works great! Thanks for the detailed explanation as well. $\endgroup$ Commented Apr 21, 2023 at 18:06

You must log in to answer this question.

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