Applying Transformations Causes "Hollow Looking" Models #52049

Closed
opened 2017-07-13 22:55:54 +02:00 by Ricky Bobby · 9 comments

System Information
Windows 10, no graphics card (CPU based graphics)

Blender Version
2.77

Short description of error
As seen in the video, applying scale to the model turns it into, well... the glitchiest thing I have ever seen.

Exact steps for others to reproduce the error
from glitch.blend (attached), simply apply the scale and watch as the model commits suicide.

The normals definitely flipped, but the question is why.
glitch.blend

2017-07-09-2151-40.mp4

**System Information** Windows 10, no graphics card (CPU based graphics) **Blender Version** 2.77 **Short description of error** As seen in the video, applying scale to the model turns it into, well... the glitchiest thing I have ever seen. **Exact steps for others to reproduce the error** from glitch.blend (attached), simply apply the scale and watch as the model commits suicide. The normals definitely flipped, but the question is why. [glitch.blend](https://archive.blender.org/developer/F666338/glitch.blend) [2017-07-09-2151-40.mp4](https://archive.blender.org/developer/F666339/2017-07-09-2151-40.mp4)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @rickybobby

Added subscriber: @rickybobby

Added subscribers: @ideasman42, @mano-wii

Added subscribers: @ideasman42, @mano-wii

This is because the object is on negative scale, that is, the object is flipped.

One solution would be to flip the normals in edit mode.
But since this is not the expected behavior. Maybe it's better to edit the code.

@ideasman42, can you take a look? Here is a possible solution:

diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 4d7d7df0d2f..879e2817222 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -525,6 +525,9 @@ static int apply_objects_internal(bContext *C, ReportList *reports, bool apply_l
 				multiresModifier_scale_disp(scene, ob);
 			
 			/* adjust data */
+			if (ob->transflag & OB_NEG_SCALE) {
+				BKE_mesh_polygons_flip(me->mpoly, me->mloop, &me->ldata, me->totpoly);
+			}
 			BKE_mesh_transform(me, mat, true);
 			
 			/* update normals */
This is because the object is on negative scale, that is, the object is flipped. One solution would be to flip the normals in edit mode. But since this is not the expected behavior. Maybe it's better to edit the code. @ideasman42, can you take a look? Here is a possible solution: ``` diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index 4d7d7df0d2f..879e2817222 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -525,6 +525,9 @@ static int apply_objects_internal(bContext *C, ReportList *reports, bool apply_l multiresModifier_scale_disp(scene, ob); /* adjust data */ + if (ob->transflag & OB_NEG_SCALE) { + BKE_mesh_polygons_flip(me->mpoly, me->mloop, &me->ldata, me->totpoly); + } BKE_mesh_transform(me, mat, true); /* update normals */ ```

Added subscriber: @sozap

Added subscriber: @sozap

It makes things weirdier in your video because of the Shading/backface culling option turned on...
Then after apply scale what you see is only the inside of the model.

This is appending from a long time in blender, could be great to see it fixed one day, on the other hand we can live with it, tho it can be disturbing for newcomers...

It makes things weirdier in your video because of the Shading/backface culling option turned on... Then after apply scale what you see is only the inside of the model. This is appending from a long time in blender, could be great to see it fixed one day, on the other hand we can live with it, tho it can be disturbing for newcomers...

Added subscriber: @mont29

Added subscriber: @mont29

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Bastien Montagne self-assigned this 2017-07-19 10:57:58 +02:00

Yeah, thanks for the report, but do not see any bug here, it is indeed expected that when you scale negatively, you get “inside out” mesh (that actually face winding, i.e. order in which face corners “turn around” face center, that get reversed, and imply reversed normals).

Yeah, thanks for the report, but do not see any bug here, it is indeed expected that when you scale negatively, you get “inside out” mesh (that actually face winding, i.e. order in which face corners “turn around” face center, that get reversed, and imply reversed normals).
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#52049
No description provided.