4

Using this simple node setup, i'm able to get a pretty good gradient for this kind of mesh : enter image description here

enter image description here

Could it be possible to get the same kind of gradient with a sphere like this one ? enter image description here

I mean, the further the face get from the center of the sphere, the whiter it will get, and vice-versa. Hope someone here can help me !

PS : I'm french, so my english may not be perfect ^^

2 Answers2

2

Not sure whether it's the best approach but here's how I would wing it:

gradient node setup

Giving that result:

gradient result

The gradient texture has its origin at the object origin and creates a virtual sphere that gets brighter and brighter which creates darker valleys and brighter mountains. Once upon a time it was called a blend texture.

Haunt_House
  • 16,049
  • 5
  • 48
  • 78
  • 1
    Why the Diffuse/Emission mix? Could you not just feed the Color from the ramp straight into the Emission color? – Rich Sedman Feb 19 '18 at 15:37
  • 1
    @RichSedman Because I'm 85% dysnodic and I get cheap admission to museums with that disability. Although I'd like to make the lame excuse that mixing different shaders can be more flexible than the gradient which translates to: you're probably right. Just tested it. Move to strike 'probably' – Haunt_House Feb 19 '18 at 15:42
  • CONVOLUDIRATION RULZ!!! – Haunt_House Feb 19 '18 at 15:47
  • Either way, it works :-) I believe an emission with no color or zero strength is effectively a black diffuse. – Rich Sedman Feb 19 '18 at 15:47
2

You could try this: enter image description here

This node setup won't take the distance of a point from the origin, but rather the curvature (pointiness) of the surface at a given point, however it might be good enough for your purposes.