Mirrored objects have flipped binormal vectors in LookDev #62680

Closed
opened 2019-03-17 15:11:54 +01:00 by yvt · 8 comments
Contributor

System Information
Operating system: macOS 10.14.4 Beta (18E205e)
Graphics card: AMD Radeon R9 M295X 4GB

Blender Version
Broken:

Short description of error

When rendering using the Material (2.79b) or LookDev (2.80) viewport shading mode, binormal vectors read by shaders are flipped for mirrored objects (i.e., objects having negative scale values for one or three axes).

Exact steps for others to reproduce the error
See the attached .blend file and screenshots.

Eevee Tangent Error Test (2.7).blend

The scene shows three shapes. The original shape is shown on the right side. The other ones are a mirrored version of the shape, each using a different method of mirroring: the middle one was produced by the Mirror modifier and the left one was created by copying the object and scaling by -1.0 on the X direction.

Their binormal vectors (presumably world-space) are visualized by mapping their XYZ coordinates to color values through the use of the Normal Map node.

The mirrored objects use the same transformation in regard to the original object. Therefore, it's expected that they have the same binormal vector. A Cycles render in Blender 2.79b shows an expected behavior:

Screen Shot 2019-03-17 at 22.01.43.jpg

However, when rendered using the Material (2.79b) or LookDev (2.80) viewport mode, the binormal vector of the left one (the one mirred by object scale) is flipped:

Screen Shot 2019-03-17 at 22.48.27.jpg Screen Shot 2019-03-17 at 22.02.00.jpg

The following image shows a shading error possibly caused by this:

Screen Shot 2019-03-17 at 23.04.15.jpg

**System Information** Operating system: macOS 10.14.4 Beta (18E205e) Graphics card: `AMD Radeon R9 M295X 4GB` **Blender Version** Broken: - 2.79b - 2.80 `master` (2d8aa2e6ad351859796da8406a0c8f3cc2b45bbf) **Short description of error** When rendering using the Material (2.79b) or LookDev (2.80) viewport shading mode, binormal vectors read by shaders are flipped for mirrored objects (i.e., objects having negative scale values for one or three axes). **Exact steps for others to reproduce the error** See the attached `.blend` file and screenshots. [Eevee Tangent Error Test (2.7).blend](https://archive.blender.org/developer/F6839073/Eevee_Tangent_Error_Test__2.7_.blend) The scene shows three shapes. The original shape is shown on the right side. The other ones are a mirrored version of the shape, each using a different method of mirroring: the middle one was produced by the Mirror modifier and the left one was created by copying the object and scaling by `-1.0` on the X direction. Their binormal vectors (presumably world-space) are visualized by mapping their XYZ coordinates to color values through the use of the Normal Map node. The mirrored objects use the same transformation in regard to the original object. Therefore, it's expected that they have the same binormal vector. A Cycles render in Blender 2.79b shows an expected behavior: ![Screen Shot 2019-03-17 at 22.01.43.jpg](https://archive.blender.org/developer/F6839062/Screen_Shot_2019-03-17_at_22.01.43.jpg) However, when rendered using the Material (2.79b) or LookDev (2.80) viewport mode, the binormal vector of the left one (the one mirred by object scale) is flipped: ![Screen Shot 2019-03-17 at 22.48.27.jpg](https://archive.blender.org/developer/F6839065/Screen_Shot_2019-03-17_at_22.48.27.jpg) ![Screen Shot 2019-03-17 at 22.02.00.jpg](https://archive.blender.org/developer/F6839068/Screen_Shot_2019-03-17_at_22.02.00.jpg) The following image shows a shading error possibly caused by this: ![Screen Shot 2019-03-17 at 23.04.15.jpg](https://archive.blender.org/developer/F6839097/Screen_Shot_2019-03-17_at_23.04.15.jpg)
Author
Contributor

Added subscriber: @TomoakiKawada

Added subscriber: @TomoakiKawada
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

Can you try to build this file again based on the default .blend file. This file links to some other .blend files.
Please try to keep it as simple as possible.

Can you try to build this file again based on the default .blend file. This file links to some other .blend files. Please try to keep it as simple as possible.
Author
Contributor

My apologies. Here's the new reproducing example created from scratch:

Eevee Tangent Error Test_3.blend

My apologies. Here's the new reproducing example created from scratch: [Eevee Tangent Error Test_3.blend](https://archive.blender.org/developer/F6844357/Eevee_Tangent_Error_Test_3.blend)

Added subscribers: @fclem, @ZedDB

Added subscribers: @fclem, @ZedDB
Clément Foucault was assigned by Sebastian Parborg 2019-03-18 15:40:09 +01:00

@fclem I think there is already a ticket for this, but I can't find it ATM. So sorry if this is a duplicate.

@fclem I think there is already a ticket for this, but I can't find it ATM. So sorry if this is a duplicate.

This issue was referenced by afaa832a85

This issue was referenced by afaa832a85fb5e85d21e31e8923e1c67b2bdc49e

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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#62680
No description provided.