Maniphest T73745

Particle Hair - brused hair segments can penetrate object despite Deflect Emitter option keeping the hair keys outside (causing trouble with dynamics)
Closed, DuplicateKNOWN ISSUE

Assigned To
None
Authored By
Graham Cripps (craigievar)
Feb 12 2020, 10:32 AM
Tags
  • BF Blender
  • Nodes & Physics
Subscribers
Garry R. Osgood (grosgood)
Germano Cavalcante (mano-wii)
Graham Cripps (craigievar)
Luca Rood (LucaRood)
Philipp Oeser (lichtwerk)
Sebastian Parborg (zeddb)
Sybren A. Stüvel (sybren)

Description

System Information
Operating system: Linux-4.15.0-54-generic-x86_64-with-debian-buster-sid 64 Bits
Graphics card: Radeon RX 580 Series (POLARIS10, DRM 3.33.0, 4.15.0-54-generic, LLVM 8.0.0) X.Org 4.5 (Core Profile) Mesa 19.0.2

Blender Version
Broken: version: 2.83 (sub 2), branch: master, commit date: 2020-02-11 23:45, hash: rB7e99e396a999
Worked: (optional)

Short description of error

When creating a hair style for an object, using the brush tool, if you accidentally comb any hair segments through the object they will then 'dance' around constantly during animation playback, if Hair Dynamics is enabled.

Exact steps for others to reproduce the error

Open Blender and add particles to the default cube, set the particles to Hair, reduce the number to 100 and activate Hair Dynamics. Switch to Particle Edit mode and comb the hair so that some hair segments penetrate the cube.

  • The Distance setting will prevent hair keys from penetrating the cube, but not the segments in between the keys - this setting should apply to the whole strand
  • Return to Object mode. Press animation playback and the stands that penetrated the cube will dance around constantly, even through the cube is perfectly still. This also works with Cached files and if the Cube is set to Collision in the Physics tab.

[Based on the default startup or an attached .blend file (as simple as possible)]

Related Objects

Mentioned Here
T67958: Hair Dynamics: collision doesn't work (exploding)
rBd42a7bbd6ea5: Integrate hair collisions with cloth collision

Event Timeline

Graham Cripps (craigievar) created this task.Feb 12 2020, 10:32 AM
Philipp Oeser (lichtwerk) added a project: Nodes & Physics.Feb 12 2020, 11:16 AM
Philipp Oeser (lichtwerk) added a subscriber: Philipp Oeser (lichtwerk).

I can see some segments intersect in your file (if that happens, the "dance" is expected with hair dynamics).
I see no tip / hairkey inside the cube though.
But honestly I am having trouble reproducing this.

The Distance setting will prevent the base of the hair from penetrating the cube, but not the tips

For me, even the tips subbornly refuse to penetrate the cube, so not quite sure how you achieved this?
Will also check code, but assume the Deflect Emitter option makes sure hair keys are deflected, not sure if it is ensured that the whole path is outside

Garry R. Osgood (grosgood) added a subscriber: Garry R. Osgood (grosgood).Feb 12 2020, 2:51 PM

comb the hair so that some hair tips penetrate the cube.

Neat trick. I can't do it (yet).
Agree with @Philipp Oeser (lichtwerk) - once a hair strand intersects host geometry, or hair strands intersect with each other, the hair will 'dance' under dynamics. Collision avoidance is in play. Pulling the hair tip though host geometry - that's the bug! - the circumstances under which that neat trick gets pulled. I can't do it yet with @Graham Cripps (craigievar) file or other files. Hmmm.

Philipp Oeser (lichtwerk) renamed this task from Pearticles Hair Dynamics - brused hair tips penetrate object causing hair to dance to Particle Hair - brused hair tips can penetrate object despite Deflect Emitter option causing hair to dance with hair dynamics.Feb 12 2020, 3:07 PM
Graham Cripps (craigievar) added a comment.Feb 12 2020, 3:23 PM

Hi Gary and Philip

To duplicate the bug, the trick is to comb just the hair tips of the hair on top of the cube out and then back towards the cube so they are bent back on themselves in an upside-down U shape and the hair tips penetrate the top polygon of the cube. On the sides the hair will usually fall down when the simulation starts, however it can get stuck and start dancing too. I don't think this penetration should happen, if Deflect Emitter is active (as it is by default) no part of the hair should penetrate the cube at all when combing.

