Hair density maps increases hair children amount on reopening scene file (or rendering which will get slow) #89598

Open
opened 2021-07-02 11:24:54 +02:00 by Daniel Westlund · 23 comments

System Information
Operating system: window 10
Graphics card: 2080 Ti

blender 2.93.00

Worked: dont know when it worked

Hair density changes on reopening scene file

  • Open the attached file and first turn of and turn on and of interpolated children
  • see how the density changes. The number of children increases.
  • save the file and reopen it to see that its back to a lower number of children.
  • affects both viewport and offline render

Test File
Hair_Density_bug_01.blend

**System Information** Operating system: window 10 Graphics card: 2080 Ti **blender 2.93.00** Worked: dont know when it worked Hair density changes on reopening scene file - Open the attached file and first turn of and turn on and of interpolated children - see how the density changes. The number of children increases. - save the file and reopen it to see that its back to a lower number of children. - affects both viewport and offline render Test File [Hair_Density_bug_01.blend](https://archive.blender.org/developer/F10209562/Hair_Density_bug_01.blend)

Added subscriber: @Dawe69

Added subscriber: @Dawe69

#89596 was marked as duplicate of this issue

#89596 was marked as duplicate of this issue
Contributor

Added subscriber: @Raimund58

Added subscriber: @Raimund58
Contributor

This report does not contain all the requested information, which is required for us to investigate the issue.

Please submit a new report and carefully follow the instructions. Be sure to provide system information, Blender version, the last Blender version which worked, and a .blend file with exact steps to reproduce the problem.

A guideline for making a good bug report can be found at https://wiki.blender.org/wiki/Process/Bug_Reports

This report does not contain all the requested information, which is required for us to investigate the issue. Please submit a new report and carefully follow the instructions. Be sure to provide system information, Blender version, the last Blender version which worked, and a .blend file with exact steps to reproduce the problem. A guideline for making a good bug report can be found at https://wiki.blender.org/wiki/Process/Bug_Reports

Just open the scene file and turn off and then on the children of the hair. you will see that when you turn it on again, the number of children will increase.
If you save and reopen the same file its back to a lower number of children again.
This is also persistent in render etc.

best/
Daniel

Just open the scene file and turn off and then on the children of the hair. you will see that when you turn it on again, the number of children will increase. If you save and reopen the same file its back to a lower number of children again. This is also persistent in render etc. best/ Daniel
Contributor

You did not include a blend file...

You did not include a blend file...
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
[Hair_Density_bug_01.blend](https://archive.blender.org/developer/F10209562/Hair_Density_bug_01.blend)

Sorry!

Sorry!
Member

Changed status from 'Needs User Info' to: 'Needs Triage'

Changed status from 'Needs User Info' to: 'Needs Triage'
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

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

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

Can confirm, will have a quick look.

Can confirm, will have a quick look.

I have a hunch that it is connected to my other bug report here: https://developer.blender.org/T89596 but I'm probably wrong...

I have a hunch that it is connected to my other bug report here: https://developer.blender.org/T89596 but I'm probably wrong...
Philipp Oeser self-assigned this 2021-07-07 13:19:00 +02:00
Member

Got a fix for this, just double-checking the reasoning behind the change...

Got a fix for this, just double-checking the reasoning behind the change...
Member

Hrmf, I should have not looked into this [turned into a timesink], to properly reason about particle code is... not easy.
Will post my findings tomorrow

Hrmf, I should have not looked into this [turned into a timesink], to properly reason about particle code is... not easy. Will post my findings tomorrow
Member

Added subscriber: @iss

Added subscriber: @iss
Philipp Oeser removed their assignment 2021-07-09 14:08:43 +02:00
Member

Added subscribers: @JacquesLucke, @Sergey

Added subscribers: @JacquesLucke, @Sergey
Member

Here are my findings:

  • changing settings on the ParticleSettings trigger this bug (e.g. changing child_type), whereas changing settings on the ParticleSystem wont (e.g. changing child_seed)
    • note here that changes on the particle system (the "working" scenario) will tag the particle system ID_RECALC_PSYS_CHILD -- the "broken" state tries it too (but on the owner ID
  • what happens in the "broken" scenario is that we are "loosing" more and more (on each iteration) particles tagged PARS_UNEXIST
    • in system_step: initialize_all_particles will clear PARS_UNEXIST (under certain condition -- this needs a bit more investigation [from module devs probably])
    • in system_step: reset_particle > init_particle_texture will set PARS_UNEXIST correctly (but this is only done for a subset -- starting from )
    • this results in an ever increasing number of existing particles (psys->totpart vs psys->totunexist shifts [totpart increases, totunexist decreases]), which is wrong

related (I think) commits:

Doing this change (which will basically reset all particles) will show a working state (but the "fix" is probably the wrong thing to do):
P2243: T89598_snippet



diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 06d3daaf4d6..c82c65776d4 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -4513,7 +4513,7 @@ static void system_step(ParticleSimulationData *sim, float cfra, const bool use_
     distribute_particles(sim, part->from);
     initialize_all_particles(sim);
     /* reset only just created particles (on startframe all particles are recreated) */
-    reset_all_particles(sim, 0.0, cfra, oldtotpart);
+    reset_all_particles(sim, 0.0, cfra, 0);
     free_unexisting_particles(sim);
 
     if (psys->fluid_springs) {

Other suspicion is that RNA updates (rna_Particle_redo_child / particle_recalc) tagging goes wrong in terms of ParticleSystem vs. ParticleSettings (see very first finding).

Will step down, maybe this rings a bell immediately for @Sergey or @JacquesLucke

Here are my findings: - changing settings on the `ParticleSettings` trigger this bug (e.g. changing `child_type`), whereas changing settings on the `ParticleSystem` wont (e.g. changing `child_seed`) - note here that changes on the particle system (the "working" scenario) will tag the particle system `ID_RECALC_PSYS_CHILD` -- the "broken" state tries it too (but on the owner ID - what happens in the "broken" scenario is that we are "loosing" more and more (on each iteration) particles tagged `PARS_UNEXIST` - in `system_step`: `initialize_all_particles` will clear `PARS_UNEXIST` (under certain condition -- this needs a bit more investigation [from module devs probably]) - in `system_step`: `reset_particle` > `init_particle_texture` will set `PARS_UNEXIST` correctly (but this is only done for a subset -- starting from ) - this results in an ever increasing number of existing particles (`psys->totpart` vs `psys->totunexist` shifts [totpart increases, totunexist decreases]), which is wrong related (I think) commits: - 9b64ebc605 - dced56f - 78c491e62a - ee762ce93f Doing this change (which will basically reset **all** particles) will show a working state (but the "fix" is probably the wrong thing to do): [P2243: T89598_snippet](https://archive.blender.org/developer/P2243.txt) ``` diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 06d3daaf4d6..c82c65776d4 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -4513,7 +4513,7 @@ static void system_step(ParticleSimulationData *sim, float cfra, const bool use_ distribute_particles(sim, part->from); initialize_all_particles(sim); /* reset only just created particles (on startframe all particles are recreated) */ - reset_all_particles(sim, 0.0, cfra, oldtotpart); + reset_all_particles(sim, 0.0, cfra, 0); free_unexisting_particles(sim); if (psys->fluid_springs) { ``` Other suspicion is that RNA updates (`rna_Particle_redo_child` / `particle_recalc`) tagging goes wrong in terms of ParticleSystem vs. ParticleSettings (see very first finding). Will step down, maybe this rings a bell immediately for @Sergey or @JacquesLucke
Philipp Oeser changed title from Hair density changes on reopening scene file to Hair density maps increases hair children amount on reopening scene file (or rendering which will get slow) 2021-07-23 13:39:02 +02:00

Doesn't really ring any bells.
The particle system is only in the maintenance mode, meaning only newly introduced issues can be fixed.

Doesn't really ring any bells. The particle system is only in the maintenance mode, meaning only newly introduced issues can be fixed.

Added subscriber: @dfelinto

Added subscriber: @dfelinto

Thanks for the report. Marking this as known issue since it depends on the old particle settings which is end of life .

Thanks for the report. Marking this as known issue since it depends on the [old particle settings which is end of life ](https://developer.blender.org/tag/nodes_physics/).
Philipp Oeser removed the
Interest
Nodes & Physics
label 2023-02-10 08:44:45 +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
7 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#89598
No description provided.