Issues with particle systems and SubSurf modifier #40523

Closed
opened 2014-06-06 16:30:44 +02:00 by Daniel F. R. Gordillo · 16 comments

System Information
Linux Mint Debian Edition, AMD Phenom II X6 1090T, Nvidia 460 GTX, 8Gb RAM.

Blender Version
Broken: 2.71 testbuild 2
Worked: (optional)

Short description of error
Weight edit & mix modifiers give strange results, affecting other particle systems than the specified in the modifier settings.

Exact steps for others to reproduce the error
There's 2 files with the same object, particle systems and materials, and 3 vertex groups: hair.normal, hair and beard. The only thing that changes, is the Weight Modifier (MIX - EDIT)

  1. Open mods_hair-weight-edit.blend, go to Modifiers tab and disable the Weight edit modifier. We have Suzanne as intended to look: Big hair and big beard. Enabling the modifier edits the hair vertex group, but affects the beard vertex group/particle system as well. Also, THE GLOBAL INFLUENCE SETTING DOESN'T SEEM TO DO ANYTHING in this modifier.

  2. Open mods_hair-weight-mix.blend. The same occurs, the modifier affects other vertex groups/particle systems aside from the ones defined in the settings (beard in this case) Global Influence seems to be working fine in this modifier, but only with the defined groups. The beard stays deformed.

mods_hair-weight-edit.blend

mods_hair-weight-mix.blend

