Force field + hair dynamics not working in (linked) instanced collections #60945

Open
opened 2019-01-28 11:30:12 +01:00 by Andrew Williams · 14 comments

System Information
Operating system: Windows 10 64 bit
Graphics card: GeForce GTX 1070

Blender Version
Broken: 2.80 3d8cbb534f (2019-01-25)
Worked: 2.79b release

A surface force field does not affect hair dynamics when it is part of a collection that is linked into another file.

Steps to reproduce:

  1. Create a hair particle system, with hairs along x axis.
  2. Enable hair dynamics on hair
  3. Create a surface force field underneath it.
  4. Press play button to verify hair is affected by force field.
  5. Save file
  6. Link the collection from the first file into another file. (I have 'Instance Collections' turned on)
  7. Press play. hair will fall and not be affected by the force field.

Example blend file attached.
hair_force_test.blend

**System Information** Operating system: Windows 10 64 bit Graphics card: GeForce GTX 1070 **Blender Version** Broken: 2.80 3d8cbb534f82 (2019-01-25) Worked: 2.79b release A surface force field does not affect hair dynamics when it is part of a collection that is linked into another file. Steps to reproduce: 1. Create a hair particle system, with hairs along x axis. 2. Enable hair dynamics on hair 3. Create a surface force field underneath it. 4. Press play button to verify hair is affected by force field. 5. Save file 6. Link the collection from the first file into another file. (I have 'Instance Collections' turned on) 7. Press play. hair will fall and not be affected by the force field. Example blend file attached. [hair_force_test.blend](https://archive.blender.org/developer/F6431182/hair_force_test.blend)

Added subscriber: @sobakasu

Added subscriber: @sobakasu
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Cannot reproduce actually [in a build from today].

I have linked the scene [that brings in everything] and hair is flying up...
Are you linking the scene? Or just the object?
Maybe you can show us a video of this failing?

Marking as incomplete until we have more information...

Cannot reproduce actually [in a build from today]. I have linked the scene [that brings in everything] and hair is flying up... Are you linking the scene? Or just the object? Maybe you can show us a video of this failing? Marking as incomplete until we have more information...
Member

Or: are you linking the collection? (with Instance Collection option)
[see related comment in #60963]

Or: are you linking the collection? (with `Instance Collection` option) [see related comment in #60963]
Member

Added subscriber: @mont29

Added subscriber: @mont29
Member

Can confirm now.

Sidenote [not sure this is related]: When linking the collection a debug build will actually assert here:

BLI_assert failed: /blender/blenlib/intern/BLI_ghash.c:466, ghash_insert_ex(), at '(gh->flag & GHASH_FLAG_ALLOW_DUPES) || (BLI_ghash_haskey(gh, key) == 0)'

1  raise                                                     0x7ffff466953f 
2  abort                                                     0x7ffff4653895 
3  ghash_insert_ex                   BLI_ghash.c       466   0x2ec239e      
4  ghash_insert                      BLI_ghash.c       516   0x2ec239e      
5  BLI_ghash_insert                  BLI_ghash.c       761   0x2ec239e      
6  read_file_bhead_idname_map_create readfile.c        616   0x28b9345      
7  library_link_begin                readfile.c        10653 0x28d7036      
8  BLO_library_link_begin            readfile.c        10670 0x28d7077      
9  wm_link_do                        wm_files_link.c   241   0x1cb5cef      
10 wm_link_append_exec               wm_files_link.c   452   0x1cb6778      
11 wm_handler_fileselect_do          wm_event_system.c 2179  0x1c7ef90      
12 wm_handler_fileselect_call        wm_event_system.c 2266  0x1c7f31a      
13 wm_handlers_do_intern             wm_event_system.c 2391  0x1c7f997      
14 wm_handlers_do                    wm_event_system.c 2618  0x1c80268      
15 wm_event_do_handlers              wm_event_system.c 3008  0x1c81541      
16 WM_main                           wm.c              425   0x1c768e6      
17 main                              creator.c         520   0x1c71565 

regarding this assert: maybe @mont29 can shed some light on this?

Can confirm now. Sidenote [not sure this is related]: When linking the collection a debug build will actually assert here: `BLI_assert failed: /blender/blenlib/intern/BLI_ghash.c:466, ghash_insert_ex(), at '(gh->flag & GHASH_FLAG_ALLOW_DUPES) || (BLI_ghash_haskey(gh, key) == 0)'` ``` 1 raise 0x7ffff466953f 2 abort 0x7ffff4653895 3 ghash_insert_ex BLI_ghash.c 466 0x2ec239e 4 ghash_insert BLI_ghash.c 516 0x2ec239e 5 BLI_ghash_insert BLI_ghash.c 761 0x2ec239e 6 read_file_bhead_idname_map_create readfile.c 616 0x28b9345 7 library_link_begin readfile.c 10653 0x28d7036 8 BLO_library_link_begin readfile.c 10670 0x28d7077 9 wm_link_do wm_files_link.c 241 0x1cb5cef 10 wm_link_append_exec wm_files_link.c 452 0x1cb6778 11 wm_handler_fileselect_do wm_event_system.c 2179 0x1c7ef90 12 wm_handler_fileselect_call wm_event_system.c 2266 0x1c7f31a 13 wm_handlers_do_intern wm_event_system.c 2391 0x1c7f997 14 wm_handlers_do wm_event_system.c 2618 0x1c80268 15 wm_event_do_handlers wm_event_system.c 3008 0x1c81541 16 WM_main wm.c 425 0x1c768e6 17 main creator.c 520 0x1c71565 ``` regarding this assert: maybe @mont29 can shed some light on this?

Added subscriber: @ideasman42

Added subscriber: @ideasman42

@lichtwerk that assert should for sure never be triggered, but in that case, it is caused by issue with brushes being saved in double or more (from userpref, iirc, @ideasman42 knows the details and fixed the issue some days ago). So in that specific case, it is harmless, just means that the library reading code is only aware of one of the two brushes IDs sharing the same name… Re-saving the library with a recent build will fix that problem.

@lichtwerk that assert should for sure never be triggered, but in that case, it is caused by issue with brushes being saved in double or more (from userpref, iirc, @ideasman42 knows the details and fixed the issue some days ago). So in that specific case, it is harmless, just means that the library reading code is only aware of one of the two brushes IDs sharing the same name… Re-saving the library with a recent build will fix that problem.
Member

@mont29: thx for explanation

@mont29: thx for explanation
Philipp Oeser changed title from Force field + hair dynamics not working with linked library to Force field + hair dynamics not working in (linked) instanced collections 2019-01-30 11:22:01 +01:00

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren

@sobakasu Is this the same problem as #60963?

I can confirm that this is still an issue in current master (9ae3f3ce929044e07ffaa46305c2d91a774d9214)

@sobakasu Is this the same problem as #60963? I can confirm that this is still an issue in current master (9ae3f3ce929044e07ffaa46305c2d91a774d9214)

Added subscribers: @Sergey, @brecht

Added subscribers: @Sergey, @brecht

This is actually more a depsgraph/physics evaluation issue than a data/IO one.

Root of the problem is that objects that only exist as instances from [an empty-instanced collection, particle-instanced objects, …], i.e. which are not actually instanced by themselves in a collection of the current ViewLayer, are completely ignored by the code gathering a list of effectors during depsgraph building (see BKE_effector_relations_create).

Thing is, am not quiet sure how we could gather those instances properly here, and effector storage currently also expects proper objects afaict, not DupliObject.

Summoning @Sergey or @brecht here for more educated advices, but imho this should be considered a known limitation for now?

In the mean while, if you specify a given collection as source of effectors for your particle hair system, it should work fine in that specific case.

This is actually more a depsgraph/physics evaluation issue than a data/IO one. Root of the problem is that objects that only exist as instances from [an empty-instanced collection, particle-instanced objects, …], i.e. which are not actually instanced by themselves in a collection of the current ViewLayer, are completely ignored by the code gathering a list of effectors during depsgraph building (see `BKE_effector_relations_create`). Thing is, am not quiet sure how we could gather those instances properly here, and effector storage currently also expects proper objects afaict, not `DupliObject`. Summoning @Sergey or @brecht here for more educated advices, but imho this should be considered a known limitation for now? In the mean while, if you specify a given collection as source of effectors for your particle hair system, it should work fine in that specific case.

I would consider it a know limitation for now. It would be good to support instancing effectors like this, but the implementation is just not there.

I would consider it a know limitation for now. It would be good to support instancing effectors like this, but the implementation is just not there.
Philipp Oeser removed the
Interest
Nodes & Physics
label 2023-02-10 08:47:59 +01:00
Philipp Oeser added the
Interest
Core
label 2023-02-10 11:09:58 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
5 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#60945
No description provided.