This hair issue has caused me problems many times, especially when animating hairy animals where the hair should look wild. It can be overcome by combing the offending hairs back out, if you can find them! But his will also effect neighbouring hairs and can ruin the whole hair-style.

Thanks for your time

Graham

Philipp Oeser (lichtwerk) added a comment.Feb 12 2020, 3:48 PM

It can be overcome by combing the offending hairs back out, if you can find them! But his will also effect neighbouring hairs and can ruin the whole hair-style.

Tip: if you can find the offending hair, just select that one entirely (select a point, then Ctrl++ a couple of times), combing then affects only the selected hair without ruining the whole hair style

Garry R. Osgood (grosgood) added a comment.Feb 13 2020, 3:44 AM

Hi @Graham Cripps (craigievar)
Very clear instructions. Thank you for that. I think I followed them properly; look at the video I've attached. I cannot comb the hair tip through the single-face plane. Nor grabbing it via G and constraining it to follow the normal direction. Immaterial if the plane has been set up as a soft-body collision surface. The only way I could emulate your description of the bug was by deselecting Deflect Emitter. Turning that on again caused the hair tip to snap back to the positive normal side of the face.
Not sure what is going on at your end. It seems, for you, that Deflect Emitter is a no-op. Have you tried this on another machine?



Graham Cripps (craigievar) added a comment.Feb 13 2020, 8:30 AM

Hi Garry

I really appreciate your efforts in looking into this.

First of all YES, I can duplicate this on another machine.

Thanks for the video - very informative, I think, for me, this identifies the problem - thank you.

It seems it is not so much the tips - or rather the control points of the tips, but the section of the strand between the control points. I have attached some screen shots including views inside the cube, where you can see how the stands have penetrated the corners. There do not appear to be any control points inside the cube however. Then a final test I set up a single hair and combed it so part of the stand penetrated the corner of the cube, I cannot get any control points inside, but it can be seen a section of strand has cut the surface of the cube. This is enough, turn on Hair Dynamics, run the animation and the hair will dance!

Philipp Oeser (lichtwerk) changed the task status from Needs Triage to Confirmed.Feb 13 2020, 10:24 AM
Philipp Oeser (lichtwerk) triaged this task as Low priority.
Philipp Oeser (lichtwerk) changed the subtype of this task from "Report" to "Known Issue".

I am afraid this will not be classified a bug.

Deflect Emitter will only make sure the hair keys (aka vertices) will not penetrate the emitter, it will not check the segments in between.
Collision on the other hand will take the segments into account, so this is where the discrepancy is rooted in.
Making sure this doesnt happen is probably only solvable by running a similar method than collision itself while combing, not sure this is feasible (performance wise or for other reasons).

In any case, this would require some refactor, will keep as Known Issue for reference.

Philipp Oeser (lichtwerk) renamed this task from Particle Hair - brused hair tips can penetrate object despite Deflect Emitter option causing hair to dance with hair dynamics to Particle Hair - brused hair segments can penetrate object despite Deflect Emitter option keeping the hair keys outside (causing trouble with dynamics).Feb 13 2020, 10:28 AM
Philipp Oeser (lichtwerk) updated the task description.
Garry R. Osgood (grosgood) added subscribers: Luca Rood (LucaRood), Sebastian Parborg (zeddb), Germano Cavalcante (mano-wii), Sybren A. Stüvel (sybren).Feb 24 2020, 2:53 PM

The circumstances described here closely parallel T67958. In particular, the discussion in that report from Jan 27, 2020 onward, initiated by @Sybren A. Stüvel (sybren) after the new hair collision commit by @Luca Rood (LucaRood) ( rBd42a7bbd6ea57c69293d3bf978aae2c0e4241b57 ). Note remarks by @Germano Cavalcante (mano-wii) and @Sebastian Parborg (zeddb) regarding the Single Sided setting. Think that this report can be regarded as a duplicate of that.

Sebastian Parborg (zeddb) closed this task as a duplicate of T67958: Hair Dynamics: collision doesn't work (exploding).Mar 2 2020, 12:53 PM