Baking normal maps for transformed objects is broken (3.0) #91894

Closed
opened 2021-10-02 10:28:11 +02:00 by Andrei Alexeyev · 12 comments

System Information
Operating system: openSUSE Tumbleweed
Graphics card: N/A, using CPU rendering

Blender Version
Broken: 3.0 alpha 12e8c783535c (official build) — didn't bisect, but pretty sure it was broken in the cycles-x branch even before the merge.
Worked: Prior to Cycles-X merge

Short description of error
When baking a normal map for an object that has transformations, the result is heavily distorted and unusable. This seems to manifest most prominently with rotations. Clearing or applying the transforms before baking produces correct results.

Exact steps for others to reproduce the error

  1. Open this file
  2. Select the "Transformed - BROKEN" object.
  3. Press "bake" in the render properties panel.
  4. You should see something like this in the UV editor panel:
    bad.png
  5. Repeat 2 and 3 with the "Untransformed - OK object"
  6. You should now see something like this:
    good.png

Test File:
normalbug.blend

**System Information** Operating system: openSUSE Tumbleweed Graphics card: N/A, using CPU rendering **Blender Version** Broken: 3.0 alpha `12e8c783535c` (official build) — didn't bisect, but pretty sure it was broken in the cycles-x branch even before the merge. Worked: Prior to Cycles-X merge **Short description of error** When baking a normal map for an object that has transformations, the result is heavily distorted and unusable. This seems to manifest most prominently with rotations. Clearing or applying the transforms before baking produces correct results. **Exact steps for others to reproduce the error** 1. Open this file 2. Select the "Transformed - BROKEN" object. 3. Press "bake" in the render properties panel. 4. You should see something like this in the UV editor panel: ![bad.png](https://archive.blender.org/developer/F10730229/bad.png) 5. Repeat 2 and 3 with the "Untransformed - OK object" 6. You should now see something like this: ![good.png](https://archive.blender.org/developer/F10730227/good.png) Test File: [normalbug.blend](https://archive.blender.org/developer/F10731620/normalbug.blend)

Added subscriber: @Akaricchi

Added subscriber: @Akaricchi

Added subscriber: @SteffenD

Added subscriber: @SteffenD

This somehow reminds me of a bug that I reported some time ago https://developer.blender.org/T90854

This somehow reminds me of a bug that I reported some time ago https://developer.blender.org/T90854
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Hi, thanks for the report. This is actually working with the builds prior to Cycles-X merge.

Will set it to High priority for now

Working 13a4bccdb1
Broken 4d881d9dad
Hi, thanks for the report. This is actually working with the builds prior to Cycles-X merge. Will set it to High priority for now | Working | 13a4bccdb196 | | -- | -- | | Broken | 4d881d9dad76 |

This issue was referenced by blender/cycles@89c83bef09

This issue was referenced by blender/cycles@89c83bef0946ea3b07bcc211922ca7c5c3529b14

This issue was referenced by fc4886a314

This issue was referenced by fc4886a31426b6fe40982f5288c8d129a1ce3223

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Brecht Van Lommel self-assigned this 2021-10-04 14:10:10 +02:00

@brecht Unfortunately, this is still not fully resolved. It looks like the "Geometry" shader node, specifically its "Position" output, is also sensitive to object transformations.

Here is an example taken from a real project: roof.blend

Baking the untransformed object results in this (good):
good.png

But baking the transformed object results in this (bad):
bad.png

(The difference may be hard to see on the thumbnails)

Also, apparently this affects all bake types, not just normals. Should I open a separate bug for this?

@brecht Unfortunately, this is still not fully resolved. It looks like the "Geometry" shader node, specifically its "Position" output, is also sensitive to object transformations. Here is an example taken from a real project: [roof.blend](https://archive.blender.org/developer/F10775694/roof.blend) Baking the untransformed object results in this (good): ![good.png](https://archive.blender.org/developer/F10775708/good.png) But baking the transformed object results in this (bad): ![bad.png](https://archive.blender.org/developer/F10775718/bad.png) (The difference may be hard to see on the thumbnails) Also, apparently this affects all bake types, not just normals. Should I open a separate bug for this?
Member

Added subscriber: @Alaska

Added subscriber: @Alaska
Member

In #91894#1230872, @Akaricchi wrote:
Should I open a separate bug for this?

Yes you should.

> In #91894#1230872, @Akaricchi wrote: > Should I open a separate bug for this? Yes you should.
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#91894
No description provided.