Multires modifier not reading data from external files #60124

Closed
opened 4 years ago by ChuckOcheret · 13 comments

System Information
Operating system: Both MacOS 10.14.2 (Mojave) and Windows 10
Graphics card: GTX 1080Ti, Radeon Pro 560X 4096 MB

Blender Version
Broken: 2.8 branch (daily build as of Jan 3, 2019)

Short description of error
When using "Save External..." with the multires modifier, a file is saved, but it is not loaded when the associated .blend file is reopened.

Exact steps for others to reproduce the error
1 - Create an object
2 - Create a multires modifier on the object
3 - Subdivide a few levels
4 - Sculpt some detail on the object
5 - Save the .blend file with a name (note the size of the .blend file)
6 - File->Revert to reload the .blend file and observe that the detail is still there
7 - In the modifier panel, click on the multires "Save External..." button and create the file
8 - Note that the .btx file has been created and is an appropriate size and the .blend file has shrunk by approximately this amount. e.g.

$ ls -latr
total 2976
drwxr-xr-x  4 chuck  staff     128 Jan  3 10:17 ..
-rw-r--r--  1 chuck  staff  733248 Jan  3 11:11 MultiResTest.blend1
-rw-r--r--  1 chuck  staff   83344 Jan  3 11:12 Cube.btx
-rw-r--r--  1 chuck  staff  655116 Jan  3 11:12 MultiResTest.blend
drwxr-xr-x  5 chuck  staff     160 Jan  3 11:12 .

9 - File->Revert to reload the .blend file and observe that the multires detail is not present

Additional notes
I tried to debug this a bit but I am still learning my way around the blender code base. What I did notice is that the original "Save External..." workflow ends up invoking CustomData_external_write() in customdata.c. This is also invoked when saving the .blend file as expected. Tracing through it does seem to be writing out real data.

However, I would have expected that loading the .blend file or doing File->Revert would have invoked CustomData_external_read(). The only time that appears to be called is when I click on "Pack External" in the multires modifier. If you use this carefully you can get your external data back. But if you File->Revert when the data is saved externally, and you save the .blend file again, it appears to overwrite the .btx file and the detail is lost forever.

**System Information** Operating system: Both MacOS 10.14.2 (Mojave) and Windows 10 Graphics card: GTX 1080Ti, Radeon Pro 560X 4096 MB **Blender Version** Broken: 2.8 branch (daily build as of Jan 3, 2019) **Short description of error** When using "Save External..." with the multires modifier, a file is saved, but it is not loaded when the associated .blend file is reopened. **Exact steps for others to reproduce the error** 1 - Create an object 2 - Create a multires modifier on the object 3 - Subdivide a few levels 4 - Sculpt some detail on the object 5 - Save the .blend file with a name (note the size of the .blend file) 6 - File->Revert to reload the .blend file and observe that the detail is still there 7 - In the modifier panel, click on the multires "Save External..." button and create the file 8 - Note that the .btx file has been created and is an appropriate size and the .blend file has shrunk by approximately this amount. e.g. ``` $ ls -latr total 2976 drwxr-xr-x 4 chuck staff 128 Jan 3 10:17 .. -rw-r--r-- 1 chuck staff 733248 Jan 3 11:11 MultiResTest.blend1 -rw-r--r-- 1 chuck staff 83344 Jan 3 11:12 Cube.btx -rw-r--r-- 1 chuck staff 655116 Jan 3 11:12 MultiResTest.blend drwxr-xr-x 5 chuck staff 160 Jan 3 11:12 . ``` 9 - File->Revert to reload the .blend file and observe that the multires detail is not present **Additional notes** I tried to debug this a bit but I am still learning my way around the blender code base. What I did notice is that the original "Save External..." workflow ends up invoking CustomData_external_write() in customdata.c. This is also invoked when saving the .blend file as expected. Tracing through it does seem to be writing out real data. However, I would have expected that loading the .blend file or doing File->Revert would have invoked CustomData_external_read(). The only time that appears to be called is when I click on "Pack External" in the multires modifier. If you use this carefully you can get your external data back. But if you File->Revert when the data is saved externally, and you save the .blend file again, it appears to overwrite the .btx file and the detail is lost forever.
Poster

