Create a gradient that follows a shape

Hi there!
I little bit confused. How to make a graditen, that follows a shape.
Smth. like this
image
Is anybody can help?)

1 Like

Difficult one. It would be helpful to know what sort of object you’re planning to use this on (a flat plane?).

The best way I could find was with UVs.

Duplicate your outer vertices and scale them down to create your inner shape. This will be the inside of your gradient. Press U and Unwrap, then open the UV Editor to view the generated UV.

Select the inner ring and squash it down.


Move it to the bottom of the UV map.

Do the same with the outer ring, but move it to the top of the UV map.
image

In the shader editor, plug the UV into a colour ramp with your gradient.

5 Likes

Very nicely done @Myn :+1:

2 Likes

It’s more complicated)


But I’ve caught your idea.

3 Likes
  • Convert color image to black and white (greyscale).
    This image value can be used to displace vertices in one direction.
    It is managed in the material nodes section.
    The grey-scale images can also be used as stamps, and brushes in the sculpting process.

  • You can also work with normal maps containing vectors in the X, Y, and Z realms.
    Working with normal maps, extracting XYZ data, calculating with it, and rebuilding the vector is part of the Blender toolkit. but not much discussed in the GameDev courses.

  • You can use Geo-nodes to manipulate objects and mesh.

  • And there is something called: Drivers, where you can use audio as input, to manipulate things in your object / mesh.

  • Also Blender has a new feature where all this happens in 3D space, very advanced and I forgot this name.

2 Likes

Your question got me thinking of how the process of creating such a gradient could be automated, and I came up with a node system that works. it’s a little inefficient, but can be applied or baked to reduce overhead.

If you want to try it, but don’t want to build it from scratch, let me know and I’ll send you a link to the file.

Click for pictures of the node setup.

Updated version that is up to ten times faster.

3 Likes

4 Likes

Very nice solutions by everyone. Very interesting

3 Likes

Yes, please send a file, I’ll learn it)

2all: Thanks for your ideas! I’ve not known such trivial task hasn’t easy solution.

3 Likes

Privacy & Terms