Home Technical Talk

UDK material - Sea shore (need help)

I made a simple test material of how i thought ill go around creating the shoreline, but it gives bad results, the depth biased alpha node takes in account pixels that are behind the pixels currently rendered (or smt like that?) which means it changes with the view.
test material:
wip10i.jpg
results:
wip9n.jpg
and
wip11.jpg
Note how the red (foam) is way larger near me and gets in real thin strip right away

So any ideas on how should i go around this? searched the webs and forums but ppl tend to keep things for themselves when it comes to details, they suggest using the Depth Biased Alpha as i am, but I'm not happy with it or maybe i am using it wrong

YES I KNOW this guy posted his material but its a little too complex for me to find out what part does the trick [ame="http://www.youtube.com/watch?v=zggG0wCD7yw"]UDK Ocean Material Download Knights: Spiral Islands - YouTube[/ame]

Thank you in advance !!!

Replies

  • haiddasalami
    Offline / Send Message
    haiddasalami polycounter lvl 14
    Is the bias supposed to be the other way around? 50 etc will give you a softer look while 0.1 will give you a hard transition.
  • Paunescu.Daniel
    I don't mean the transition if its hard or not, i mean the thickness of the red area in my image its not the same , it changes depending on the view, i don't want my foamy waves to just disappear if i move around
  • tharle
    Offline / Send Message
    tharle polycounter lvl 9
    it works based on the distance from the object with the material on to the object behind. so if you look down on it like in the first picture the sea bed underneath is quite close to the water for a longer strip - hence the larger red bit. when you're looking at it from further inland the distance from the water to the seabed (in terms of your line of sight) is much bigger. if that doesnt make sense try drawing a 2d slice through the shore.

    i'm not sure if there's a great way to get a constant area of foamy waves around the shore - i guess just make 2 materials and only apply the foamy one around the edge would work but might be a little expensive. if you just play with the depthbaisalpha settings you might get what you want.
  • passerby
    Offline / Send Message
    passerby polycounter lvl 12
    just add some more geo to your water plane, and paint in the fomay areas with vertex colour, and use that to drive the transition between deep water and foamy water
  • Paunescu.Daniel
  • ParoXum
    Offline / Send Message
    ParoXum polycounter lvl 9
    Make the beach the less steep possible if you're gonna see the effect from the ground, and aim for 45 degrees if it's seen from top. That's the same effect I used for this video, depthbiasblend is used to create foam and also give the fake waves a direction over existing uvs.

    [ame="http://www.youtube.com/watch?v=ugHySOCGgdg"]WIP Stylized Ocean Shader in UDK - YouTube[/ame]
  • tuxmask75
    Offline / Send Message
    tuxmask75 polycounter lvl 10
    ParoXum wrote: »
    Make the beach the less steep possible if you're gonna see the effect from the ground, and aim for 45 degrees if it's seen from top. That's the same effect I used for this video, depthbiasblend is used to create foam and also give the fake waves a direction over existing uvs.

    WIP Stylized Ocean Shader in UDK - YouTube

    Hmm, I'm having a hard time trying to figuring out how you set the shader up here. would you be able to show us what you did?

    I wonder about areas that don't have geometry underneath, can foam be added there as well?
  • ParoXum
    Offline / Send Message
    ParoXum polycounter lvl 9
    yes you could but you'd have to use masks such as vertex colors masks then I guess. My example only used the depth to mask foam.
Sign In or Register to comment.