8
$\begingroup$

No matter what I try, I can't close a visible displacement gap between materials when I'm using Adaptive Subdivision.

gaps in mesh

Enabling Auto-Smooth in the normal options fixes gaps on the corners of objects within the same material, but not between materials.

Catmull-Clark Subdiv doesn't fix it, nor does enabling Use Creases. Turning off Adaptive will fix it, but I really need it for my scene.

Any other ideas?

$\endgroup$
5
  • $\begingroup$ You mean the black parts below the bricks on the top? $\endgroup$
    – lemon
    Commented Aug 12, 2019 at 5:56
  • $\begingroup$ Didn't noticed first, but which version of Blender are you using here? $\endgroup$
    – lemon
    Commented Aug 12, 2019 at 7:24
  • $\begingroup$ Yes, the black parts under the brick. And this is using Blender 2.8. $\endgroup$ Commented Aug 13, 2019 at 1:38
  • $\begingroup$ Experimental feature. $\endgroup$
    – lemon
    Commented Aug 13, 2019 at 5:48
  • $\begingroup$ Lol, I was about to mention "BlenderGuru provides some node groups that make it easier to mix materials" just before I realized who you are... How do your Material Mixer behave in this case? $\endgroup$
    – Bruno
    Commented Mar 29, 2020 at 9:48

2 Answers 2

2
$\begingroup$

One painful way to control adaptive subdiv displacement transitions is using Vertex Paint. Ex using stone and grass, each using their own displacement map:

enter image description here

  • Create 3 materials, two for the real materials and one that will be using the other two for the transition. enter image description here

  • Create two node groups corresponding to each of your materials including the BSDF AND the Displacement output. enter image description here enter image description here

  • Create the transition geometry, ex: a band of faces that we'll use for vertex painting: enter image description here

  • Make sure to assign each material to its vertices, ex: grass on one side, stone on the other and the transition material in between enter image description here

  • Create a vertex color layer and paint where the transition happens, one side white, one side black. This is used to control the displacement "height" transition between the materials enter image description here

  • For the transition material, use the Attribute node to get the Vertex Color and drive the transitione by scaling the two materials displacement vectors enter image description here

Note, you will need one new "Mix" material and vertex color layer for each material transition required.

$\endgroup$
1
$\begingroup$

As mentioned by @lemon, as of Blender 2.80, Adaptive Subdivision is still an "Experimental" feature - and so may encounter unexpected behaviours and issues and may be subject to change in the future (it's only recently that the Displacement socket itself came in to the 'Supported' feature set).

It appears that in Adaptive subdivision mode that each distinct material is currently handled as a separate mesh, effectively splitting the mesh into different faces which are displaced by different amounts, depending on the material. In your case you are telling one material (the bricks) to displace by one amount and the other material (the flat surface) to displace by a different amount. At the boundary between the two materials there is a conflict between where one material ends and the other begins - and so the gap.

I suppose the question to ask is "How should the missing 'surface' between these two displaced edges actually be filled?".

The solution is to ensure that the displacement matches between the two materials at the boundary; if you're expecting the grey surface to fill the gap then that material should displace at its edge to match that of the brickwork. If, however, the brick texture should fill the gap then the brick material should displace to the level of the grey surface at its edges. I suspect this would greatly complicate your materials (as they will need to handle blending the displacement into the surrounding surfaces) but I think this is the only solution at the moment.

Perhaps before the adaptive subdivision comes out of Experimental there will be an option to 'average' or somehow automatically manipulate the displacement at the boundary of contradictory material displacements.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .