Generate materials with color gradients

Hi there,
I’m trying to programmatically create material for my polygon with color gradients like below.

For example, set x 0 ~ 5 to be blue, 5 ~ 10 purple, 10 ~ 15 pink…
Is it possible? :thinking:

something like that?


Thanks! That’s exactly what I need.
But I found some difficulties… :sweat:
I’ve built a material like:
But when I apply it on the ground and polygon, it looks odd :thinking:

Do you have any ideas? Thank you again!:blush:

Aha, I’ve figured it out :joy:
For future reference

I’m not sure if I need to create a new topic…
Another question is can I have a light and shadow effect on the NodeMaterial?

It looks flat from the top…:thinking:

You have a light node in the list :slight_smile:

Thank you!:smile:
For future reference

1 Like