I’m hoping somebody can help point me in the right direction for figuring out how to get my rock mesh kit to seamlessly blend each mesh into the next. I’ve experimented with Distance Fields and Realtime Virtual Texturing but neither seems to do what I want, based on my experiments. It seems that each was made to function between a landscape and various objects intersecting with it, rather than several objects intersecting with each other.
PDO seems to be a good option, however it doesn’t look like I can have all my meshes use the same material and have PDO function at the same time. Is there a work-around for this? In order to get the results I wanted below, I had to assign a duplicate of my material to the second mesh… but this isn’t exactly feasible when you start adding more and more rock meshes.
Look up Material Layer Blends and Material Attributes. It’s not the one thing that’ll do it all, but two aspects of it I think. I suggest also reading up on various material expressions and functions to discover what’ll work. It’s not likely you’ll receive an exact workflow or solution for it in AnswerHub or the forums.
I suppose the main inquiry is if I can somehow make PDO affect all meshes using one material - because that seems like functionality that should exist no?
But I hadn’t even thought of building it as a landscape material to take advantage of those functions. I’ll give that a whirl.
Wouldn’t you need to apply the PDO to every mesh’s material that is involved then? If you’re only dealing with several meshes that all have the same material (with PDO) attached, then you would need a way to reference the locations of where those meshes intersect, and not merely the depth. The stone material is a part of a landscape, right? I understand that it is probably meshes placed on a landscape. But basing the blend entirely on pixel depth is probably not sufficient for it to function correctly.
Some of the coordinates expressions for materials could be useful in the material, specifically ActorPosition and Object Position WS, PixelNormalWS, SceneTexelSize, VertexNormalWS, and WorldPosition. I think you’d need to get the normal of where two meshes intersect and are to be blended in order to get a more complete blend…as well as a reference to the coordinates and what to do with those coordinates.
For anyone finding this thread in the future: blending different objects together might not work if you use the temporal dither. They will have the same offset on the same pixels, and so cancel each other out.
You need to produce different dither patterns per mesh.
So use per mesh data Like: object position, per instance custom data.
And then modify the dither pattern by it.