When hair emitter's "Curve Guide" Field Weight lies between 0 and 1, strands float toward origin. #71745

Open
opened 2019-11-21 21:05:16 +01:00 by tim · 8 comments

Operating system: macOS Mojave 10.14.6
Bug occurs both in 2.8 and 2.81 beta

When a hair emitter's "Curve Guide" Field Weight lies between 0 and 1, strands float inexplicably toward origin. This renders the "Curve Guide" styling method incompatible with "Hair Dynamics."

The attached .blend was made with these steps:

  1. enable "Hair" particle system on default cube.
  2. add a bezier curve and enable "Curve Guide" Force Field physics.
  3. stretch bezier curve into a wide arc emerging from the cube.
  4. parent the curve to the cube.
  5. translate the cube far from the origin.
  6. In the Particle Settings' "Field Weights" tab, set Curve Guide to 0.5.
  7. Hair particles float inexplicably toward origin.
    (Optional)
  8. set Curve Guide back to 1.0
  9. in the curve's Physics tab, under Settings, set "Falloff Power" to nonzero. Encounter the same bug.

Thanks for your time!
curve-guided hair with field weights bug.blend

Operating system: macOS Mojave 10.14.6 Bug occurs both in 2.8 and 2.81 beta When a hair emitter's "Curve Guide" Field Weight lies between 0 and 1, strands float inexplicably toward origin. This renders the "Curve Guide" styling method incompatible with "Hair Dynamics." The attached .blend was made with these steps: 1. enable "Hair" particle system on default cube. 2. add a bezier curve and enable "Curve Guide" Force Field physics. 3. stretch bezier curve into a wide arc emerging from the cube. 4. parent the curve to the cube. 5. translate the cube far from the origin. 6. In the Particle Settings' "Field Weights" tab, set Curve Guide to 0.5. 7. **Hair particles float inexplicably toward origin.** (Optional) 8. set Curve Guide back to 1.0 9. in the curve's Physics tab, under Settings, set "Falloff Power" to nonzero. Encounter the same bug. Thanks for your time! [curve-guided hair with field weights bug.blend](https://archive.blender.org/developer/F8152552/curve-guided_hair_with_field_weights_bug.blend)
Author

Added subscriber: @teedotbee

Added subscriber: @teedotbee
tim changed title from When hair emitter's "Curve Guide" Field Weights lie between 0 and 1, strands float toward origin. to When hair emitter's "Curve Guide" Field Weight lies between 0 and 1, strands float toward origin. 2019-11-21 21:07:44 +01:00
Author

i'm pretty sure the issue lies in this function here...anyone care to confirm?
https://github.com/sobotka/blender/blob/master/source/blender/blenkernel/intern/effect.c#L915

EDIT: No, although most effectors' weights are factored in here, Curve Guides' aren't. They're done in the do_guides(...) function as per below

i'm pretty sure the issue lies in this function here...anyone care to confirm? https://github.com/sobotka/blender/blob/master/source/blender/blenkernel/intern/effect.c#L915 EDIT: No, although *most* effectors' weights are factored in here, Curve Guides' aren't. They're done in the `do_guides(...)` function as per below
Author

EDIT AGAIN: Patch request viewable here: https:*developer.blender.org/D6292

I'm back. Commenting out these two lines in particle.c's do_guides(...) function (L2107 and L2108) fixes it. https://github.com/sobotka/blender/blob/master/source/blender/blenkernel/intern/particle.c#L2107.

Also fixes it for particles, though may need normalization as valid range seems to lie between 0.001 and 0.005 (scales pleasingly for hair though, as the attached video shows)

EDIT: I'll be more precise--I didn't merely comment out the lines, I replaced

madd_v3_v3fl(veffect, guidedir, data->strength);```

with
```      madd_v3_v3fl(effect, vec_to_point, 1); 
madd_v3_v3fl(veffect, guidedir, 1);```
Seems to have been allowing weight to impact global position, which explains the heading-to-origin. 

broken:
[BROKEN.mov](https://archive.blender.org/developer/F8156457/BROKEN.mov)
fixed:
[FIXED-.mov](https://archive.blender.org/developer/F8156461/FIXED-.mov)

Very happy as this means I can continue animating.
EDIT AGAIN: Patch request viewable here: [https:*developer.blender.org/D6292 ](https:*developer.blender.org/D6292) I'm back. Commenting out these two lines in `particle.c`'s `do_guides(...)` function (L2107 and L2108) fixes it. <https://github.com/sobotka/blender/blob/master/source/blender/blenkernel/intern/particle.c#L2107>. Also fixes it for particles, though may need normalization as valid range seems to lie between 0.001 and 0.005 (scales pleasingly for hair though, as the attached video shows) EDIT: I'll be more precise--I didn't merely comment out the lines, I replaced ``` madd_v3_v3fl(effect, vec_to_point, data->strength); ``` madd_v3_v3fl(veffect, guidedir, data->strength);``` ``` with ``` madd_v3_v3fl(effect, vec_to_point, 1); ``` madd_v3_v3fl(veffect, guidedir, 1);``` ``` Seems to have been allowing weight to impact global position, which explains the heading-to-origin. broken: [BROKEN.mov](https://archive.blender.org/developer/F8156457/BROKEN.mov) fixed: [FIXED-.mov](https://archive.blender.org/developer/F8156461/FIXED-.mov) Very happy as this means I can continue animating.
Member

Added subscribers: @JacquesLucke, @sebbas, @zazizizou, @lichtwerk

Added subscribers: @JacquesLucke, @sebbas, @zazizizou, @lichtwerk
Member

Can only say that 2.79 behaved the same [that doesnt mean this is not looking a whole lot like a bug...]
I personally only ever used it with the Weights option [curve can then be tweaked to have less influence at the emitter], but...

Guess we have to wait for someone to understand what is supposed to happen here...

Can only say that 2.79 behaved the same [that doesnt mean this is not looking a whole lot like a bug...] I personally only ever used it with the `Weights` option [curve can then be tweaked to have less influence at the emitter], but... Guess we have to wait for someone to understand what is supposed to happen here...

Added subscriber: @iss

Added subscriber: @iss

Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'

Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'

I will confirm this, since this definitely looks like a bug.

I don't think it makes sense to have this unconfirmed possibly indefinitely.

I will confirm this, since this definitely looks like a bug. I don't think it makes sense to have this unconfirmed possibly indefinitely.
Philipp Oeser removed the
Interest
Nodes & Physics
label 2023-02-10 08:47:10 +01:00
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
3 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#71745
No description provided.