Announcement

Collapse
No announcement yet.

Light Function Material 'Banding' on some surfaces

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

    Light Function Material 'Banding' on some surfaces

    I have created a light function material which creates a dynamic caustic water effect, see the effect on the rocks below. The idea is it will cast caustic water reflections on nearby surfaces, something I observed when I was recently walking the dog, and light was being cast on the nearby trees in cool patterns

    [shot]http://i239.photobucket.com/albums/ff29/thejamsh/FUnction.jpg[/shot]

    However you can see that on the wall, the material is banding and stretching. I'm using a pointlight moveable to cast the light function.

    The UDN says you can use a 'Texture Cube' to avoid this banding, but is there anyway to use a texture cube with a material as a light function? Or is there a better way to achieve this? Thanks in advance

    #2
    Have you tried adding that effect to the material for those objects instead? You could use a vertex color to paint the water reflection selectively onto the meshes instead of trying it with lights.

    Comment


      #3
      I assume your are using a texture2d? If you are, the best way is just to use a texturecube texture instead, as that gives you all three axis instead of just one axis, which casts a non-stretched pattern in all directions.

      Edit:
      Like Jessie said, if you can lay out the UVs correctly to achieve the effect in the material instead of with a light, it would be much less problematic and much easier to control with vertex paint. Not to mention the performance gains.

      Comment


        #4
        Originally posted by James Ordner View Post
        I assume your are using a texture2d? If you are, the best way is just to use a texturecube texture instead, as that gives you all three axis instead of just one axis, which casts a non-stretched pattern in all directions.

        Edit:
        Like Jessie said, if you can lay out the UVs correctly to achieve the effect in the material instead of with a light, it would be much less problematic and much easier to control with vertex paint. Not to mention the performance gains.
        No, I'm using a material. I managed to avoid the banding slightly by rotating the light a little, which makes the banding a little less apparent. Any tutorials around for the vertex painting tips?

        Comment


          #5
          James is correct, you're seeing what you're seeing because you are using a flat texture for your caustic pattern, when in reality you would want to be using a cube map in the material, or at least an alternative projection technique. Unless your light source is dynamic, I would also recommend painting it on using your materials - there should be a fair few vertex painting tutorials out there and it's not hard to set up or use; there are some basic bits of documentation on the UDN too.

          Comment


            #6
            Yeah we mean using the materials of the objects that receive the pattern on them, not the light function material.

            This is one of the main resources I used to learn how it works:

            http://http://www.chrisalbeluhn.com/..._Tutorial.html

            Comment


              #7
              Right I can see how it works now, so effectively I would add my light function material to the rock material, then effectively use vertex colours to mask it out on a per-instance basis?

              Are the performance differences really that noticeable?

              Comment


                #8
                The difference in performance between using a dynamic light with a material function, and staticly painting it using vertex colours will be very significant.

                Comment

                Working...
                X