Announcement

Collapse
No announcement yet.

Weird backface transparency issues for ocean material

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

    Weird backface transparency issues for ocean material

    I am currently working on an advanced ocean material in UDK that uses world offset to create wave motion. (this material is still early in production and needs a lot of work.)

    In order to create smooth edges and other effects, the material is transparent (even though the transparency is only used along the shore and intersections with objects)

    Using a transparent material seems to cause depth sorting issues with the waves when they occlude each other, creating a very ugly effect.
    [SHOT]https://lh5.googleusercontent.com/_50L5T1j1Hrk/TYXwz4YYlKI/AAAAAAAACO0/z0KBO6y-y98/Backfaces.jpg[/SHOT]

    As you can see, making the material opaque fixes the sorting issue and the material looks correct
    [SHOT]https://lh4.googleusercontent.com/_50L5T1j1Hrk/TYXw0PLiP1I/AAAAAAAACO4/4-0_IXWoR0I/EdgeExample.jpg[/SHOT]

    Is there an option I don't know about to fix this sorting issue (I think it is a sorting issues) or, is there a way to smooth the edge of the material if it is opaque?

    My current solution involves a custom made mesh with a transparent and opaque version of an identical material applied. The area near the shore is set to have lower waves and be transparent. the area in the distance has taller waves and uses the opaque material. I would like to think there is a more elegant solution out there?

    For reference, the ocean material setup I talk about is used in this video. It has a few bugs.
    http://www.youtube.com/watch?v=3zjVtNAo_8w

    Thanks in advance for any assistance.

    #2
    depth Biased alpha sounds like something that would work, but I've never been very good at material authoring so I could be wrong.

    Comment


      #3
      Originally posted by Hellclown View Post
      depth Biased alpha sounds like something that would work, but I've never been very good at material authoring so I could be wrong.
      Correct, depth biased alpha is used in the transparent material to create soft edges at intersections. It is also used in the diffuse to create bubbles and frothy water around the edges of objects. Depth biased alpha only works on a transparent material, it will give you errors if the material is opaque.

      Comment

      Working...
      X