3
$\begingroup$

I am trying to add a gradient to each cell and rotate each grid cell.

The grid is currently separated into Less Than and Greater Than nodes.

Since the grid is separated there is input Gradient Less Than to control the gradient amount for cells which is less than 0.5 and input Gradient Greater Than to control the gradient amount for cells that is greater than 0.5.

In the same way the input Angle Less Then should control the rotation for cells which is less than 0.5 and input Angle Greater Then should control the rotation for cells that are greater than 0.5

Note: The rotation of gradients should be random for each cell.

enter image description here

$\endgroup$

2 Answers 2

5
$\begingroup$

A bit similar to the Wizard's answer, but this time using the random-per-cell value that Voronoi gives us in 'Color':

enter image description here

Ooops.. The Multiply is by 2*pi (or tau)

The cluster on the left, above, gives rotated UV's per-cell, as illustrated on the left, below:

enter image description here

The center example shows a square image rotated by the cluster and shifted appropriately.. the right example shows an X gradient in the same frame, again shifted in the (rotated) coordinates, to put black at X = -0.5

$\endgroup$
4
  • $\begingroup$ At first I wanted to use the Color, but I was worried the distribution will be gaussian like with Noise Texture: i.imgur.com/hYQsSFi.png - but I just checked, and for voronoi the distribution is even: i.imgur.com/NY1EnX6.png - testing with this setup: i.imgur.com/gcRO933.png $\endgroup$ Commented Dec 24, 2023 at 18:59
  • $\begingroup$ @MarkusvonBroady I was trepidatious posting under you.. I knew there must be a reason the Mage hadn't gone for it.. and he's tested! I'm so lazy.. I've just used it so often, and seen others do the same, I never questioned that. Great work to settle it for sure.. and a Happy Xmas, MVB! $\endgroup$
    – Robin Betts
    Commented Dec 24, 2023 at 21:12
  • $\begingroup$ I only tested after your answer, and your approach is the better (simpler) one, Merry xmas! $\endgroup$ Commented Dec 24, 2023 at 21:55
  • $\begingroup$ Awesome node compositing. $\endgroup$ Commented Jan 6 at 14:19
4
$\begingroup$

You can use Voronoi texture for that:

If you don't want any flat color, as explained by Gordon Brinkmann in your other question, you need to normalize the range

$\endgroup$
1
  • $\begingroup$ Great work of node tree $\endgroup$ Commented Jan 6 at 14:20

You must log in to answer this question.

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