Home 3D Art Showcase & Critiques

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

2

Replies

  • PaulH
    Offline / Send Message
    PaulH polycounter lvl 7
    Thanks for the reply man!
  • Michael Knubben
  • Olmo
    Offline / Send Message
    Olmo polycounter lvl 4
    @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 8
    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 6
    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 13
    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 13
    Awesome terrain blending tech Olmo!
  • wickdsickk
    Offline / Send Message
    wickdsickk polycounter lvl 3
    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 polycounter lvl 4
    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 6
    Even if you release it for free, I'd gladfully give a few dollars as donation once you release it, it's looking great !
  • LuisCherubini
    Offline / Send Message
    LuisCherubini interpolator
    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 8
    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 8
    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
    Offline / Send Message
    wickdsickk polycounter lvl 3
    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
    Offline / Send Message
    dovahkiin009087 polycounter lvl 5
    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 interpolator
    Definitely share if you've got a set up, would love a breakdown.
  • Maximum-Dev
    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
    Offline / Send Message
    dovahkiin009087 polycounter lvl 5
    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
    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
    Offline / Send Message
    dovahkiin009087 polycounter lvl 5
    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
    Offline / Send Message
    dovahkiin009087 polycounter lvl 5
    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
    Offline / Send Message
    dovahkiin009087 polycounter lvl 5

    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
    Offline / Send Message
    dovahkiin009087 polycounter lvl 5

    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
    Offline / Send Message
    dovahkiin009087 polycounter lvl 5
    Anyone find any help with what i posted? Or has anyone expanded on it?
  • bOyka8
    Offline / Send Message
    bOyka8 polycounter lvl 6
    @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 polycounter lvl 4
    Excellent work man! Great job!
  • Jack M.
    Offline / Send Message
    Jack M. interpolator
    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 8
    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 19
    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 19
    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
    Offline / Send Message
    jkelly206 polycounter lvl 3
    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!
  • vlad_the_implyer
    Offline / Send Message
    vlad_the_implyer polycounter lvl 5
    jkelly206 said:
    So I copied your setup and I'm not getting the same results at all. There's not really any blending going on.
    Can you post a picture of your global distance fields. It's under Show -> Visualize -> Mesh DistanceFields

    Here's what i've got with a little vertex paint and basically the same setup as above:


    If you keep your angles in check and slap some organic mask on it, you can aleviate most issues that arise from using it.

    Here's a rock with baked lighting, you can see a couple of places where some tweaks should be made, but i'm using a top-down projection, for the "dirt" texture, if you make it triplanar, then you should have no stretchy lines at all.

  • dovahkiin009087
    Offline / Send Message
    dovahkiin009087 polycounter lvl 5
    jkelly206 said:
    So I copied your setup and I'm not getting the same results at all. There's not really any blending going on.
    Can you post a picture of your global distance fields. It's under Show -> Visualize -> Mesh DistanceFields

    Here's what i've got with a little vertex paint and basically the same setup as above:


    If you keep your angles in check and slap some organic mask on it, you can aleviate most issues that arise from using it.

    Here's a rock with baked lighting, you can see a couple of places where some tweaks should be made, but i'm using a top-down projection, for the "dirt" texture, if you make it triplanar, then you should have no stretchy lines at all.

    How do you make textures triplanar? No clue how to do that
  • vlad_the_implyer
    Offline / Send Message
    vlad_the_implyer polycounter lvl 5
    You use WorldAlignedTexture node and then use the resulting texture and the vertex color mask you've got to create a more natural looking mask.


    I've tried making WorldAlignedNormals to blend properly on distance field normals, but the results weren't that great.
    The mask method above works great, i'll try to push something else out of this.


  • benmerrick3d
    Offline / Send Message
    benmerrick3d polycounter lvl 12
    I've been following this thread and would love to know if the tool is available to download?

    Also vlad did you get any further with yours?

    Thanks
  • DarkDisguise
    Really nicely looking tool, and very nifty. Tried it out, and applied the different settings for the project, and it seems to work. Then I bake, and suddenly, all around the edges of where the blending occurs, there are these shadows everywhere. It seems to be the static shadows since unchecking them makes the blending smooth again, but then I lose all the shadows cast by the meshes. 

    Did I miss something? What am I doing wrong? :S
  • Derzo
    Offline / Send Message
    Derzo polycounter lvl 5
    I've been messing around with these things for a while and I did a breakdown in paint to cover the essentials. Hope you find it helpful :)


    Base color and normal view modes are great to visualize the material

  • Makkon
    Offline / Send Message
    Makkon polycounter
    I hate to resurrect an old thread, but for real, is there an update to this? I'm willing to buy this tool if it doesn't use dithering/pixel depth offset.
  • Jack M.
    Offline / Send Message
    Jack M. interpolator
    I made a pretty effective version of this without dithering and pixel depth offset. I'll see if I can't put some more time into it and post here.
  • Jack M.
    Offline / Send Message
    Jack M. interpolator
    Here's a sample I made a while back with very different roughness and color values to really test how well the blend was working. 


  • Maximum-Dev
    I think the real issue here is to get the mesh material to blend into any landscape layers it is placed on.

    But since there is no access to those data, a perfectly seamless transition is still limited to blend into 1 landscape layer and that's not exactly what's being done in Star Wars.

    The only way I found around that was to copy all landscape layers inside the mesh material and use static switch parameters to choose which layer the mesh would blend into.

    You will pay the cost for the one layer you switch to and not the rest of them, but the issue becomes having several material instances per mesh, which you will use to switch to different layers i.e:

    MI_Rock_01_Snow
    MI_Rock_01_Mud
    MI_Rock_01_Sand
    -(Depending on how many layers the mesh is intended to be placed upon).

    Still, regardless of how seamless everything looks like, if lighting is not baked and the transition area isn't directly lit by a light source i.e is covered in shadows or is under an overcast sky, the intersecting areas are darkened by SSAO regardless of seamless normal transition. This can be visible on snow, sand, generally smooth materials.

    That might be a feasible solution for some though.
2
Sign In or Register to comment.