Results 1 to 5 of 5
  1. #1

    How to make material fade-out

    Hi all,

    I've got a camera moving thru a tube, I would like the material of the guiding wireframe to fade-out just before it reaches the camera. I come close with the help of the Camera Data node but it cuts the material to transparant very abrupt. I would like to see a nice fade there, can anyone help me with a proper node setup to accomplish this?

    Please have a look at the file;

    material.blend

    thx a lot!
    Last edited by RayVelcoro; 15-Apr-18 at 12:26.
    'Not obsessing about absolute precision would also be wise. This is polygonal modeling which is approximation, and the precision required is for visual purposes. In other words, not a CAD.' - JA12



  2. #2
    Member JA12's Avatar
    Join Date
    Apr 2012
    Posts
    4,972
    Greater than gives a binary output. Using a color ramp should work better
    New to BA.org and have a support question? Here's how to do that more effectively.



  3. #3
    Thx, I had a color ramp after the greater than node, obv that didn't work. Now I got it right, ty JA.

    Click image for larger version. 

Name:	Naamloos-23.png 
Views:	11 
Size:	275.7 KB 
ID:	521304
    'Not obsessing about absolute precision would also be wise. This is polygonal modeling which is approximation, and the precision required is for visual purposes. In other words, not a CAD.' - JA12



  4. #4
    Member Secrop's Avatar
    Join Date
    Dec 2011
    Location
    Berlin
    Posts
    2,074
    I would put the 'divide' node before the 'ColorRamp'... The ZDepth value can be bigger than 1, but the colorramp only uses input values from 0 to 1, so some scaling (multiplying/dividing) might be needed.

    Putting the 'divide' node in front of the ramp, just makes the ramp colors to be 20 times smaller, and the white color from the ramp (a value of 1) will end up in the 'tubecontrol' as a value of 0,05. (unless you really want to make the second shader dimmer, but you could also set the second colorstop to something darker than white)
    Last edited by Secrop; 16-Apr-18 at 00:26.



  5. #5
    Thx for the additional info, Secrop! Learned something here.
    'Not obsessing about absolute precision would also be wise. This is polygonal modeling which is approximation, and the precision required is for visual purposes. In other words, not a CAD.' - JA12



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •