1
$\begingroup$

How to make a proximity shader that scales exponentially as something gets closer and closer?

The idea is when an object is close, the color ramp won't trigger, only when is almost there it start to expand exponentially the closer it gets.

There are a lot of cool things that can be done with it. Unfortunately I can only enhance the damn thing contrast and dance around a little bit with it. Here is an image sequence to portray what I mean.

enter image description here enter image description here enter image description here

$\endgroup$
0

1 Answer 1

1
$\begingroup$

that can be this kind of settings:

enter image description here

So you have:

enter image description here

Values above are to be tuned to your needs.

$\endgroup$
4
  • $\begingroup$ Um, I see, but it's not quite that. Imagine an object touching other squish one and it spreads all over, or touching water and forming the waves. I'm trying to fake that. This example u made the coloramp is just enhancing intensity, I want it to spread u know? But only when very close to the mesh. $\endgroup$
    – AAA Yerus
    Commented Apr 28, 2023 at 20:14
  • $\begingroup$ It's just like plugin the proximity directly in the coloramp, but with an exponential increase to the radius of the color. And preserving the smoothness of the color border. $\endgroup$
    – AAA Yerus
    Commented Apr 28, 2023 at 20:18
  • $\begingroup$ You probably want to remove "exponent" and add "power" before "map range", then adjust the exponent of the "power" and the min/max values of map range. $\endgroup$ Commented Apr 29, 2023 at 10:21
  • $\begingroup$ It's a good result, but the expansion is easing out the closer it gets, I want it to accelerate instead. Thanks for the help so far! $\endgroup$
    – AAA Yerus
    Commented May 2, 2023 at 13:36

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