Added subscriber: @ChuckOcheret

Added subscriber: @ChuckOcheret
mont29 commented 4 years ago
Owner

Added subscriber: @mont29

Added subscriber: @mont29
mont29 commented 4 years ago
Owner

Most likely again the CoW issue (working with eval modifier vs. orig one…).

But Please always attach a small and simple .blend file to help reproducing the issue, always saves us a tremendous of time.

Most likely again the CoW issue (working with eval modifier vs. orig one…). But Please always attach a **small and simple** .blend file to help reproducing the issue, always saves us a tremendous of time.
Poster

I am adding a sample .blend and the associated .btx file. From debugging it looks like the .btx file is referenced with a relative path so just putting them in the same directory and opening the .blend should demonstrate the problem. Remember, saving the .blend file might overwrite the .btx file. So copy Cube.btx to Cube.btx.sav or something so you can keep trying as you debug.

MultiResTest.blend

Cube.btx

I am adding a sample .blend and the associated .btx file. From debugging it looks like the .btx file is referenced with a relative path so just putting them in the same directory and opening the .blend should demonstrate the problem. Remember, saving the .blend file might overwrite the .btx file. So copy Cube.btx to Cube.btx.sav or something so you can keep trying as you debug. [MultiResTest.blend](https://archive.blender.org/developer/F6162578/MultiResTest.blend) [Cube.btx](https://archive.blender.org/developer/F6162577/Cube.btx)
capnm commented 4 years ago

Added subscriber: @capnm

Added subscriber: @capnm
Poster

Minor point... This came up as a result of SculptJanuary. Tons of people are trying out Blender 2.8 for this and a bunch of people have responded that they've experienced this bug. I published a tip last year about using external multires data so that we can keep all of the files on GitHub. If you pack all the data internally, then .blend files generally grow too large for vanilla GitHub. But with external multires you get a bunch of files that don't go beyond their file limits. So we're going back to 2.79 for detail sculpt passes/baking until this is fixed.

Minor point... This came up as a result of SculptJanuary. Tons of people are trying out Blender 2.8 for this and a bunch of people have responded that they've experienced this bug. I published a tip last year about using external multires data so that we can keep all of the files on GitHub. If you pack all the data internally, then .blend files generally grow too large for vanilla GitHub. But with external multires you get a bunch of files that don't go beyond their file limits. So we're going back to 2.79 for detail sculpt passes/baking until this is fixed.
Sergey was assigned by mont29 4 years ago
mont29 commented 4 years ago
Owner

Added subscriber: @Sergey

Added subscriber: @Sergey
mont29 commented 4 years ago
Owner

Thanks. In fact, think this is missing piece from whole multires changes related to new subdiv code (in 2.7/DM area, that external data is read from multires_make_derived_from_derived(), which is part of multires dead code in 2.8x. @Sergey assigning to you since am not exactly sure how to do that with new code.

Thanks. In fact, think this is missing piece from whole multires changes related to new subdiv code (in 2.7/DM area, that external data is read from `multires_make_derived_from_derived()`, which is part of multires dead code in 2.8x. @Sergey assigning to you since am not exactly sure how to do that with new code.
Collaborator

This issue was referenced by b69cbe7d87

This issue was referenced by b69cbe7d8759e604e34d81a9ddc90d8167751f33
Sergey commented 4 years ago
Owner

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sergey closed this issue 4 years ago
Poster

Not sure if I should put this here. But I created a new bug report https://developer.blender.org/T60163 because even though the issue here was fixed quickly (thanks!) and closed, it introduced new problems. So this mechanism is still not very usable.

Not sure if I should put this here. But I created a new bug report https://developer.blender.org/T60163 because even though the issue here was fixed quickly (thanks!) and closed, it introduced new problems. So this mechanism is still not very usable.
Sergey commented 4 years ago
Owner

This is always good to open a new report about new issues.

P.S. Technically, the fix didn't introduce new issues, it just made other issues obvious..

This is always good to open a new report about new issues. P.S. Technically, the fix didn't introduce new issues, it just made other issues obvious..
Poster

Yes. Good point. Anyway, I'm grateful for the quick fix here. And hope we can get the newly encountered problems sorted too. This is especially painful for me since the 2.79 branch does not work at all on my MacBook Pro anymore at this point, which means I can only run 2.79 on WIndows, which I don't have on a laptop.

Yes. Good point. Anyway, I'm grateful for the quick fix here. And hope we can get the newly encountered problems sorted too. This is especially painful for me since the 2.79 branch does not work at all on my MacBook Pro anymore at this point, which means I can only run 2.79 on WIndows, which I don't have on a laptop.
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/Collada
Interest/Compositing
Interest/Core
Interest/Cycles
Interest/Datablocks and Libraries
Interest/Dependency Graph
Interest/Development Management
Interest/Eevee
Interest/Eevee & Viewport
Interest/Freestyle
Interest/Overrides
Interest/Performance
Interest/Pipeline, Assets & I/O
Interest/Translations
Interest/Undo
Interest/USD
Interest/Video Sequencer
legacy module/Animation & Rigging
legacy module/Core
legacy module/Development Management
legacy module/Eevee & Viewport
legacy module/Grease Pencil
legacy module/Modeling
legacy module/Nodes & Physics
legacy module/Pipeline, Assets & IO
legacy module/Platforms, Builds, Tests & Devices
legacy module/Python API
legacy module/Rendering & Cycles
legacy module/Sculpt, Paint & Texture
legacy module/Triaging
legacy module/User Interface
legacy module/VFX & Video
legacy project/1.0.0-beta.2
legacy project/Asset Browser (Archived)
legacy project/BF Blender: 2.8
legacy project/BF Blender: After Release
legacy project/BF Blender: Next
legacy project/BF Blender: Regressions
legacy project/BF Blender: Unconfirmed
legacy project/Blender 2.70
legacy project/Code Quest
legacy project/Game Animation
legacy project/Game Audio
legacy project/Game Data Conversion
legacy project/Game Engine
legacy project/Game Logic
legacy project/Game Physics
legacy project/Game Python
legacy project/Game Rendering
legacy project/Game UI
legacy project/Geometry Nodes
legacy project/GPU / Viewport
legacy project/Grease Pencil
legacy project/GSoC
legacy project/Images & Movies
legacy project/Import/Export
legacy project/Infrastructure: Websites
legacy project/LibOverrides - Usability and UX
legacy project/Line Art
legacy project/Masking
legacy project/Milestone 1: Basic, Local Asset Browser
legacy project/Modeling
legacy project/Modifiers
legacy project/Motion Tracking
legacy project/Nodes
legacy project/Nodes & Physics
legacy project/OpenGL Error
legacy project/Papercut
legacy project/Performance
legacy project/Physics
legacy project/Platforms, Builds, Tests & Devices
legacy project/Pose Library Basics
legacy project/Python API
legacy project/Render & Cycles
legacy project/Render Pipeline
legacy project/Retrospective
legacy project/Sculpt, Paint & Texture
legacy project/Text Editor
legacy project/Tracker Curfew
legacy project/Triaging
legacy project/User Interface
legacy project/UV Editing
legacy project/VFX & Video
legacy project/Virtual Reality
legacy project/Wintab High Frequency
Meta/Good First Issue
Meta/Papercut
migration/requires-manual-verification
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 & Devices
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 Information 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

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#60124
Loading…
There is no content yet.