Home Technical Talk

Question about blending texture edge

polycounter lvl 9
Offline / Send Message
Klo Works polycounter lvl 9
I was watching video game called the snack world :
https://www.youtube.com/watch?v=EMLx89xpAe8

and there is a place that I want to know how did they do  it. 


in the beginning I thought ok they just add floating road on top the terrain grass but then I saw this :



the road is getting wider so now my though is wrong,
so they have tile for grass and tile for dessert
then my question, how they do the in between "the dark green line edge" ?



and also I found this which make my head scratch 



so I decide to try to achieve it .
what I think its one tile plane for the grass ,one floating plane tile for desert and one floating trim tile "the edge in between" which has alpha to blend them.







so, now is  this the right way or is there a better way to handle this ?  is this  consider cheap for the engine ? 
if you got better technique it will be nice to share it  =)
thanks.

Replies

  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    They probably don't have a floating area for the road,  I'd imagine they just cut the geometry Into the ground.
    You're probably right about the blend strip though.
    Alternatively 
    You could do all this with a vertex colour or texture based mask and some Shader work
  • SimonT
    Offline / Send Message
    SimonT interpolator
    I don't know the solution but I want to point to this detail here at the cliff, where a similar problems has to be solved to make a nice transition:


  • Klo Works
    Offline / Send Message
    Klo Works polycounter lvl 9
    poopipe said:
    They probably don't have a floating area for the road,  I'd imagine they just cut the geometry Into the ground.
    You're probably right about the blend strip though.
    Alternatively 
    You could do all this with a vertex colour or texture based mask and some Shader work
    if they cut you will see a seam line but floating they do the strip blend between grass and desert. 


    vertex color mmm the problem it will look just blend between grass and desert but you cant create these "dark greensharp strip "  :

    so its hard to achive with vertex color unless if there is technique i didn't know about it  


  • Klo Works
    Offline / Send Message
    Klo Works polycounter lvl 9
    SimonT said:
    I don't know the solution but I want to point to this detail here at the cliff, where a similar problems has to be solved to make a nice transition:


    yeah they just add one tile texture I think this area not 100% noticeable, not like the road, if they do like that the seam will be noticeable. 


  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    It's most likely a floating blend strip.
    Tiling at seams isn't an issue because you'd map the textures in world space. 

    They are unlikely to place the road on a separate floating mesh because it's a pain to handle zfighting and because it's inefficient to render geometry over other geometry.  It's cheaper and easier to cut the edges you need into the main surface
  • Klo Works
    Offline / Send Message
    Klo Works polycounter lvl 9
    poopipe said:
    It's most likely a floating blend strip.
    Tiling at seams isn't an issue because you'd map the textures in world space. 

    They are unlikely to place the road on a separate floating mesh because it's a pain to handle zfighting and because it's inefficient to render geometry over other geometry.  It's cheaper and easier to cut the edges you need into the main surface
    interesting, so between desert and grass just cut it and one floating for the strip instead my example i made 2 floating. 
    the part you said to cut and use world space is there examples or if you have time please show what you mean. 
    and thanks for taking your time to answer it help me me a lot to learn.
     
  • Eric Chadwick
    One solution for this would be to make a custom shader that blends the two tiling worldspace textures, using vertex color, and it lays on top a separate fade/shadow texture tiled only horizontally to create the dark-edged transition. 

    You would have to cut a strip where you want the transition to occur, and you'd have to add UVs for the overlay. But that wouldn't be too much work.

    My sketchbook has examples of custom Unity shaders that might give you some ideas. 
Sign In or Register to comment.