Home Technical Talk

UDK Vector Material for Landscape

Hey gang!

I'm currently trying to learn how to use the Landscape tool in UDK, and I made a material for snow and rock.

I managed to somewhat get the result I want for my rocks, as it applies snow only on the top of the rocks, but when I try the same material for my landscape I noticed that my setup won't work, as the angels aren't steep enough.

Does anyone know how to set up a material that changes depending on the angle of the mesh?

I want the snow to apply on the top of the mountain and on the ground, but not on the sides.

Here's a screenshot of what I've got so far:
rayi.png


I've been trying to find a useful tutorial online, but the ones I've found said I had to use a 3rd party program to get that result, so I figured I would ask here :)

Thanks in advanced!

Replies

  • Santewi
    Options
    Offline / Send Message
    Seriously, that snow mask doesn't make any sense... Obj world pos clamped to 0.5-0.5.. Which means you could've just used constant 0.5.


    Dot normalmap or [0,0,1] with [0,0,1] transformed to world space, then multiply/raise exponent depending on how hard falloff you want.
  • eidriaen
    Options
    Offline / Send Message
    Santewi wrote: »
    Seriously, that snow mask doesn't make any sense... Obj world pos clamped to 0.5-0.5.. Which means you could've just used constant 0.5.

    It's supposed to be 0.1-0.5 instead, must have entered the wrong number.

    Santewi wrote: »
    Dot normalmap or [0,0,1] with [0,0,1] transformed to world space, then multiply/raise exponent depending on how hard falloff you want.

    Not following here, would you mind getting a bit more in detail?
  • Santewi
    Options
    Offline / Send Message
    eidriaen wrote: »
    It's supposed to be 0.1-0.5 instead, must have entered the wrong number.




    Not following here, would you mind getting a bit more in detail?

    Well, it still doesn't make any sense. Do you know what the object world pos is? Right now you you just darken the snow mask and the snow mask is completely black at X=0 Y=0 Z=0.

    You have your snow direction parameter already transformed to world space (I suppose/hope), just dot it with your rock normalmap if you have one, and then clamp to 0-1.

    If you don't have a normalmap, just mask out B from the vector transform and clamp to 0-1.

    Add/multiply to modify the point where it'll be 100% snow covered. Then you can adjust the falloff with an exponent, but remember to clamp it before doing so.
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    something like this should work, has some additnail feaures too, you can use the world up vector, or the wind direction to drive blending.

    up_windBlend.jpg
  • eidriaen
    Options
    Offline / Send Message
    Thanks guys, I have some more control over where the snow appears now, especially with the wind.

    Although I'm wondering how I can set up the material to it understand slopes/angles and applies a different material there, Landscape has this option, but it requires a .r8 file from a different program (like Terrasculpter), but I'm told it's possible to do it without a use of another program?

    Any ideas?
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    what are you using the landscape system or just a mesh for terrain, since i know apps like world machine can create masks based on the slop or not, so your could use that to bake out masks.
Sign In or Register to comment.