Download

Blending meshes with landscapes with no seams: how?

Hi,

Does anyone know a clear and well described technique available in UE4 to put rock meshes in a landscape and integrate them smoothly with it?
The idea is to have a result like this:

https://youtube.com/watch?v=pv8wjMGGGDM

I found this video from a thread on polycount. Following the discussion, no one really found a way to reproduce it in UE4.
But the post is almost 18 months old. So, maybe, since then, something new happened…

It appears that I posted it twice: ?!? Sorry for that.

All you need to do is sample the normal map in world space of the landscape in your rock material and blend that with the rock’s normals (also in world space).
Make sure to turn off “Tangent Space Normal” in your material.

I don’t get it. How do you do that? What’s the nodes setup?

+1 I’d like to know about this too, artist friendly method preferably.

+1

nice effect , folowing this thread :smiley: :smiley:

All this is doing is allowing you to do is vertex paint a mask that reveals a “blend” material across the verts of the meshes. We used similar techniques in Halo; we created “dirt skirts” using Houdini and Maya, then vertex painted the mask in maya. Once in engine you can just apply the material you want (i.e. sand) and since the vertex colors already export with your meshes, the material will automatically blend in with everything.

You can do the same thing in UE4. You can setup a material with 2 layers (i.e. rock and sand), then just paint vertex colors (in UE4, no need for maya) to mask which parts will be rock or sand, they will blend in and that’s that. If you want to get fancy, you can generate a mask in Substance Designer so it’s more realistic then vert colors, and get some more believable blending between the two objects.

I could do a tutorial showing both the vertex painting method and Substance, if people are interested?

I am interested too, but the method you suggested, if I understood it right, will only solve diffuse differences, hard edge between meshes and landscape will still be there
Guys from Battlefront team did it really nice

Look for Terrain and asset blending

This does not accomplish what OP is asking for. He wants to be able to blend the normals with the underlying mesh so that there are no visible seams.

You can’t access the underlying terrain’s normal maps. So you’ll have to take the terrain to 3dsMax or other 3d software and get the normal map from the terrain by projecting it on to a plane.

+1 Yes please…

Yes, very interesting!

Could you please do some example, no need to do it with actual assets, I am interested only in material side, how to build nodes for this stuff

I second this! Please do one. :slight_smile:

once you have the terrain normal map you pretty much just lerp between that(normal map texture) and the vertex normals(vertexNormal(WS)) of your rock assets based on the vertex color mask. you’ll possibly want to turn off tangent space normals for the rock asset material.

[MENTION=13213]Jak Carver[/MENTION]: I’d be really interested too in a tutorial about these techniques to blend between landscape and meshes diffuse textures. @Norman3D: so, about blending between normals to avoid hard edges (which is indeed required to achieve the effect) , I have to make a normal map of the whole landscape geometry, right? Ok, but when I have this normal map, how do I use it? By blending it with the rock’s normals" as you said? This part is still unclear to me.

EDIT: I posted this just after divi and didn’t read it’s post discribing how to blend normals. I’ll start experimenting with all these indications but a screenshot of the nodes setup would be great.

I’m sorry guys, I barely have time. Once you have the normal map you have to use worldposition.XY as the UV coordinates of said texture.
You need to make sure it’s scaled and positioned correctly.

Hey guys!
Wanted to show you all my solution. It is not perfect, and requires more steps than i would like to give our artists, but at least it works.
So i’m using DistanceToNearestSurface material node to mask lower part of the object, as well as World Projected textures for ground. I also transform normals to Tangent/World space (did it differently for ground and objects for some reason, just noticed that). So objects have Tangent-Space Normals turned off and then their own normal is transformed to world. Ground is reverse, it transforms normal from World to Tangent and that’s it. Probably gonna fix that soon.
There’s also vertex paint i’m using on ground to paint an area where and object should be blended in, which is my main bugbear with this whole system. Ideally it should be the same principle that objects use but distance fields just don’t work like that, sadly.
So here’s a screenshot of a blended mesh:
Stump1.jpg

And here how mesh looks with ground hidden in main pass:
Stump2.jpg

And here’s my materials:
Ground -
GroundMat.jpg

Object -
053cf5c9f6ce219334890120d608e489ccfc9bd9.jpeg

Don’t forget to turn off Affect Distance Field Lighting for your objects (but not for ground!). And of course Generate Mesh Distance Fields in you Projects Settings should be turned on as well.

Cool! Thanks, I’ll test it. Is your ground an other static mesh or a landscape?

If you’re OK modeling a little bit of ground around your rock/stump (as in your mesh view) then another option would be to use per-pixel depth offset, and make the blades of grass be very “near” and anything below them be very “far” in that offset. When you align the mesh with the terrain, set it so the “near” of the grass in your mesh is above the terrain level, but the “far” of the grass bottom in your mesh is below the terrain level.
This gives you a different kind of natural – it makes the “seam” follow the contour of your grass blades, and thus not be particularly jarring.
The good news is that it’s very easy to author and reasonably easy to align. The bad news is that per-pixel depth offset is expensive. You only need it on the “flat skirt” of grass, though. And if you do parallax mapping, then this is no additional cost.

@jwatte: do you have a screenshot of the result, from your own work?