[Unreal 4] Terrain Blending Tool (inspired by Star Wars: Battlefront)

2

Replies

  • Olmo
    Offline / Send Message
    Olmo polygon
    PaulH said:
    Cool work, Olmo!

     Could you tell me if you're still able to have 'Generate Distance Fields' checked for the rock mesh?
    Yeah, the rock still generates Distance fields :)
  • PaulH
    Offline / Send Message
    PaulH polycounter lvl 6
  • Michael Knubben
  • Olmo
    Offline / Send Message
    Olmo polygon
    @MightyPea That tool is not developed by me :). Apparently, someone was inspired to make a terrain-blending tool after reading about my progress (it's mentioned here https://80.lv/articles/free-solution-for-blending-meshes-into-landscape/). There are some differences in implementation but you should definitely check out his tool if you're interested in this stuff. :D
  • Michael Knubben
    Oops!
    Suppose I should've spent more time looking at the names.
    Looking forward to seeing your implementation soon, then!
  • Mant1k0re
    Offline / Send Message
    Mant1k0re polycounter lvl 3
    That gumroad link isn't working; Olmo's material seems nice but I'm hoping the alternative works with 4.14. Either way thank you for working on this it's very cool.
  • heyeye
    Offline / Send Message
    heyeye polycounter lvl 5
    Mant1k0re said:
    That gumroad link isn't working; Olmo's material seems but I'm hoping the alternative works with 4.14. Either way thank you for working on this it's very cool.
    The link inside the 80.lv article works.
    Here it is: https://gumroad.com/l/BVVFy

    The article also says to have ‘Generate Mesh Distance Fields’ in your project setting enabled and also uncheck “Affect Distance Field” on Static Mesh to make the material work.
  • duke
    Offline / Send Message
    duke polycounter lvl 7
    The gumroad version isn't ideal as it uses the pixel offset/temporal AA to work which looks very odd at certain angles (and also requires the material to be masked/transparent).
  • Clark Coots
    Offline / Send Message
    Clark Coots polycounter lvl 6
    Awesome terrain blending tech Olmo!
  • wickdsickk
    any news on the release of this? :)
  • V_R
    Offline / Send Message
    V_R null
    So I've been stalking Polycount in general, but specifcally this thread, for quite some time now, just lurking. I decided it was time to show some support here. It's absolutely amazing and looks gorgeous. Does it rely on vertices being near the terrain intersection, though? I had a thing in Unity which did this, but it required the interesection with terrain to have a line of verts so it could use vertex colors, or something like that.
    I'm absolutely looking forward to release, keep us updated! :smiley:
  • Olmo
    Offline / Send Message
    Olmo polygon
    Hey guys, sorry for the long silence but the tool is pretty much finished .

    I haven't managed to work out all the kinks, since Distance Fields can be pretty unstable. Now I'm working on the video tutorial. It's important to me that I release this tutorial together with the tool since there are a lot of things to take into account with the tool. The problem is that I just started an internship at a video game company in Valencia and that my current apartment doesn't have internet, this has somewhat impeded my progress . I'm moving into a new apartment the 1st of March, so after that I should be able to finish the tutorial .

    Sorry to keep you guys waiting but I don't just want to release this into the wild without documentation . It's definitely still going to be free, so don't worry about that!
  • V_R
    Offline / Send Message
    V_R null
    Olmo said:
    Hey guys, sorry for the long silence but the tool is pretty much finished .

    I haven't managed to work out all the kinks, since Distance Fields can be pretty unstable. Now I'm working on the video tutorial. It's important to me that I release this tutorial together with the tool since there are a lot of things to take into account with the tool. The problem is that I just started an internship at a video game company in Valencia and that my current apartment doesn't have internet, this has somewhat impeded my progress . I'm moving into a new apartment the 1st of March, so after that I should be able to finish the tutorial .

    Sorry to keep you guys waiting but I don't just want to release this into the wild without documentation . It's definitely still going to be free, so don't worry about that!
    Awesome, thanks for the update! I'm still patiently stalking this thread :3 Polycount gained a lurker thanks to you. Either way, I'd probably even get it as paid asset, but really appreciate you releasing it for free. Don't worry about the dates and timelines, it's just nice to know what's going on.
    Looking forward to the release :smiley:
    Thanks <3
  • NodrawNT
    Offline / Send Message
    NodrawNT polycounter lvl 3
    Even if you release it for free, I'd gladfully give a few dollars as donation once you release it, it's looking great !
  • Kerub
    Offline / Send Message
    Kerub polycounter lvl 3
    Any news on this? The hype never ends.  :D
  • t_beaugelin
    Hey guys ! I've been following this thread for a long time now, and even made a Poly account for it (and for other things, but this is the main reason :wink: ) And was wondering if there was anything new ? Any release date maybe ?
    BTW, thanks for the great work Olmo ! 
  • bigodon
    Offline / Send Message
    bigodon polycounter lvl 2
    let me follow this close, i'm looking forward to something like this and improve the blending on 2 surfaces with something great like this
    awesome work olmo, can't wait!!!
  • Fisher007
    Offline / Send Message
    Fisher007 polycounter lvl 4
    I had such high hopes for this thing so please Olmo, don't abandon us puny humans!  :# Don't worry about the tutorials, they would be unbelievably awesome, but having a working example is so much more important IMO. :)
  • wickdsickk
    reviving this post, im assuming he didnt want to share it after all, but has anyone else any clue on how to achieve this? it would be extremely helpful :)
  • dovahkiin009087
    I found out how to do it guys!!! Each of those pictures had 2 assets in each. A landscape and a plane that is rotated. If you want to know how just say so, dont know if people even still follow this
  • Gannon
    Offline / Send Message
    Gannon polycounter lvl 9
    Definitely share if you've got a set up, would love a breakdown.
  • Maximum-Dev
    Offline / Send Message
    Maximum-Dev Polycount Sponsor
    dovahkiin009087, Whaaat am I looking at? I see a plane floating on another one but my brain can't connect the dots here.
  • Michael Knubben
    f you want to know how just say so
    @dovahkiin009087
    Don't tease. This entire thread is full of 'omg when is this coming out?!11!?'.
    Either post what you've found, or don't post anything at all.
  • dovahkiin009087
    Hello all, sorry about disappearing like that. I didnt get any notifications or anything and i didnt check the site because i have been working. I just though people had stopped caring.
    Maximum-Dev, Yes exactly. Its one plane at about 15 degree angle to a terrain. They both have world aligned textures assigned with a dither temporal AA. Its simple but it actually works. The pictures dont really do it justice at all, but the results arent bad at all. The one thing is if you have very specific lighting on a very odd looking mesh with a ton of different slope angles it gets kind of funky. But sofar on just regular items like a plane bent, or a tree with a base that is curved outward and down, its almost not noticeable at all, even when you get really close. 
    Let me post more pictures and my material set up. As i said its nothing complex at all, but it works.
  • Maximum-Dev
    Offline / Send Message
    Maximum-Dev Polycount Sponsor
    Hello all, sorry about disappearing like that. I didnt get any notifications or anything and i didnt check the site because i have been working. I just though people had stopped caring.
    Maximum-Dev, Yes exactly. Its one plane at about 15 degree angle to a terrain. They both have world aligned textures assigned with a dither temporal AA. Its simple but it actually works. The pictures dont really do it justice at all, but the results arent bad at all. The one thing is if you have very specific lighting on a very odd looking mesh with a ton of different slope angles it gets kind of funky. But sofar on just regular items like a plane bent, or a tree with a base that is curved outward and down, its almost not noticeable at all, even when you get really close. 
    Let me post more pictures and my material set up. As i said its nothing complex at all, but it works.
    World aligned textures and DTAA have always been well known. What you have currently done is applying a material to ground and applying the same material to a plane. Of course you'd not have any seams on the materials if the mesh is mostly a flat surface pointing upwards going through the landscape surface like that. The real issues that need to be solved are:

    A) SSAO still leaves large amount of AO at intersections regardless of mesh normals, making the intersection dark to some degree.
    B| Mesh should blend into -ANY- landscape layer it's placed on.

    A I haven't been able to do anything about it, which is really bad. And for B I found zero clue as to how to make it blend automatically into every layer it's placed on but I'm working on it atm trying to minimize the manual work involved while keeping instruction count relatively low.



    ^ You can see it looks fine on the right side, but on the left where it's not under direct light SSAO darkens the mesh intersections. My currently is able to blending the rock into different landscape materials but like I said there's still a bit of manual clicking involved and and the setup is still kinda complex even though it's very organized so no happy times over here but still working on it.  :'(
  • dovahkiin009087
    Hello all, sorry about disappearing like that. I didnt get any notifications or anything and i didnt check the site because i have been working. I just though people had stopped caring.
    Maximum-Dev, Yes exactly. Its one plane at about 15 degree angle to a terrain. They both have world aligned textures assigned with a dither temporal AA. Its simple but it actually works. The pictures dont really do it justice at all, but the results arent bad at all. The one thing is if you have very specific lighting on a very odd looking mesh with a ton of different slope angles it gets kind of funky. But sofar on just regular items like a plane bent, or a tree with a base that is curved outward and down, its almost not noticeable at all, even when you get really close. 
    Let me post more pictures and my material set up. As i said its nothing complex at all, but it works.
    World aligned textures and DTAA have always been well known. What you have currently done is applying a material to ground and applying the same material to a plane. Of course you'd not have any seams on the materials if the mesh is mostly a flat surface pointing upwards going through the landscape surface like that. The real issues that need to be solved are:

    A) SSAO still leaves large amount of AO at intersections regardless of mesh normals, making the intersection dark to some degree.
    B| Mesh should blend into -ANY- landscape layer it's placed on.

    A I haven't been able to do anything about it, which is really bad. And for B I found zero clue as to how to make it blend automatically into every layer it's placed on but I'm working on it atm trying to minimize the manual work involved while keeping instruction count relatively low.



    ^ You can see it looks fine on the right side, but on the left where it's not under direct light SSAO darkens the mesh intersections. My currently is able to blending the rock into different landscape materials but like I said there's still a bit of manual clicking involved and and the setup is still kinda messy even though it's very organized so no happy times over here but still working on it.  :'(
    Yes it is for a very specific thing, but even at 20 degrees or so of a slope it works great. I wasnt trying to make it seem perfect, its not by any means. Very simple stuff is my thing.
  • dovahkiin009087
    Is this setting disabled in your project, and do you have an AO map on your objects? Also are you going baked or fully Dynamic? Also why not just use DFAO

  • dovahkiin009087

    The first picture is with the shader (206 Instructions), the second is the mesh with just a black shader applied to show geometry. As you can see its kind of crazy but doesnt really show up at all as crazy when it has the blend shader with it.
  • dovahkiin009087

    First image is a custom material function to use packed textures in a texture object and have them world aligned, also to change the mask type, just change the component mask to the color you need. Right now its on blue, so you can change it to R,G, or A.
    Second is the landscape material with one texture, and the last picture is the asset material with a texture mask i drew in about .13 seconds in Photoshop to show my point that if you have packaged textures you may want to use and have them work with this shader, you can. Any questions, comments or anything just shout them over. I know its simple but its better than nothing at all.
  • dovahkiin009087
    Anyone find any help with what i posted? Or has anyone expanded on it?
  • bOyka8
    @Olmo , has this been released yet or are you planning on making it paid? I'd love to use this in a project.
  • Apocrs1980
    Offline / Send Message
    Apocrs1980 triangle
    Excellent work man! Great job!
  • Jack M.
    Offline / Send Message
    Jack M. polycounter lvl 5
    For those still interested... this technique works really well, however you have to have mesh distance fields enabled. 

    http://blog.riteofilk.com/post/163565382038/blurring-the-edge-blending-meshes-with-terrain-in
  • Mant1k0re
    Offline / Send Message
    Mant1k0re polycounter lvl 3
    Jack M. said:
    ...you have to have mesh distance fields enabled. 

    Thanks for the link. For those who don't know, what are the implications in terms of performance?
  • vlad_the_implyer
    Offline / Send Message
    vlad_the_implyer polycounter lvl 5
    I've fiddled around with the distance fields and found a messy but damn smooth looking blend.

    It's very dirty as of now, however, as i'm tring to use DistanceToNearestSurface to find intersections, but it's not exactly flexible and is also using the mesh itself (It's working fine on the landscape, but the landscape resolution is at maximum).

    It's messy and automated, but if you mask using the vertex color it can be real smooth, i'll see where this could go.



  • TorQue[MoD]
    Offline / Send Message
    TorQue[MoD] polycounter lvl 13
    I've fiddled around with the distance fields and found a messy but damn smooth looking blend.

    That looks pretty awesome as did the original post. So call me crazy, but couldn't you simply use a Depth Fade node setup on any material to get this effect on the cheap? I typically use depth fade for things like water materials and the like but it pretty much looks like your setup here Vlad. 
  • vlad_the_implyer
    Offline / Send Message
    vlad_the_implyer polycounter lvl 5
    use a Depth Fade node setup on any material to get this effect on the cheap?
    Depth Fade will work only with translucent materials, right? This means you'll just get a fuzzy edge and not an actual normals blend.

    I'm trying to get an actual blend, and using distance fields is not THAT costly, if using sparringly and not on every surface ever. Epic uses these in Fortnite, maybe they'll add more functionality later on.
  • TorQue[MoD]
    Offline / Send Message
    TorQue[MoD] polycounter lvl 13
    Depth Fade will work only with translucent materials, right? This means you'll just get a fuzzy edge and not an actual normals blend.

    I'm trying to get an actual blend, and using distance fields is not THAT costly, if using sparringly and not on every surface ever. Epic uses these in Fortnite, maybe they'll add more functionality later on.
    Oh that's right. I was thinking you could use it on masked materials as well. What you've created so far pretty much looks like a depth fade setup for solid objects. You planning to share the source?
  • vlad_the_implyer
    Offline / Send Message
    vlad_the_implyer polycounter lvl 5
    Ah yes, it is absolutely nothing complex, here's the current setup, i wish i was smart enough to work some magic with it. I saw some people do pseudo-softbodies using distance field gradient, or you could probably make some lava lamp like effect with this.

    Basically i'm using normalized distance field gradient as a replacement for normals, this gives you a common "normal map" over all the objects generating mesh distance fields. I'm also trying to use DistanceToNearestSurface to mask out the parts where i blend automatically, but it's also picking up the mesh itself, since it's generating mesh distance fields, and i don't think there's a way to find if distance field belongs to one object or the other. If you replace the latter with the manual mask or a vertex color mask, you can get all the control you need.


    If you blend your normal map using Distance Field Gradient as a pseudo vertex normal, you should be able to make a seamless transition with detailed normals. Or you can use DistanceToNearestSurface as a mask to lerp with the "dirt" texture, it'll look like "gameart", but if you throw a noise mask/mask by height, it can still look nice.


  • jkelly206
    Ah yes, it is absolutely nothing complex, here's the current setup, i wish i was smart enough to work some magic with it. I saw some people do pseudo-softbodies using distance field gradient, or you could probably make some lava lamp like effect with this.

    Basically i'm using normalized distance field gradient as a replacement for normals, this gives you a common "normal map" over all the objects generating mesh distance fields. I'm also trying to use DistanceToNearestSurface to mask out the parts where i blend automatically, but it's also picking up the mesh itself, since it's generating mesh distance fields, and i don't think there's a way to find if distance field belongs to one object or the other. If you replace the latter with the manual mask or a vertex color mask, you can get all the control you need.


    If you blend your normal map using Distance Field Gradient as a pseudo vertex normal, you should be able to make a seamless transition with detailed normals. Or you can use DistanceToNearestSurface as a mask to lerp with the "dirt" texture, it'll look like "gameart", but if you throw a noise mask/mask by height, it can still look nice.


    So I copied your setup and I'm not getting the same results at all. There's not really any blending going on. The only effect I'm getting out of this is the normal fading out at some intersections. There's patches of blending happening but only at certain angles - see top right of this image:
     
  • Derjyn
    Offline / Send Message
    Derjyn polycounter lvl 2
    I've had my eye on this technique (and others) for some time, but Olmo's original method is by far the best in my opinion.  Where are you at with this Olmo?  Just curious if you still plan on releasing this!

    Thanks for this, and keep up the great work!
2
Sign In or Register to comment.