Multires modifier data (CD_MDISPS) can remain on a (once shared) mesh, bloats filesize, adding a new multires modifer will already have its levels then #88144

Open
opened 2021-05-09 13:33:03 +02:00 by Aleksandr · 22 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce GTX 960/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 457.09

Blender Version
Broken: version: 2.93.0 Beta, branch: master, commit date: 2021-05-08 06:10, hash: a9eea6d9dc

Short description of error
When adding multires and press subdivide, a single press adds 3 levels at once and gives the result in the picture
bug.png
The left part is obtained after applying the mirror modifier

Exact steps for others to reproduce the error
Add multiresolution and press subdivide bug.blend
If the modifier is removed and re-added, the bug disappears

Found a way to reproduce this:

    • add Multires to the Default Cube object, subdivide twice
    • add a Monkey
    • change the mesh of the Monkey to the Cube mesh under Object Data Properties
    • (you can delete the default cube object now if you like)
    • add Multires modifier to the Monkey object
    • it already has 2 multires levels (without subdividing even once), if you now subdivide, it will jump right to level 3

    • saving the file at step - [x] will bloat the filesize (even though there is no multires modifier anymore :/)

note: this behavior does not occur if one removes the Multires modifier from the Default Cube object prior to deletion in step 4

So opposed to any other modifier (afaict), Multires seems to store info in mesh that is kept around.
It does get removed from the mesh when the modifier gets removed, but it does not get removed from the (possibly shared) mesh when the object gets deleted.

Upon further inspection, these are stored in a CD_MDISPS custom data layer on the mesh.
Now when ob->data is changed (step - [x]), or when a new modifer is added, the levels of the modifer will be made matching (see BKE_mesh_assign_object & BKE_modifiers_test_object & multiresModifier_set_levels_from_disps)
This can also be observed when for example a second multires modifier is added on top of an existing mutires modifier (levels will also be made matching).

