Announcement

Collapse
No announcement yet.

Can Depth Fade be made to work only on Z Axis (height), rather than on camera distance?

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

    Can Depth Fade be made to work only on Z Axis (height), rather than on camera distance?

    Hey all, quick quesiton. Is it possible to make the depth fade node work based on the depth from the top of the water, rather than distance from the camera? I want the ability to display objects in the water just like depth fade is able to when plugged into the base color, but I want the color change to be based on Z axis height, so that you can see distant objects as well as close ones, rather than having them fade out when they get too distant. You can see what I am talking about in this image of the old spyro games:
    Click image for larger version

Name:	17027-spyroshoreline.jpg
Views:	1
Size:	45.8 KB
ID:	1217529

    #2
    Calculate worldposition behind translucency then use only z position of that and water surface.

    Comment


      #3
      That sounds like it would work... Any chance of knowing what that would look like as nodes? Math was never really my strong point (failed algebra 2 three times in high school).

      Comment


        #4
        Calculate Distance of WorldPosition ComponenMask B and WordlpositionBehindTralucency ComponenMask B. Use that result as you like.

        Comment


          #5
          Originally posted by Kalle-H View Post
          Calculate Distance of WorldPosition ComponenMask B and WordlpositionBehindTralucency ComponenMask B. Use that result as you like.
          Sorry for the bump but this only work for horizontal water plane. Any slope result in zero depth

          Comment

          Working...
          X