Question regarding gradient?

Hello, I'm doing my own take into this, So basically what i want is fog in the scene, but i want fog upto a certain height, i know i have to use the gradient texture as a mask, now i also want to break up the fog with a noise texture, and i cant seem to get it to work, i either have masked fog, and when i connect the mask with the noise texture it seems to break? can someone help me with it?
1 love
Reply
  • Martin Bergwerf replied

    Hi Hashir HHashirIqbal ,

    How exactly are you trying to combine the Gradient and Noise Texture,  because it seems to work fine:

    Fog.png

    1 love
  • Hashir Iqbal (HashirIqbal) replied

    Hi Martin, 

    thanks for replying. 

    Unfortunately i’m not using the setup like this, instead of seperate xyz node, i’ve got a gradient texture and i’m plugging that in the factor value of the multiply node. 

    I’m getting a result but its absurd and not what i am after. 

    I’ll post a picture of my node setup when i’m back at the desk. 

    I’m assuming what i’m doing is wrong in a way? But i am getting the gradient to act as a mask and noise to distort the volume in that. 

    1 love
  • Martin Bergwerf replied

    Hi Hashir,

    The Gradient Node is the same as a Separate XYZ Node, I just find it easier to use the latter.

    I'd love to see your Node setup; it's not clear to me what you are Multiplying the Noise with, when you use the Gradient as Factor...

    1 love
  • Hashir Iqbal (HashirIqbal) replied

    Hi, 

    so this is the node setup i'm using.

    9 at 10.17.13 pm.png

    1 love
  • Martin Bergwerf replied

    So, what you have is:

    Fog everywhere.

    A Gradient for how much the Noise Texture is being 'linear lighted' with a constant cclor. And by the looks of it, that constant Color is mid grey: (0.5, 0.5, 0.5). Linear lighting anything with 0.5 is doing nothing, no matter what the Factor is

    That is basically this (if I am right about Color B in the Linear Light being (0.5, 0.5, 0.5):

    Fog_00.png

    I would suggest something like this (but you can use a Gradient Texture Node, of course):

    Fog_01.png


    1 love
  • Hashir Iqbal (HashirIqbal) replied

    Thanks Martin,

    I'll try this setup next!


    • 👍
    1 love