4
$\begingroup$

I try to make a chemical polarity like this:

enter image description here

I'm not talking about the molecule itself but the red to blue gradient with the white between around the molecule. I made the object with metaballs and transform it to a mesh. I know how to apply the color ramp and make it transparent but I can't work it out how to bend the color ramp to get the white stroke bending and the blue spread to both hydrogen parts.

Thanks in advance for your help!

$\endgroup$

1 Answer 1

2
$\begingroup$

Shader Setup Is this something like what you're looking for?

The Texture Coordinate->Object node gives the X,Y,Z location of each surface. This feeds a mapping node so you can center the red on the hydrogen molecule and scale the overall effect. This goes into a Vector Math->Length node to get the distance from the center of the hydrogen molecule to feed into the Factor input of the Color Ramp.

$\endgroup$
2
  • 1
    $\begingroup$ That's it! Thx a lot for your help. Very kind! :-) $\endgroup$
    – EwSa
    Commented Oct 15, 2021 at 5:09
  • $\begingroup$ If your question has been answered, you can accept my answer. $\endgroup$
    – Ron Jensen
    Commented Oct 15, 2021 at 10:14

You must log in to answer this question.

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