No announcement yet.

Water material - distorted reflections

  • Filter
  • Time
  • Show
Clear All
new posts

    Water material - distorted reflections

    Hyellow... for I am currently designing my own water-shader and have come to a point where I am not sure how to do a certain thing!

    I currently have a Normalmap connected to the "normal" and "distortion" aswell as a reflection connected to the emissive-channel!

    Now what I want to do is to in some way make the reflection-texture to depend on the normalmap (or something similar) in order to distort not only the underlying stuff but also the reflection!

    Basically what i'm wondering is if there is an easy way to make the texture depend on my normalmap like the specular channel is!

    Hope you can help me! //leMoulin:

    PS. If you want more information provided just ask!

    a good way to do this is use the normal map to adjust the UVs of the ReflectionTexture (assuming you have created Scene Capture Actor to Render to Texture)

    when distorting UVs can use a LERP between the unmodified UVs (from screenPos for reflection) and B input of those UVs with Normal map added in. then the alpha would dertime how much to distort the UVs.

    there is a great tutorial for water materials that shows a similar technique:

    in this case Chris Albeluhn , multiplies the normal down to almost nothing , then adds the result to the UVs.
    in this IMAGE =


      Thank god for this community!

      Haha, I was actually looking at that tutorial earlier when I was doing another aspect of the shader, didn't think about looking there again! Well, thank you soso much!