8
$\begingroup$

I'm looking for a solution to a problem where I need to use just a part of a procedural texture, specifically a single ring from a Wave texture, instead of the infinitely outgoing rings.

Enter image description here

There are solutions like using various masks to limit a procedural texture to a specific area, but I need something along the lines that sort of takes the type of texture I'm using into consideration. As in my example, to limit a Wave texture to a single ring or band, or a like a Voronoi texture which would use a single "shard", or a cluster of them, and to not go on forever.

$\endgroup$
6
  • $\begingroup$ if you would show us your procedural modifier ...we could help you. Best would be a blend file so we don't have to recreate all ourselves. Which you should do because you want our help, right? So make it easy for us to help. $\endgroup$
    – Chris
    Jun 30 at 19:03
  • $\begingroup$ Can you elaborate a little on why masks don't suffice in your situation? What does success/failure look like? $\endgroup$ Jun 30 at 19:14
  • $\begingroup$ Added a picture and a .blend. Masks would be super finicky to set up in my case, but I'm open to ideas. $\endgroup$
    – Geri
    Jun 30 at 19:20
  • 5
    $\begingroup$ Radial mask is the same as a linear gradient mask, you have to know that the equation of a circle of radius r is x²+y² = r². Or even easier, use a Vector math node set to length and a math node set to compare $\endgroup$
    – Gorgious
    Jun 30 at 19:24
  • $\begingroup$ @Gorgious How could I make a radial mask? Feel free to write it as an answer. Vector length may just work though. $\endgroup$
    – Geri
    Jun 30 at 19:47
18
$\begingroup$

I'm afraid it does come down to masking, on a case-by-case basis. As Gorgious comments, by the time you've masked a Wave texture, you may as well have rolled-your-own rings... maybe something like:

enter image description here

Voronoi gives you a handle to make a mask to cell boundaries, here, around an origin of your choice:

enter image description here

$\endgroup$
3
  • 4
    $\begingroup$ Hey, that Voronoi screenshot just changed my brain. $\endgroup$ Jun 30 at 22:09
  • 2
    $\begingroup$ Thanks! That voronoi example may just be the most useful thing I've learnt about blender yet. I wish you could do that sort of thing with every procedural texture. $\endgroup$
    – Geri
    Jul 1 at 13:12
  • 4
    $\begingroup$ @Geri Thanks! The reason you can do it with Voronoi is that it's fundamentally based on points (random per cell) in a grid, and it knows where those points are. The others tend to be continuous functions of the whole, undivided space. You can often assemble your own versions, for more control. $\endgroup$ Jul 1 at 14:09
12
$\begingroup$

There is no common interface of texture nodes with "start at" and "end at" inputs. Therefore you need to limit the influence of each node with a method specific to that particular node. There's no general trick that I'm aware of, other than "masking".

In case of your particular problem:

$\endgroup$
1
  • $\begingroup$ Thanks! I really wish procedural textures had a "start at" and "end at" values. They could maybe even accept BW values, so it wouldn't a simple radial thing. $\endgroup$
    – Geri
    Jul 1 at 13:47
6
$\begingroup$

Since you need only one ring, maybe a "ring shader node" is the right solution for you:

enter image description here

enter image description here

$\endgroup$
5
  • 6
    $\begingroup$ 😜 i.imgur.com/9dtG65A.png $\endgroup$ Jun 30 at 23:48
  • $\begingroup$ Thanks! It's a good solution, but I need the feathered edges as well. $\endgroup$
    – Geri
    Jul 1 at 13:14
  • $\begingroup$ @Geri Do min(0, -abs(sqrt(x**2+y**2)-ringradius)+ringthickness)/ringthickness instead then. It will give you a normalized linear feather, like the wave shader, to which you can also apply a root or exponent. …I don't think there's a "Min" option for the Math node, so you'll have to emulate it with "Greater Than" or a MixRGB/"Lighten" instead. $\endgroup$
    – Will Chen
    Jul 1 at 16:41
  • $\begingroup$ Thanks! .. Uhm.. could you show that with nodes? xD $\endgroup$
    – Geri
    Jul 1 at 17:05
  • $\begingroup$ @Geri just use the setup Robin Betts presented, if you don't like color ramps, you can use math>ping-pong instead. $\endgroup$ Jul 1 at 17:38

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.