Announcement

Collapse
No announcement yet.

VertexNormal as panning direction

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

    VertexNormal as panning direction

    Hello!

    I'm looking into creating a material function which would plug into my Landscape master material, and provide rain/water flow that follows the shape of the terrain. In other words, wherever there is a slope, pan a texture downhill.

    Here is what I have so far:
    https://www.youtube.com/watch?v=zjSDt-RMiqs

    And the material:
    https://i.imgur.com/olAiYUB.png



    However, as you can probably see in the video above, things don't work quite as intended. The areas between each of the "sides" should gradually change the direction of flow, rather than forcing it into one of the 4. There also seems to be some sort of seam or gap between there as well.

    Any ideas, perhaps a simpler way to do this than I have?

    Thanks!

    #2
    Nice idea. Essentially, you'd like to use your normal as a flowmap. Look into flowmap implementations in UE4

    Comment


      #3
      If you create a world space normal map texture of your whole terrain, you could plug that in instead of VertexNormalWS. By default, texture pixels have a blurry interpolation between eachother.
      Im not sure if it would work, due to the low resolution, but maybe worth a shot.
      You can capture a world space normal of your terrain using render targets. If you are unfamaliar with using render targets, you may prefer to export the terrain and bake a worldspace normal map in an external program (for initial testing purposes).
      Last edited by somawheels; 08-18-2018, 07:34 PM.

      Comment

      Working...
      X