7
$\begingroup$

I am still trying to get the hang of nodes and am wanting to do something a bit more complicated than I know how to do.

I have 2 wave textures, one with a thick line, and one with a thin line. I am trying to transition from one to the other - hoping that the thick line would be closer to the edge, and the thinner would be further in.

Is there a way to transition from one to the other? I thought using a mix shader with a gradient as the factor would do the trick, but it is only transitioning the opacity. not the thickness...

enter image description here

does anybody have any other recommendations on how i could do this?

$\endgroup$
2
  • 2
    $\begingroup$ Could you add an image description of what you want to do? I can imagine something but not sure this is what you want to do. $\endgroup$
    – lemon
    Commented Mar 2, 2020 at 19:46
  • $\begingroup$ !Valid XHTML. $\endgroup$ Commented Mar 2, 2020 at 21:33

1 Answer 1

9
$\begingroup$

I'm not quite sure if this is what you're looking for, but one way would be to take your waves (top), and a Gradient texture (middle), mix the two, and put the mix through a threshold (bottom).

This is object space, so 0 is at the center, and the gradient is made symmetrical by mapping it with the absolute value of the of the texture space.(only X matters, here).

The mapping nodes just line things up as shown in the illustration.

enter image description here

Further to your comment, the above example is, in principle, halftoning. To get it to work as it does in your reference, rather than using a gradient, in EEVEE, you can use the actual light-response of a surface by using the Shader to RGB node.

In an effort to get somewhere near your reference, I've tried a couple of extra things:

The texture space

enter image description here

So the image would work more as if it was printed or drawn, I thought the hatching texture shouldn't change size with distance. The 'Window' texture space does this, but is scaled in proportion to the rectangle that contains it.. so this cluster flattens the space of a perspective camera instead. The top planes are textured in Camera space, the bottom ones in the space corrected as shown. That becomes the little group: 'Screen Space'.

The hatching..

enter image description here

.. has taken your wave texture, given it a bit of a wobble, and tried to break it up a bit with some Voronoi noise. Judging by the aliasing in your reference, the jigs, jags, and missing strokes, I think the hatching there was probably hand-drawn, and that's maybe the best way. I had fun knocking out the odd stroke and messing with the texture space to imitate it procedurally, but the tree was getting too big... it's really a different question. This cluster became the 'Broken Hatch' group.

So now, by mixing two copies the hatching, rotated at different angles, with the output of 'Shader to RGB', and putting through thresholds as shown above, you can half-tone Suzanne. The Mix factors and the Color Ramps give you not-too-twitchy control over the look.

enter image description here

If you're after AO, bear in mind that it can be wound up to more than 1 in EEVEE.

enter image description here

I don't know, this is not as tasty as your reference, it looks too procedural. But I'm sure you could take it from here.

$\endgroup$
9
  • $\begingroup$ Yes! This is almost exactly what I am looking for. Would it be possible to line this up with the ambient occlusion node so that the thicker lines would be deeper in the crevasse and the thinner would be where the AO Tapers off? $\endgroup$ Commented Mar 2, 2020 at 21:40
  • $\begingroup$ @HenryKeller Got it, yes, I've got to be afk for a bit. I'll get to it tomorrow, if lemon hasn't answered it for you. $\endgroup$
    – Robin Betts
    Commented Mar 2, 2020 at 21:46
  • 1
    $\begingroup$ @RobinBetts please go for an answer as you've started for this one, if you want. $\endgroup$
    – lemon
    Commented Mar 3, 2020 at 11:32
  • 1
    $\begingroup$ @RobinBetts, was looking at your answer (before I leave for today), but this is really a good job, better than mine (unpublished attemps and won't be). A hand drawn like shader is not simple. Maybe using some texture could do? $\endgroup$
    – lemon
    Commented Mar 3, 2020 at 19:44
  • 1
    $\begingroup$ @RobinBetts This have been done blendermarket.com/products/komikaze (don't know how)... so not sure reproducing it "perfectly" here is a good thing for the guy. I did it (unperfectly) for another question but since saw his work. So? are we supposed to break his blendermarket offer? $\endgroup$
    – lemon
    Commented Mar 3, 2020 at 19:49

You must log in to answer this question.

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