Announcement

Collapse
No announcement yet.

Change/modify material when viewed at certain angles?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Change/modify material when viewed at certain angles?

    I think camera vector is the material node I'm trying to figure out. How can I use it to change the diffuse and perhaps the opacity of a material when viewed from certain angles?

    I've been trying to create a somewhat good looking water material, but I'd like the water to become less opaque and change a bit in color when viewed in a 90 degree angle (straight from above).

    And has anyone got any idea on making the water change color of the pixels behind it in a good fashion (my setups make it either too pronounced or don't do anything at all)? I'd figure DestDepth and DestColor has something to do with this, but I can't figure out how to use them properly to change the color of the pixels behind the material.

    This material is for beauty purposes, so no worries on frames and perfomance.

    #2
    I think the Fresnel expression is what you want. It's value changes from 0 to 1 based on the normal of the surface at the pixel in question and the vector from that pixel to the camera. Basically when the camera is looking at the surface parallel to the normal, you get a value of 0. And when the camera is looking at the surface perpendicular to the normal, you get a value of 1. And of course there are varying degrees in between.

    Now using that in combination with a Linear Interpolate or similar expression would allow you to blend or switch between different sub-networks in your material.

    Comment


      #3
      Sweet, thanks for posting. I'll go and try it out.

      Comment

      Working...
      X