Face orientation not showing flipped normals #69959

Closed
opened 2019-09-16 20:07:45 +02:00 by Rafał · 14 comments

System Information
Operating system: Windows 10
Graphics card: gtx 1060 3gb

Blender Version
Broken: example: 2.80, edbf15d3c0, master, 2018-11-28, as found on the splash screen

Short description of error
After mirroring meshes via 'searchbar -> mirror -> Z' the Face orientation in Viewport Overlays showing that all faces are not flipped (blue) but after exporting to .fbx and importing that file to Unreal Engine or Substance Painter the normals are flipped.

Exact steps for others to reproduce the error
Based on the default startup or an attached .blend file (as simple as possible).
Barrel_LP.blend
Barrel_LP2.fbx

**System Information** Operating system: Windows 10 Graphics card: gtx 1060 3gb **Blender Version** Broken: example: 2.80, edbf15d3c044, master, 2018-11-28, as found on the splash screen **Short description of error** After mirroring meshes via 'searchbar -> mirror -> Z' the Face orientation in Viewport Overlays showing that all faces are not flipped (blue) but after exporting to .fbx and importing that file to Unreal Engine or Substance Painter the normals are flipped. **Exact steps for others to reproduce the error** Based on the default startup or an attached .blend file (as simple as possible). [Barrel_LP.blend](https://archive.blender.org/developer/F7751444/Barrel_LP.blend) [Barrel_LP2.fbx](https://archive.blender.org/developer/F7751443/Barrel_LP2.fbx)
Author

Added subscriber: @TheBaja

Added subscriber: @TheBaja

Added subscriber: @tomjk

Added subscriber: @tomjk

Face Orientation overlay works on the object's mesh. Your mesh's normals are oriented correctly and the overlay reflects this; however, mirroring your object on an axis will multiply its scale by -1 on that axis. When you export to .fbx and import to your other program, this transformation is being collapsed/applied.

You can see this inside Blender:

  • Turn on Face Orientation overlay. Your object should show blue outside.
  • Mirror your object on an axis. Its scale on that axis is now negative. Your object still shows blue outside.
  • Apply scale (Object menu -> Apply -> Scale). The scale is now 1. Your object shows red outside

So the question is, should the Face Orientation overlay reflect the mesh normals or the object (transformed) normals?

Probably a discussion best suited for the devtalk forum, particularly user feedback . However I won't close this because I'm not sure if this*is// intended behaviour or not.

Face Orientation overlay works on the object's mesh. Your mesh's normals are oriented correctly and the overlay reflects this; however, mirroring your object on an axis will multiply its scale by -1 on that axis. When you export to .fbx and import to your other program, this transformation is being collapsed/applied. You can see this inside Blender: * Turn on Face Orientation overlay. Your object should show blue outside. * Mirror your object on an axis. Its scale on that axis is now negative. Your object still shows blue outside. * Apply scale (Object menu -> Apply -> Scale). The scale is now 1. Your object shows red outside So the question is, should the Face Orientation overlay reflect the mesh normals or the object (transformed) normals? Probably a discussion best suited for the devtalk forum, particularly [user feedback ](https:*devtalk.blender.org/c/user-feedback). However I won't close this because I'm not sure if this*is// intended behaviour or not.
Member

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker
Member

This is intended behavior for the face orientation overlay. The reason for this is that otherwise the shading will be effected in the display. Cycles, EEVEE and workbench renders them correctly.

So question is that it is a limitation of the FBX exporter or that this also happens in other exporters.

This is intended behavior for the face orientation overlay. The reason for this is that otherwise the shading will be effected in the display. Cycles, EEVEE and workbench renders them correctly. So question is that it is a limitation of the FBX exporter or that this also happens in other exporters.
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

@tomjk Can you prepare a file that shows what you describe?

I checked this yesterday, and the mirror modifier not only scales by -1 along one axis, but also inverts the normals.

Here you can see that the vertex order is different from what you would get when just scaling with -1.
image.png

I just don't quite understand why the .fbx exporter is exporting something else. When I import your provided .fbx file, the normals seem to be correct.

@tomjk Can you prepare a file that shows what you describe? I checked this yesterday, and the mirror modifier not only scales by -1 along one axis, but also inverts the normals. Here you can see that the vertex order is different from what you would get when just scaling with -1. ![image.png](https://archive.blender.org/developer/F7755261/image.png) I just don't quite understand why the .fbx exporter is exporting something else. When I import your provided .fbx file, the normals seem to be correct.

This is with mirror operation (Search -> "Mirror" -> Transform: Mirror, or Ctrl-M) as in @TheBaja's post, not the mirror modifier.

This is with mirror operation (Search -> "Mirror" -> Transform: Mirror, or Ctrl-M) as in @TheBaja's post, not the mirror modifier.
Author

Maybe this helps to understand:

BarrelTest.mp4

Maybe this helps to understand: [BarrelTest.mp4](https://archive.blender.org/developer/F7755423/BarrelTest.mp4)

Added subscriber: @ideasman42

Added subscriber: @ideasman42

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Campbell Barton self-assigned this 2019-09-19 11:54:44 +02:00

Blender detects negative matrices which cause flipping and compensates for it to make negative scaled objects usable, not all engines do this.

Closing.

Blender detects negative matrices which cause flipping and compensates for it to make negative scaled objects usable, not all engines do this. Closing.
Contributor

Added subscriber: @Rawalanche

Added subscriber: @Rawalanche
Contributor

Yes, I agree here. Correcting normals for negative scale is great, because it allows you to make more unique variations of assets with instancing by just mirroring them, and still get usable normals required for example for normals maps or refraction. When you have any asset which you plan to use with substance painter, or anywhere else really, just make sure to apply transforms first before exporting. That's always the best practice.

So when you know your asset has been mirrored, then:

  1. Apply scale
  2. You will see faces flip immediately
  3. In edit mode, flip them all the right way again
Yes, I agree here. Correcting normals for negative scale is great, because it allows you to make more unique variations of assets with instancing by just mirroring them, and still get usable normals required for example for normals maps or refraction. When you have *any* asset which you plan to use with substance painter, or anywhere else really, just make sure to apply transforms first before exporting. That's always the best practice. So when you know your asset has been mirrored, then: 1. Apply scale 2. You will see faces flip immediately 3. In edit mode, flip them all the right way again
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
6 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#69959
No description provided.