Now I assume that in the end this has its reasons (and it might very well turn out to not be a bug), but will leave up to module devs to decide.
(I think it would be reasonable to remove CD_MDISPS initially when adding a new multires modifier?)

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: GeForce GTX 960/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 457.09 **Blender Version** Broken: version: 2.93.0 Beta, branch: master, commit date: 2021-05-08 06:10, hash: `a9eea6d9dc` **Short description of error** When adding multires and press subdivide, a single press adds 3 levels at once and gives the result in the picture ![bug.png](https://archive.blender.org/developer/F10068775/bug.png) The left part is obtained after applying the mirror modifier **Exact steps for others to reproduce the error** Add multiresolution and press subdivide [bug.blend](https://archive.blender.org/developer/F10068780/bug.blend) If the modifier is removed and re-added, the bug disappears Found a way to reproduce this: - - [x] add Multires to the Default Cube object, subdivide twice - - [x] add a Monkey - - [x] change the mesh of the Monkey to the Cube mesh under `Object Data Properties` - - [x] (you can delete the default cube object now if you like) - - [x] add Multires modifier to the Monkey object - > it already has 2 multires levels (without subdividing even once), if you now subdivide, it will jump right to level 3 - > saving the file at step - [x] will bloat the filesize (even though there is no multires modifier anymore :/) note: this behavior does not occur if one removes the Multires modifier from the Default Cube object prior to deletion in step 4 So opposed to any other modifier (afaict), Multires seems to store info in mesh that is kept around. It does get removed from the mesh when the modifier gets removed, but it does not get removed from the (possibly shared) mesh when the object gets deleted. Upon further inspection, these are stored in a `CD_MDISPS` custom data layer on the mesh. Now when `ob->data` is changed (step - [x]), or when a new modifer is added, the levels of the modifer will be made matching (see `BKE_mesh_assign_object` & `BKE_modifiers_test_object` & `multiresModifier_set_levels_from_disps`) This can also be observed when for example a second multires modifier is added on top of an existing mutires modifier (levels will also be made matching). Now I assume that in the end this has its reasons (and it might very well turn out to not be a bug), but will leave up to module devs to decide. (I think it would be reasonable to remove CD_MDISPS initially when adding a **new** multires modifier?)
Author

Added subscriber: @cfnjrey

Added subscriber: @cfnjrey

#98249 was marked as duplicate of this issue

#98249 was marked as duplicate of this issue

Added subscriber: @badbunny_uk

Added subscriber: @badbunny_uk

Not sure if this is what I should do here (tell me if this isn't helpful and I won't do it again!) but I confirm this issue in 2.92.

Also two other observations:

  • If you add a second object (eg a cube) and then apply a multires modifier to the wings, same result as in bug report.
  • if you add a second object (eg a cube) and then apply the multires modifier to the cube that works ok. then if you apply the multires to the wings that one also works ok too.
Not sure if this is what I should do here (tell me if this isn't helpful and I won't do it again!) but I confirm this issue in 2.92. Also two other observations: - If you add a second object (eg a cube) and then apply a multires modifier to the wings, same result as in bug report. - if you add a second object (eg a cube) and then apply the multires modifier to the cube that works ok. then if you apply the multires to the wings that one also works ok too.
Member

Added subscriber: @filedescriptor

Added subscriber: @filedescriptor
Member

@badbunny_uk Confirming an issue is always a good thing (if it has not been confirmed yet), so thank you.

@badbunny_uk Confirming an issue is always a good thing (if it has not been confirmed yet), so thank you.
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

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

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

Can confirm with the attached file but unable to reproduce from scratch.

@cfnjrey , did you apply some extra modifiers before adding Multiresolution in the list?

Can confirm with the attached file but unable to reproduce from scratch. @cfnjrey , did you apply some extra modifiers before adding Multiresolution in the list?
Author

Mirror only
The model originally also had solidify and maybe bevel, but these were not applied

Mirror only The model originally also had solidify and maybe bevel, but these were not applied
Member

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

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

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

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

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
Member

Found a way to reproduce this:

    • add Multires to the Default Cube object, subdivide twice
    • add a Monkey
    • change the mesh of the Monkey to the Cube mesh under Object Data Properties
    • (you can delete the default cube object now if you like)
    • add Multires modifier to the Monkey object
    • it already has 2 multires levels (without subdividing even once), if you now subdivide, it will jump right to level 3

note: this behavior does not occur if one removes the Multires modifier from the Default Cube object prior to deletion in step 4

So opposed to any other modifier (afaict), Multires seems to store info in mesh that is kept around.
It does get removed from the mesh when the modifier gets removed, but it does not get removed from the (possibly shared) mesh when the object gets deleted.

Upon further inspection, these are stored in a CD_MDISPS custom data layer on the mesh.
Now when ob->data is changed (step - [x]), or when a new modifer is added, the levels of the modifer will be made matching (see BKE_mesh_assign_object & BKE_modifiers_test_object & multiresModifier_set_levels_from_disps)
This can also be observed when for example a second multires modifier is added on top of an existing mutires modifier (levels will also be made matching).

Now I assume that in the end this has its reasons (and it might very well turn out to not be a bug), but will leave up to module devs to decide.
(I think it would be reasonable to remove CD_MDISPS initially when adding a new multires modifier?)

Found a way to reproduce this: - - [x] add Multires to the Default Cube object, subdivide twice - - [x] add a Monkey - - [x] change the mesh of the Monkey to the Cube mesh under `Object Data Properties` - - [x] (you can delete the default cube object now if you like) - - [x] add Multires modifier to the Monkey object - > it already has 2 multires levels (without subdividing even once), if you now subdivide, it will jump right to level 3 note: this behavior does not occur if one removes the Multires modifier from the Default Cube object prior to deletion in step 4 So opposed to any other modifier (afaict), Multires seems to store info in mesh that is kept around. It does get removed from the mesh when the modifier gets removed, but it does not get removed from the (possibly shared) mesh when the object gets deleted. Upon further inspection, these are stored in a `CD_MDISPS` custom data layer on the mesh. Now when `ob->data` is changed (step - [x]), or when a new modifer is added, the levels of the modifer will be made matching (see `BKE_mesh_assign_object` & `BKE_modifiers_test_object` & `multiresModifier_set_levels_from_disps`) This can also be observed when for example a second multires modifier is added on top of an existing mutires modifier (levels will also be made matching). Now I assume that in the end this has its reasons (and it might very well turn out to not be a bug), but will leave up to module devs to decide. (I think it would be reasonable to remove CD_MDISPS initially when adding a **new** multires modifier?)
Philipp Oeser changed title from multiresolution odd work to Multires modifier data (CD_MDISPS) can remain on a (once shared) mesh, adding a new multires modifer will already have its levels then 2021-09-24 17:34:58 +02:00
Member

Added subscriber: @Sergey

Added subscriber: @Sergey
Member

@Sergey probably knows more.

@Sergey probably knows more.

This is a known shortcoming of the way how the CD_MDISPS is stored and used: stored on object-data level and used from object-level. Removing CD_MDISPS when modifier is added could solve some issues but will introduce others.

This is a known shortcoming of the way how the CD_MDISPS is stored and used: stored on object-data level and used from object-level. Removing CD_MDISPS when modifier is added could solve some issues but will introduce others.
Member

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

Changed status from 'Needs Developer To Reproduce' to: 'Archived'
Member

This sounds like this should be closed then.

If removing CD_MDISPS when a new modifier is added will likely introduce other issues, I think this is just a shortcoming we have to live with.
@Sergey: correct me if I am wrong and there are other ways to circumvent this issue.

This sounds like this should be closed then. If removing CD_MDISPS when a new modifier is added will likely introduce other issues, I think this is just a shortcoming we have to live with. @Sergey: correct me if I am wrong and there are other ways to circumvent this issue.
Member

Changed status from 'Archived' to: 'Confirmed'

Changed status from 'Archived' to: 'Confirmed'
Member

This has been reported again, see #98249 (Bloated mesh data example (multires CD_MDISPS hanging around without a multires modifier)) and actually I think we should reopen this (even if only as a Known Issue)

This has been reported again, see #98249 (Bloated mesh data example (multires CD_MDISPS hanging around without a multires modifier)) and actually I think we should reopen this (even if only as a Known Issue)
Philipp Oeser changed title from Multires modifier data (CD_MDISPS) can remain on a (once shared) mesh, adding a new multires modifer will already have its levels then to Multires modifier data (CD_MDISPS) can remain on a (once shared) mesh, bloats filesize, adding a new multires modifer will already have its levels then 2022-05-19 12:59:49 +02:00
Member

Added subscriber: @reed2000

Added subscriber: @reed2000
Philipp Oeser removed the
Interest
Modeling
label 2023-02-09 15:28:26 +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#88144
No description provided.