MadMax50 Posted May 7, 2019 Share Posted May 7, 2019 Hey ! I am trying to achieve a gradient based on my normal direction. For example if my Normal is set to (0,0,1), i want a black and white falloff in that direction. I already made this happen (sort of), but my issue is when I inverse the Normal like (0,0,-1), my color turns black. Is there anyway to fix this? Thanks! Normal_Gradient.hip Quote Link to comment Share on other sites More sharing options...
Ryan Posted May 7, 2019 Share Posted May 7, 2019 When you negate your Normals, your color values are going from 0 to -1. You need to check the sign ( + or - ) of each vector component of the Normal. If it is negative, you need to take the compliment of the Position component [ ex. (1-P.x) ] then do absolute value. Quote Link to comment Share on other sites More sharing options...
MadMax50 Posted May 8, 2019 Author Share Posted May 8, 2019 @RyanThanks man. This works great Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.