2
$\begingroup$

I'm not exactly sure if that's the right word for it, but basically, I want to be able to generate a gradient around a point like in my picture, but without the seam. the only thing I can think of like that is a color wheel, where it continuously loops around. My goal is to use a math -> compare node to make a triangle shape emanating from the center, one that you can change what direction it's facing and how wide it is. My problem is that with the gradient I have, the triangle shape disappears over the seam (I can better display what I mean in a video, I linked one in the comments). I want the triangle shape to be able to circle around in any direction indefinitely

enter image description here.

The node setup for my gradient

$\endgroup$
4
  • $\begingroup$ youtu.be/cL6n3W0pxsc my issue $\endgroup$ Oct 25, 2020 at 6:14
  • $\begingroup$ Why don't you make use of the "rotation" parameter of your mapping-node? $\endgroup$ Oct 25, 2020 at 6:50
  • $\begingroup$ im baffled that i didn't realize that $\endgroup$ Oct 25, 2020 at 7:01
  • 1
    $\begingroup$ This actually solved more problems then i realized $\endgroup$ Oct 25, 2020 at 7:03

2 Answers 2

4
$\begingroup$

You could avoid doing the trigonometric stuff the Gradient > Radial node has already done for you, by, instead of avoiding the discontinuity at 0, using it as the start of your segment:

enter image description here

At its most primitive, the start-angle is measured out of 1, clockwise from 9 o'clock, and the segment is anticlockwise from there.This set-up works round the clock, through negative and >1 start-angles.

But I guess the disadvantage is the amount of plumbing you have to do to wrangle the interface into offering you center of arc, angle of arc, in degrees, clockwise from 12 o'clock:

enter image description here

(Maybe there are ways of cutting this down?) ... anyway, that's quite a few nodes to avoid one trig. calculation per shading point. Given modern kit, this is probably old-fashioned :)

Edit:

It may be better to forget the Radial altogether and roll-your-own:

enter image description here

.. which is added to the .blend:

$\endgroup$
2
  • $\begingroup$ Hi Mr Bestt. Can you confirm that gradient node does not use trig things? $\endgroup$
    – lemon
    Oct 25, 2020 at 10:09
  • $\begingroup$ Hi, Clu.. oops!.. @lemon.. No, I'm suggesting the Gradient node does do trig, and you could avoid doing it again. On second thoughts, why not get rid of the Gradient altogether and do our own trig, and dot-product? I'll edit.. $\endgroup$
    – Robin Betts
    Oct 25, 2020 at 10:45
3
$\begingroup$

Very close to your settings:

enter image description here

  • Use the rotation of the mapping node to rotate
  • Get an absolute value to get ride of the seam
  • Change the map range in consequence
  • Use a color ramp to tune the width of the angle
  • Eventually change the color ramp mode to "constant" to have a sharp transition
$\endgroup$

You must log in to answer this question.

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