@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.
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.
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 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.
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).
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!
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!
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 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 Thanks
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 ) And was wondering if there was anything new ? Any release date maybe ? BTW, thanks for the great work Olmo !
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!!!
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.
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
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
@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.
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.
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.
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.
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
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.
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.
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.
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.
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.
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?
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.
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:
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!
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.
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
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.
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.
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.
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.
Replies
https://gumroad.com/d/0b427ee58160fa6d0f1dc084c9f30585
Suppose I should've spent more time looking at the names.
Looking forward to seeing your implementation soon, then!
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.
I'm absolutely looking forward to release, keep us updated!
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!
Looking forward to the release
Thanks
BTW, thanks for the great work Olmo !
awesome work olmo, can't wait!!!
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.
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.
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.
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.
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.
http://blog.riteofilk.com/post/163565382038/blurring-the-edge-blending-meshes-with-terrain-in
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.
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.
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.
Thanks for this, and keep up the great work!
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.
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.
Also vlad did you get any further with yours?
Thanks
Did I miss something? What am I doing wrong? :S
Base color and normal view modes are great to visualize the material
MI_Rock_01_Mud
MI_Rock_01_Sand