Regression: Blender crash when baking Multires displacements #98546

Closed
opened 2022-06-01 23:09:37 +02:00 by James Guilford · 12 comments

System Information
Operating system: Windows-10-10.0.22000-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 511.65

Blender Version
Broken: version: 3.1.2, branch: master, commit date: 2022-03-31 17:40, hash: cc66d1020c

Caused by cfa53e0fbe
NOTE: to build cfa53e0fbe, I needed 348631cffe on top

Short description of error
When baking mulitres displacements, if low resolution mesh is checked, blender will crash

Exact steps for others to reproduce the error

  • Add multires modifier with a few subdivisions to cube or other object
  • Set multires to 0 in viewport
  • Set up a texture in shader
  • In bake settings, Select bake from multires, and bake type ->displacement
  • In output dropdown, Select 'Low Resolution Mesh'
  • Click bake -> Crash

Test File with all steps included:
#98546.blend

**System Information** Operating system: Windows-10-10.0.22000-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 511.65 **Blender Version** Broken: version: 3.1.2, branch: master, commit date: 2022-03-31 17:40, hash: `cc66d1020c` Caused by cfa53e0fbe NOTE: to build cfa53e0fbe, I needed 348631cffe on top **Short description of error** When baking mulitres displacements, if low resolution mesh is checked, blender will crash **Exact steps for others to reproduce the error** - Add multires modifier with a few subdivisions to cube or other object - Set multires to 0 in viewport - Set up a texture in shader - In bake settings, Select bake from multires, and bake type ->displacement - In output dropdown, Select 'Low Resolution Mesh' - Click bake -> Crash Test File with all steps included: [#98546.blend](https://archive.blender.org/developer/F13128661/T98546.blend)
Author

Added subscriber: @fjg3d

Added subscriber: @fjg3d
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

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

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

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Hi, thanks for the report. This appears to be a regressions (doesn't crash in 3.0.1)
Will raise the priority.

@lichtwerk , could you bisect?

Hi, thanks for the report. This appears to be a regressions (doesn't crash in 3.0.1) Will raise the priority. @lichtwerk , could you bisect?
Pratik Borhade changed title from Blender crash when baking Multires displacements (with 'Low Resolution Mesh' checked) to Regression: Blender crash when baking Multires displacements 2022-06-02 07:25:38 +02:00
Member

hmm maybe {cfa53e0fbe}?
Broke between 97c2c3991620 - e69020ad0f52

hmm maybe {cfa53e0fbe}? Broke between `97c2c3991620` - `e69020ad0f52`
Member

Will check

Will check
Member

Added subscribers: @HooglyBoogly, @brecht

Added subscribers: @HooglyBoogly, @brecht
Member

Caused by cfa53e0fbe indeed.

NOTE: to build cfa53e0fbe, I needed 348631cffe on top

Only crashes with multires viewport levels set 0, so there might be something wrong with just using the orig DerivedMesh in multires_make_derived_from_derived / multiresbake_create_loresdm?
We seem to be missing vert_normals on the CDDerivedMesh.
Precomputed normals are still available on the MResolvePixelData in flush_pixel, maybe they could be used also?
Or just the ususal BKE_mesh_XXX_normals_ensure missing somewhere in the process?

1  copy_v3_v3              math_vector_inline.c 44  0x463d777      
2  cdDM_getVertNo          cdderivedmesh.c      112 0x463d9cf      
3  interp_bilinear_mpoly   multires_bake.c      727 0x61c2fd7      
4  apply_heights_callback  multires_bake.c      879 0x61c38ef      
5  flush_pixel             multires_bake.c      199 0x61c0cd2      
6  set_rast_triangle       multires_bake.c      220 0x61c0d7a      
7  rasterize_half          multires_bake.c      272 0x61c0fa3      
8  bake_rasterize          multires_bake.c      321 0x61c144b      
9  do_multires_bake_thread multires_bake.c      405 0x61c16c7      
10 tslot_thread_start      threads.cc           204 0x121bc959     
11 start_thread                                     0x7ffff7a8f0e7 
12 clone3                                           0x7ffff7b14780 

@HooglyBoogly , @brecht : is a fix still doable for 3.2?

Caused by cfa53e0fbe indeed. NOTE: to build cfa53e0fbe, I needed 348631cffe on top Only crashes with multires viewport levels set 0, so there might be something wrong with just using the orig `DerivedMesh` in `multires_make_derived_from_derived` / `multiresbake_create_loresdm`? We seem to be missing `vert_normals` on the `CDDerivedMesh`. Precomputed normals are still available on the `MResolvePixelData` in `flush_pixel`, maybe they could be used also? Or just the ususal `BKE_mesh_XXX_normals_ensure` missing somewhere in the process? ``` 1 copy_v3_v3 math_vector_inline.c 44 0x463d777 2 cdDM_getVertNo cdderivedmesh.c 112 0x463d9cf 3 interp_bilinear_mpoly multires_bake.c 727 0x61c2fd7 4 apply_heights_callback multires_bake.c 879 0x61c38ef 5 flush_pixel multires_bake.c 199 0x61c0cd2 6 set_rast_triangle multires_bake.c 220 0x61c0d7a 7 rasterize_half multires_bake.c 272 0x61c0fa3 8 bake_rasterize multires_bake.c 321 0x61c144b 9 do_multires_bake_thread multires_bake.c 405 0x61c16c7 10 tslot_thread_start threads.cc 204 0x121bc959 11 start_thread 0x7ffff7a8f0e7 12 clone3 0x7ffff7b14780 ``` @HooglyBoogly , @brecht : is a fix still doable for 3.2?
Hans Goudey self-assigned this 2022-06-02 12:52:11 +02:00
Author

BTW, is the low resolution mesh option the same as manually setting the multires to level 0 in the modifier?

BTW, is the low resolution mesh option the same as manually setting the multires to level 0 in the modifier?

This issue was referenced by 96a47af413

This issue was referenced by 96a47af413a8055f50b9989905922588494d1653
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Thomas Dinges added this to the 3.2 milestone 2023-02-08 15:51:07 +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
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#98546
No description provided.