1
$\begingroup$

I've been trying to use the displacement option from the Dynamic Paint physics modifier after an Armature modifier, but it seems that the normals used for the displacement direction are from the raw mesh, even with the vertex positions used being the deformed ones.

The scene i've created for testing contains a tube mesh deformed by a SplineIK and a Dynamic Paint canvas modifier with displacement surface type, the tube normals are inverted for the displacement to happen from inside to outside (creating a bulge effect). A sphere with a Dynamic Paint modifier brush is following the curve and displacing the tube from inside. The SplineIK rest pose is just a line, and in this pose the displacement behaves the intended way. The tube have only the Armature and Dynamic Paint as modifiers, with the Armature being above.

[![Inverted normal SplineIK tube with displacement Dynamic Paint being wrongly displaced by a sphere following the spline][1]][1]

This Dynamic Paint normal issue also occurs with the wave surface type (or i'm missing some dynamic mesh checkbox in the modifier options, which is unlikely since deformed positions are being used).

Final edit (8 months after): Ignore everything i said below, i probably broke something messing with the code. Turns out that between me installing blender and me downloading the source code, there was a new blender version with the issue fixed.

----- (old, wrong information starts)

Edit:

After months ignoring this problem, yesterday i decided to download Blender's source code and take a look. I didn't understood it very well because i don't use c language (and surely also because there is a lot of code, probably the main reason), but i found in the file dynamicpaint.c the following line inside the method dynamicPaint_frameUpdate:

DynamicPaintSurface *surface = *canvas->surfaces.first;

I then changed it to:

DynamicPaintSurface *surface = *canvas->surfaces.last;

I proceeded to test it and found that the problem was solved. I have no idea if using the base mesh is intentional nor if this change cause problems with other dynamic paint functionalities. I don't know what or if i need to change something in this question, or even if this should be an answer, so i'm just gonna add the development tag because of the code change.

Edit 2:

Tested with waves option in dynamic paint, before and after changing code, also fixed.

----- (old, wrong information ends)

$\endgroup$
2
  • $\begingroup$ How do you make the mesh collapse after the sphere moved through it? $\endgroup$
    – Blunder
    Jul 17, 2021 at 14:34
  • $\begingroup$ @Blunder I checked the Dissolve option in the Dynamic Paint. I used 10 for the time value inside the Dissolve tab. $\endgroup$
    – Hulifier
    Jul 17, 2021 at 22:42

1 Answer 1

2
$\begingroup$

Issue is now fixed in Blender 3.1, probably because of mesh normals refactoring.

Dynamic paint displacement before and after:

DP displacement in Blender 3.0.1 DP displacement in Blender 3.1

Dynamic paint waves before and after:

DP waves in Blender 3.0.1 DP waves in Blender 3.1

$\endgroup$

You must log in to answer this question.

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