Averaging Normals Along Intersection of Two Meshes

How’s it going UE community? I am currently developing on 4.18 and trying to take advantage of the “DistanceToNearestSurface” node. I have been referencing two attempts that I have found the internet search.

https://www.artstation.com/artwork/9zRna

I have been trying to average either the pixels or pixel normals along the intersection of the meshes. Unfortunately, I have no idea what formulas to even start trying to put together to achieve this.
Some ideas to achieve this that I have but don’t know how to implement are as follows…

  1. Get the pixels along the intersection of both meshes and either average the color information and/or average the pixel normal information.
  2. Tessellate the mesh and move the vertices along the hypotenuse between both meshes
  3. Use some other method without making the material Translucent to achieve this.
    It seems that this is a thing that a lot of people want. so I figured making a topic on it so everyone could contribute to a solution…
    Thanks in advance for your contributions and hopefully even some guys from Epic might chime in!
1 Like

hello from the future, did you manage to achieve this?

Hi @guillemsrr

This reminds me of the ‘Runtime Virtual Texture’ implementation shown in this vid!

Good luck!

Hey @Astrotronic, I’m well aware of RVT, my problem is more “title literal” (Averaging Normals Along Intersection of Two Meshes). So no landscape, and no “one fades on the other”, just normal smoothing on the intersection between two meshes.

I’ve been investigating this these days and to my surprise I haven’t found anything I could use, distance fields, pdo, rvts… I’m going for a workaround on this. Thanks!

That’s because in order to average the normals from one mesh to another, they need to know what the other meshes normals are. It would need a way to sample the other objects normals which isn’t trivial.
The cheap easy way is to use pixel depth offset with a dither node based on the distance field to fake it.

1 Like