0
$\begingroup$

Below is an image of what I am trying to make :

enter image description here

I want to make a bottom of object start with red with no transparency,

and gradually shift towards no color with 100% transparency to the top.

Right now I was trying to play around with color ramp nodes on the object's BSDF, but cant figure out how for the transparency part.

Would there be other better ways to achieve this above effect?

Thank you all in advance!

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

enter image description here

enter image description here

Getting math nodes also sort of ends up changing the whole object's transparency rather than only a tip, lmk if I made any mistakes for this method :)

$\endgroup$
3
  • 1
    $\begingroup$ I would use the Geometry node with Position for this in Cycles, but for EEVEE the gradient texture is likely your best option. $\endgroup$
    – TheLabCat
    Sep 25 '21 at 4:04
  • $\begingroup$ Thanks for your answer, but how could I use the geometry node? I dont know where to start $\endgroup$ Sep 25 '21 at 16:05
  • $\begingroup$ Pretty simple. Use its position output, use vector transform to convert the position from global to local Object space, separate it into X Y and Z, use a map range to convert Z into the range you want, use that to drive a color ramp node, use the ramp’s output to drive the Alpha value of your material, make sure your alpha mode for the material is alpha hashed if you’re in EEVEE, and voilà. $\endgroup$
    – TheLabCat
    Sep 25 '21 at 16:11
2
$\begingroup$

you can try this kind of setup:

enter image description here

don't forget to set blend mode to alpha blend or alpha hashed, if you are using EEVEE.

Works for EEVEE and Cycles.

enter image description here

$\endgroup$
6
  • $\begingroup$ thanks for answering :) but I have a problem, I have copied the nodes and played around with all the numbers within the nodes, but seems like transparency of the whole material changes only, and wont make that transparency gradient $\endgroup$ Sep 25 '21 at 16:03
  • $\begingroup$ I've updated and posted a pic of my shader editor in case you wanted to have a look $\endgroup$ Sep 25 '21 at 16:09
  • $\begingroup$ ok, please provide blend file, so i will check it out $\endgroup$
    – Chris
    Sep 25 '21 at 16:57
  • $\begingroup$ sure, pasteall.org/blend/57f890b59ae847d9ba1dc6c4726cb468 $\endgroup$ Sep 25 '21 at 17:33
  • $\begingroup$ first you did plugin from uv coordinate, not from object as i did. and second you had a scale z value in your mapping node of 0 instead of 1. So plugin from object and change scale z to 1 and it works. your material setup: [1]: i.stack.imgur.com/iac4p.png $\endgroup$
    – Chris
    Sep 25 '21 at 17:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.