I am trying to render an object that has opaque base and gradually becomes clear/translucent at the top in Blender cycles.

Please see the attached image (which was not made with blender).

example material

  • $\begingroup$ I see two ways that may be possible but not sure. 1) You could divide the cup into 3 parts from top to middle to bottom. The bottom is dark, middle is light dark and top is clear. 2) I would instead use the more tedious method but better than method 1. I'd use textures which requires UV Mapping or I'd use vertex groups and weight painting to achieve the same goal as above. $\endgroup$ Jul 30, 2015 at 23:07
  • $\begingroup$ If I'm in a lazy mood I'd play around with stuff and randomly get the affect lol. $\endgroup$ Jul 30, 2015 at 23:09
  • 1
    $\begingroup$ I think you should modify your question to require that the gradient work with the mug at any angle in the scene. Some of the answers will only work if you don't move the cup. You want the gradient to operate at the local coordinate level so that you can move the object and the material still looks correct. $\endgroup$ Jul 31, 2015 at 0:49

3 Answers 3


All you need to do is use a Gradient Texture (see how to create it procedurally here: How to create a gradient texture?) as a mask for the transition between two materials. enter image description here

Set up the nodes as pictured below. Try to experiment with a Mapping Node settings (adjust the Location, Rotation and Scale parameters) to achieve a desired effect.
enter image description here

To have a better control between materials transition add a Color Ramp node and experiment with its slider.
enter image description here enter image description here


All you need are a two shaders the opaque (Diffuse node), and then the transparent (Glass node), then a way to mix them together.
Here I'm using the Z axis of generated coordinates. Generated coordinates always go from zero to one along each axis of the object.
The color ramp node is to fine tune the mixing between the two shaders. cycles material nodes


the transition seems to be based on the height of the shading point and for that we use the Z component from the Position output in the Geometry node and using division ( math ) node we can normalize the height , then we use this as an input for the mix shader to create the transition between a glass material and a diffuse material:

enter image description here

result :

enter image description here

  • 3
    $\begingroup$ The downside to using the position output is that you have to scale it based on the position and scale of the object. $\endgroup$
    – PGmath
    Jul 30, 2015 at 23:45

You must log in to answer this question.

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