2
$\begingroup$

I try to make the right side texture turn to left side texture with procedural node. Is it possible?

enter image description here

$\endgroup$
4
  • $\begingroup$ in the title you ask for scaling, then in text: right side texture turn to left side texture, what do you want now? scale or rotate your texture? $\endgroup$
    – Chris
    Jun 8, 2022 at 14:20
  • $\begingroup$ I guess he wants the effect we see on the left, i.e. dots that gradually reduce $\endgroup$
    – moonboots
    Jun 8, 2022 at 14:28
  • $\begingroup$ ah...yeah, that sounds reasonable $\endgroup$
    – Chris
    Jun 8, 2022 at 14:34
  • $\begingroup$ moonboots is right. Sorry for my english. $\endgroup$
    – s aS
    Jun 8, 2022 at 14:38

1 Answer 1

2
$\begingroup$

Somewhere along the line, you need a per-row Y index.. you could do that by subtracting a per-cell UV from an overall UV at the same scale.

But to save nodes, this version cheats by using the ready-made [distance from cell centre] and [position of cell centre] provided by a non-random Voronoi texture...

enter image description here

The scale-per-row is animated by keying the 'To Max' field of the Map Range node..

enter image description here

If you're not cheating, you would break the UV space up yourself.

enter image description here

  • Here, starting with the 'Generated' coodinates, always 0-1 in all dimensions of the shaded object's bounding box.
  • The Multiply Add node a) scales the coordinates, so they run from 0-4 in X and Y, and b) shifts the coordinates, so they run from -0.5 to 3.5. .. 'Raw Space'
  • The Wrap breaks the -0.5 to 3.5 range into 4 cells in each direction of -.5 to +0.5 .. 'Cell UV'
  • If you subtract the 'Cell UV' from the 'Raw Space', each cell is shaded with the location of its center, in 'Raw Space' coordinates. That is, from (0,0) to (3,3) across the piece. .. 'Cell Idx'.

Below, see 'Raw Space'/3, 'Cell UV', and 'Cell Idx'/3:

enter image description here

You can use the Y of 'Cell Idx' to tell the shader which row of cells you are in, and use that to influence any attribute of your UV-based procedural pattern, per row.

Below, a procedural pattern produces an outlined star from the local Cell UV. Its 'r' (radius) attribute is set by a mapping of the row that it's in:

enter image description here

.. with this result:

enter image description here

$\endgroup$
3
  • $\begingroup$ Thank you very much! $\endgroup$
    – s aS
    Jun 9, 2022 at 9:58
  • $\begingroup$ Can you talk more about the first method you mentioned above? Actually I want to do the same thing with different shapes. $\endgroup$
    – s aS
    Jun 9, 2022 at 12:20
  • $\begingroup$ Hi, @saS ! Sure thing. See edit. $\endgroup$
    – Robin Betts
    Jun 9, 2022 at 17:17

You must log in to answer this question.

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