Particle Hair - brused hair segments can penetrate object despite Deflect Emitter option keeping the hair keys outside (causing trouble with dynamics) #73745

Closed
opened 2020-02-12 10:32:17 +01:00 by Graham Cripps · 14 comments

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: 7e99e396a9
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)]

DynamicHairBug.blend

**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: `7e99e396a9` 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)] [DynamicHairBug.blend](https://archive.blender.org/developer/F8336106/DynamicHairBug.blend)
Author

Added subscriber: @craigievar

Added subscriber: @craigievar
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

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

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

Added subscriber: @grosgood

Added subscriber: @grosgood

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

Neat trick. I can't do it (yet).
Agree with @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 @craigievar file or other files. Hmmm.

> comb the hair so that some hair tips penetrate the cube. Neat trick. I can't do it (yet). Agree with @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 @craigievar file or other files. Hmmm.
Philipp Oeser changed title 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 2020-02-12 15:07:00 +01:00
Author

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

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
Member

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 {key Ctrl +} a couple of times), combing then affects only the selected hair without ruining the whole hair style

> 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 {key Ctrl +} a couple of times), combing then affects only the selected hair without ruining the whole hair style

Hi @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?

hair_T73745.flv
system-info_T73745.txt
DHB_T73745.blend

Hi @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? [hair_T73745.flv](https://archive.blender.org/developer/F8337310/hair_T73745.flv) [system-info_T73745.txt](https://archive.blender.org/developer/F8337318/system-info_T73745.txt) [DHB_T73745.blend](https://archive.blender.org/developer/F8337319/DHB_T73745.blend)
Author

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!

SingleStandInParticleEditMode.png

InsideTheCube-ParticleEditMode.png

InsideTheCube-ObjectMode.png

InsideTheCube-ShowingContolPoints.png

AfterCombingTheStands.png

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! ![SingleStandInParticleEditMode.png](https://archive.blender.org/developer/F8337499/SingleStandInParticleEditMode.png) ![InsideTheCube-ParticleEditMode.png](https://archive.blender.org/developer/F8337500/InsideTheCube-ParticleEditMode.png) ![InsideTheCube-ObjectMode.png](https://archive.blender.org/developer/F8337501/InsideTheCube-ObjectMode.png) ![InsideTheCube-ShowingContolPoints.png](https://archive.blender.org/developer/F8337502/InsideTheCube-ShowingContolPoints.png) ![AfterCombingTheStands.png](https://archive.blender.org/developer/F8337503/AfterCombingTheStands.png)
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

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.

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 changed title 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) 2020-02-13 10:28:00 +01:00

Added subscribers: @LucaRood-3, @ZedDB, @mano-wii, @dr.sybren

Added subscribers: @LucaRood-3, @ZedDB, @mano-wii, @dr.sybren

The circumstances described here closely parallel #67958. In particular, the discussion in that report from Jan 27, 2020 onward, initiated by @dr.sybren after the new hair collision commit by @LucaRood-3 ( d42a7bbd6e ). Note remarks by @mano-wii and @ZedDB regarding the ##Single Sided## setting. Think that this report can be regarded as a duplicate of that.

The circumstances described here closely parallel #67958. In particular, the discussion in that report from Jan 27, 2020 onward, initiated by @dr.sybren after the new hair collision commit by @LucaRood-3 ( d42a7bbd6e ). Note remarks by @mano-wii and @ZedDB regarding the ##Single Sided## setting. Think that this report can be regarded as a duplicate of that.

Closed as duplicate of #67958

Closed as duplicate of #67958
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#73745
No description provided.