Regression: Wrong orientation on shrinkwrap constrained instanced collection #119992

Closed
opened 2024-03-28 00:18:06 +01:00 by Robert S · 5 comments

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3090/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 551.23

Blender Version
Broken: version: 4.1.0, branch: blender-v4.1-release, commit date: 2024-03-25 20:42, hash: 40a5e739e270
Worked: 4.0.2

Short description of error
To my knowledge, the only way to make part of a sphere using simple deform is to first rotate the original object in the manner shown in the attached example. However, any shrink wrapped constrained instance placed on that spherical object gets the wrong orientation in 4.1.

Exact steps for others to reproduce the error

  1. Open the attached example
  2. The cone is shrinkwrap constrained onto the curved surface.
  3. In 4.0, the cone is upright, but in 4.1, the cone is sideways.

Expected: Cone points upright

Result: Cone is pointing sideways.

**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3090/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 551.23 **Blender Version** Broken: version: 4.1.0, branch: blender-v4.1-release, commit date: 2024-03-25 20:42, hash: `40a5e739e270` Worked: 4.0.2 **Short description of error** To my knowledge, the only way to make part of a sphere using simple deform is to first rotate the original object in the manner shown in the attached example. However, any shrink wrapped constrained instance placed on that spherical object gets the wrong orientation in 4.1. **Exact steps for others to reproduce the error** 1. Open the attached example 2. The cone is shrinkwrap constrained onto the curved surface. 3. In 4.0, the cone is upright, but in 4.1, the cone is sideways. Expected: Cone points upright Result: Cone is pointing sideways.
979 KiB
Robert S added the
Priority
Normal
Status
Needs Triage
Type
Report
labels 2024-03-28 00:18:06 +01:00
Member

Can confirm the difference between 4.0 and 4.1/4.2.

Working: 4.0.3 63e9cead5f, broken: 4.1 ea7c0a4a46

Can confirm the difference between 4.0 and 4.1/4.2. Working: 4.0.3 63e9cead5ff0, broken: 4.1 ea7c0a4a46a8
YimingWu added
Module
Modeling
Status
Confirmed
and removed
Status
Needs Triage
labels 2024-03-28 04:08:59 +01:00
Iliya Katushenock added
Priority
High
and removed
Priority
Normal
labels 2024-03-28 07:51:30 +01:00
Member

Running a bisect...

Running a bisect...
Member
Broken by aca27e5462fc814148338cc5fc1cc736c54 @HooglyBoogly
Member

Cones are getting upright when the object is Shade Smooth.

It might very well be that the reported is actually the intended behavior (which feels a little strange, but at least it used to behave like that for ages).

Then came along 5876573e14 which seems to have had a mistake :

CustomData_get_layer_named(&mesh->edata, CD_PROP_BOOL, "sharp_face"))

it gets sharp_face from the edge domain [which I believe is never found] -- so code would from 5876573e14 onwards always go into the codebranch of

/* Interpolate smooth normals if enabled. */

and never into the branch of

/* Use the face normal if flat. */

Now aca27e5462 somewhat corrected the situation again (since it changed the domain from mesh->edge_data to mesh->face_data again when getting sharp_face), so now we are entering the "Use the face normal if flat" branch again.

Cant really comment (yet) on the fact that "proper" flat facenormals seem to give such an unexpected shrinkwrap result (to me it seems the cones should stay upright), but at least these are my findings regarding code history.

Cones are getting upright when the object is `Shade Smooth`. It might very well be that the reported is actually the intended behavior (which feels a little strange, but at least it used to behave like that for ages). Then came along 5876573e14f4 which seems to have had a mistake : `CustomData_get_layer_named(&mesh->edata, CD_PROP_BOOL, "sharp_face"))` it gets `sharp_face` from the edge domain [which I believe is never found] -- so code would from 5876573e14f4 onwards always go into the codebranch of `/* Interpolate smooth normals if enabled. */` and never into the branch of `/* Use the face normal if flat. */` Now aca27e5462 somewhat corrected the situation again (since it changed the domain from `mesh->edge_data` to `mesh->face_data` again when getting `sharp_face`), so now we are entering the "Use the face normal if flat" branch again. Cant really comment (yet) on the fact that "proper" flat facenormals seem to give such an unexpected shrinkwrap result (to me it seems the cones should stay upright), but at least these are my findings regarding code history.
Hans Goudey self-assigned this 2024-03-28 16:11:08 +01:00
Member

Thanks for the investigation @lichtwerk. Looks like the transform was always ignored for face normals since b4b224dc08. (Note the missing BLI_space_transform_invert_normal for that case).

Thanks for the investigation @lichtwerk. Looks like the transform was always ignored for face normals since b4b224dc083c0e490eebc5c98646d791a41b8563. (Note the missing `BLI_space_transform_invert_normal` for that case).
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2024-03-28 18:45:36 +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
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#119992
No description provided.