**System Information** Linux Mint Debian Edition, AMD Phenom II X6 1090T, Nvidia 460 GTX, 8Gb RAM. **Blender Version** Broken: 2.71 testbuild 2 Worked: (optional) **Short description of error** Weight edit & mix modifiers give strange results, affecting other particle systems than the specified in the modifier settings. **Exact steps for others to reproduce the error** There's 2 files with the same object, particle systems and materials, and 3 vertex groups: hair.normal, hair and beard. The only thing that changes, is the Weight Modifier (MIX - EDIT) 1. Open mods_hair-weight-edit.blend, go to Modifiers tab and disable the Weight edit modifier. We have Suzanne as intended to look: Big hair and big beard. Enabling the modifier edits the hair vertex group, but affects the beard vertex group/particle system as well. Also, THE GLOBAL INFLUENCE SETTING DOESN'T SEEM TO DO ANYTHING in this modifier. 2. Open mods_hair-weight-mix.blend. The same occurs, the modifier affects other vertex groups/particle systems aside from the ones defined in the settings (beard in this case) Global Influence seems to be working fine in this modifier, but only with the defined groups. The beard stays deformed. [mods_hair-weight-edit.blend](https://archive.blender.org/developer/F92862/mods_hair-weight-edit.blend) [mods_hair-weight-mix.blend](https://archive.blender.org/developer/F92863/mods_hair-weight-mix.blend)

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @DGordillo

Added subscriber: @DGordillo

Added subscriber: @mont29

Added subscriber: @mont29

I don’t think weight modifiers are the issue here (at least, enabling 'show weight' options seems to give expected results). However, when I disable the subsurf modifier, everything seems OK, and when I re-enable it I even get worse results (unless I switch emission of the particles from Volume to Vertex…). All this seems rather mysterious to me.

Btw, with your Edit Weight modifier, you are only using the “remove vertices from group” feature, Global Influence can have no effect here, it only works on weights editing itself, not on add/remove!

I don’t think weight modifiers are the issue here (at least, enabling 'show weight' options seems to give expected results). However, when I disable the subsurf modifier, everything seems OK, and when I re-enable it I even get worse results (unless I switch emission of the particles from Volume to Vertex…). All this seems rather mysterious to me. Btw, with your Edit Weight modifier, you are only using the “remove vertices from group” feature, Global Influence can have no effect here, it only works on weights editing itself, not on add/remove!
Bastien Montagne changed title from Weight mix and edit modifiers affect other particle systems to Issues with particle systems and SubSurf modifier 2014-06-09 15:57:53 +02:00

Added subscriber: @LukasTonne

Added subscriber: @LukasTonne
Member

Added subscriber: @totoro-4

Added subscriber: @totoro-4
Member

mods_hair-weight-edit.blend: I've removed all the beards and hairs and just checked the 'beard' vertex group in the weight paint mode. If the Subsurf modifier is enabled, the VertexWeightEdit modifier has influence on the 'beard' vertex group too, but only on the new subdivision vertices from the Subsurf.

But if I switch off or apply the Subsurf, everything is normal. I think it could be something with the origindex again...

mods_hair-weight-edit.blend: I've removed all the beards and hairs and just checked the 'beard' vertex group in the weight paint mode. If the Subsurf modifier is enabled, the VertexWeightEdit modifier has influence on the 'beard' vertex group too, but only on the new subdivision vertices from the Subsurf. But if I switch off or apply the Subsurf, everything is normal. I think it could be something with the origindex again...
Member

Open this file. It's the default cube with a subsurf modifier and a vertex group. In weight paint mode, you can see the additional vertices has interpolated color only (purple between red and blue). Maybe it's okay, you can see only the colors for the "real" vertices from the mesh. It's good for weight painting. But if you add a modifier after the subsurf (mirror for example), these vertices become "real" and gets the right color (ie. green) just like when you apply the subsurf modifier.

Maybe this is normal and has nothing with the effect on particles. But it is an evidence that the resulting group weight data structure can be both "interpolated" (origindex...) or "real" after the subsurf modifier. Maybe the particle system just cannot handle one of these correctly.

vertexgroups.blend

Open this file. It's the default cube with a subsurf modifier and a vertex group. In weight paint mode, you can see the additional vertices has interpolated color only (purple between red and blue). Maybe it's okay, you can see only the colors for the "real" vertices from the mesh. It's good for weight painting. But if you add a modifier after the subsurf (mirror for example), these vertices become "real" and gets the right color (ie. green) just like when you apply the subsurf modifier. Maybe this is normal and has nothing with the effect on particles. But it is an evidence that the resulting group weight data structure can be both "interpolated" (origindex...) or "real" after the subsurf modifier. Maybe the particle system just cannot handle one of these correctly. [vertexgroups.blend](https://archive.blender.org/developer/F93766/vertexgroups.blend)
Member

It seems the applied ("real") version is the wrong one... It's strange. Load this file, press the apply button on the subsurf modifier and try to explain what you see...
vertexgroup2.blend

It seems the applied ("real") version is the wrong one... It's strange. Load this file, press the apply button on the subsurf modifier and try to explain what you see... [vertexgroup2.blend](https://archive.blender.org/developer/F93770/vertexgroup2.blend)
Member

So, now I think the particle system needs a PSYS_RECALC_RESET flag to trigger a recalculation here. The program detects some changes in the deformVerts() function of modifiers/intern/MOD_particlesystem.c. But it sets the flag only if the number of vertices/edges/faces has changed (for example if the subdivision level changed). It seems there are cases when the number of mesh elements are not changed, only their structure (order of elements, referenced customdata?). An example if you apply the subsurf modifier.

When I forced the program to set always the PSYS_RECALC_RESET in deformVerts(), the bug disappeared IMHO. But this is a brute force solution and causes a lot of redundant recalculations in the particle system - so we need something smarter...

EDIT: no, actually the original bug (weight edit modifying the wrong vertex group) is still there.

So, now I think the particle system needs a PSYS_RECALC_RESET flag to trigger a recalculation here. The program detects some changes in the deformVerts() function of modifiers/intern/MOD_particlesystem.c. But it sets the flag only if the number of vertices/edges/faces has changed (for example if the subdivision level changed). It seems there are cases when the number of mesh elements are not changed, only their structure (order of elements, referenced customdata?). An example if you apply the subsurf modifier. When I forced the program to set always the PSYS_RECALC_RESET in deformVerts(), the bug disappeared IMHO. But this is a brute force solution and causes a lot of redundant recalculations in the particle system - so we need something smarter... EDIT: no, actually the original bug (weight edit modifying the wrong vertex group) is still there.
Member

I've found something, maybe related. I've checked the psys_cache_vgroup() calls in blenkernel/particle.c and blenkernel/particle_system.c . It seems all vertex groups caches are filled in particle.c together, except the PSYS_VG_DENSITY (it's in particle_system.c). When I played with the settings of the subsurf and the weight modifier, I've noticed that sometimes only the code part in particle.c called after a change so perhaps the PSYS_VG_DENSITY related things are not refreshed (but of course, perhaps nothing else refreshed, only the caches). By the way, since you already refreshing these caches, a comparison between the old and the new contents could trigger a deeper recalculation here.

I've found something, maybe related. I've checked the psys_cache_vgroup() calls in blenkernel/particle.c and blenkernel/particle_system.c . It seems all vertex groups caches are filled in particle.c together, except the PSYS_VG_DENSITY (it's in particle_system.c). When I played with the settings of the subsurf and the weight modifier, I've noticed that sometimes only the code part in particle.c called after a change so perhaps the PSYS_VG_DENSITY related things are not refreshed (but of course, perhaps nothing else refreshed, only the caches). By the way, since you already refreshing these caches, a comparison between the old and the new contents could trigger a deeper recalculation here.
Lukas Tönne was assigned by Sergey Sharybin 2014-08-12 10:40:00 +02:00

Added subscriber: @Sergey

Added subscriber: @Sergey

Lukas, mind checking whether it's a regression and if it's not triaging as a todo?

Lukas, mind checking whether it's a regression and if it's not triaging as a todo?

@LukasTonne, really think issue is in particles, see this file: hair_subsurf_apply.blend (with no vgroup at all), apply subsurf modifier… Sounds like some updating issue?

Also, using particles on e.g. a solidify modifier is just impossible (do particles depend on orco? if yes, it could be a missing flag in solidify modifier specifying it does not supports orco? We used to have some modifiers not working after others…).

Back to org file in this report, now disabling and re-enabling subsurf (once weightvg modifier is enabled) seems to fixes everything… :/

@totoro-4 Your two files show a glitch in 'preview' behavior of modifiers - fixed in master (b22831e5ce).

@LukasTonne, really think issue is in particles, see this file: [hair_subsurf_apply.blend](https://archive.blender.org/developer/F103858/hair_subsurf_apply.blend) (with no vgroup at all), apply subsurf modifier… Sounds like some updating issue? Also, using particles on e.g. a solidify modifier is just impossible (do particles depend on orco? if yes, it could be a missing flag in solidify modifier specifying it does not supports orco? We used to have some modifiers not working after others…). Back to org file in this report, now disabling and re-enabling subsurf (once weightvg modifier is enabled) seems to fixes everything… :/ @totoro-4 Your two files show a glitch in 'preview' behavior of modifiers - fixed in master (b22831e5ce).

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

In fact, this issue is exactly the same as #37544 - just enable Use Modifier Stack in particles’ Emission panel, and it works as expected!

So archiving, for same reason as #37544:

A brand new hair system is in development (which means non-deadly issues in current one are very unlikely to be tackled), and we have a workaround for that issue…

In fact, this issue is exactly the same as #37544 - just enable `Use Modifier Stack` in particles’ `Emission` panel, and it works as expected! So archiving, for same reason as #37544: > A brand new hair system is in development (which means non-deadly issues in current one are very unlikely to be tackled), and we have a workaround for that issue…
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#40523
No description provided.