Custom split normal data on negative or non-uniform scaled geometries gets broken upon applying scale #121831
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser Project (Legacy)
Interest
Asset System
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#121831
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: Quadro RTX 5000 with Max-Q Design/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 516.69
Blender Version
Broken version: 4.2.0 Alpha, branch: main, commit date: 2024-05-15 08:16, hash:
ed2be4c89f59
Broken version: 4.1.0
Broken version: 4.0
Broken version: 3.6.10 & 3.6 LTS
Broken version: 3.3LTS
Short description of error
Custom split normal data on negative or non-uniform scaled geometries gets broken upon applying scale.
This alone makes Blender difficult to work with when smooth decimated surfaces for optimized graphics are a requirement and they happen to come in as mirrored along one or multiple axes.
Exact steps for others to reproduce the error
Select Suzanne > Ctrl + A > (Apply) Scale
Can confirm. I also had this problem when importing models, thought it's just some broken normals. Looks like it's a bug with applying transform 🤔
Does not happen in 4.0 apparently (and when importing other model + scaling works as well). Will raise priority
This is also broken in 4.0, 3.6LTS, 3.3LTS for me.
@ChengduLittleA : did you enable
Normals
>Auto Smooth
in those versions?Will lower the prio for now...
@lichtwerk Well I did not specifically turn that option on 🤔, if it does then it's from the importer
NOTE: could be that something like
93c8955a72
helps here (applying scale is not really a topo operation though...), or just something corresponding tomultiresModifier_scale_disp
?If the option is not ON in older versions, you are not looking at custom normals ;) (they are only used with that option ON)
Also fails with positive, but non-uniform scaling (assume just anything where
CornerNormalSpaceArray
also changes?)@HooglyBoogly might be interested?
Custom split normal data on mirrored(negative scale) geometries gets broken upon applying scaleto Custom split normal data on negative or non-uniform scaled geometries gets broken upon applying scaleUpdated the issue with finds higher up. I can also confirm that it's broken in b4.0, just forgot to add it to the original post.
I found this thread which handles one specific case of the issue.
If anyone wants to join me in trying to generalize and update it for b4.1 (and b4.2 LTS) (with the updated mesh API) it would be very much appreciated.
This is of course not the ideal solution but would certainly help in dealing with the issue.
I managed to get something that may work(?)
It could be cleaned up but feel free to point out any mistakes
Edit:
There are a couple mistakes, I will work on correcting the code
Edit 2:
Slightly corrected code (Missing if statement for flipping faces fixed):
Edit 3:
Made a cleaned up version, and included a few comments...
I'm not sure I can further improve it on my own - it solves the issue for negative scaled meshes but not all non-uniform ones.
Would also be nice if it handled child objects similarly to the native Apply Scale...
https://pastebin.com/KrPJ7z2A
Hello, thanks for the bug report, and investigation!
I would like to add, that this error occurs when joining objects, where one object has custom split normals and a negative scale (I did not check non uniform scales and joining objects).
Blender Version
Broken version: 4.0
Exact steps for others to reproduce the error
Select Mirrored Suzanne > Shift + select non mirrored Suzanne (So that non mirrored Suzanne is active) > Ctrl + J
It also works in the opposite selection order, breaking the normals on the non mirrored version, so the active selection always seems to keep it's split normals on joining.
(These meshes have all triangles (faces) un-welded, but it still occurs when all vertices are merged by distance, but much less noticeable)