Cycles Baking and applyRotation issues #40156

Closed
opened 2014-05-12 12:15:24 +02:00 by michalis zissiou · 23 comments

MacPro dualXeon, ATI HD 5870, OSX 10.8.5
hash 8904eaf

Applying rotation issue

Try this blend file, it demonstrates the issue.
https://dl.dropboxusercontent.com/u/24090090/ApplyBakeTest.blend.zip

Here's a request, it sounds rather as a feature but can be considered as a major bug.
Have two or three cubes on a plane. Add a second plane on top (to be the active for baking).
Try for normal maps.
OK. (I mean, bevel these cubes to have something to see on a nmap LOL)
Now, rotate these cubes a bit, select all, the last is the active plane on the top. Bake…
Wrong? because you did not apply rotation on objects first!
It goes worse now.
Use an empty and rotate the object by this empty.
Wrong baking again.

This isn't right. We shouldn't have to apply rotations and scale and etc. In fact we should avoid it in most cases.
An object has its own coordinates and we have to respect this.

By example, bake a nice object space normal map, apply it to the object, rotate the object. All fine. Apply rotation and the OS nmap is useless. (same when rotating in edit mode)

MacPro dualXeon, ATI HD 5870, OSX 10.8.5 hash 8904eaf Applying rotation issue Try this blend file, it demonstrates the issue. https://dl.dropboxusercontent.com/u/24090090/ApplyBakeTest.blend.zip Here's a request, it sounds rather as a feature but can be considered as a major bug. Have two or three cubes on a plane. Add a second plane on top (to be the active for baking). Try for normal maps. OK. (I mean, bevel these cubes to have something to see on a nmap LOL) Now, rotate these cubes a bit, select all, the last is the active plane on the top. Bake… Wrong? because you did not apply rotation on objects first! It goes worse now. Use an empty and rotate the object by this empty. Wrong baking again. This isn't right. We shouldn't have to apply rotations and scale and etc. In fact we should avoid it in most cases. An object has its own coordinates and we have to respect this. By example, bake a nice object space normal map, apply it to the object, rotate the object. All fine. Apply rotation and the OS nmap is useless. (same when rotating in edit mode)

Changed status to: 'Open'

Changed status to: 'Open'
Dalai Felinto was assigned by michalis zissiou 2014-05-12 12:15:24 +02:00

Added subscriber: @michaliszissiou

Added subscriber: @michaliszissiou

You are no longer supposed to apply rotation to any object. If that's not happening than it's a bug.
I'll check your file later. Does the same file bake well in Blender Internal?

You are no longer supposed to apply rotation to any object. If that's not happening than it's a bug. I'll check your file later. Does the same file bake well in Blender Internal?

The file bakes well in blender internal
Cycles render is still wrong, in the half an hour ago build hash 3557094

The file bakes well in blender internal Cycles render is still wrong, in the half an hour ago build hash 3557094

This bug is here, some time now.
Just reminding, the wrong object space I was getting, trying on a sculpt imported from zbrush.
Zbrush tends to rotate x 90º. Easy to not see it. So, wrong OS if not applying rotation. (Direct bake)
And completely wrong, when bake to active.
Lot of complains and failures of new users may be related to this.

This bug is here, some time now. Just reminding, the wrong object space I was getting, trying on a sculpt imported from zbrush. Zbrush tends to rotate x 90º. Easy to not see it. So, wrong OS if not applying rotation. (Direct bake) And completely wrong, when bake to active. Lot of complains and failures of new users may be related to this.

Added subscriber: @mgiebler

Added subscriber: @mgiebler

Added my own test file created in latest BuildBot build 51fa66b (win32 vs2013).

Steps to reproduce: load sel_to_act_1.blend, click Bake, view the (correct) normal map on the right, switch to Cycles Render, click Bake again, compare.

Added my own test file created in latest BuildBot build 51fa66b (win32 vs2013). Steps to reproduce: load sel_to_act_1.blend, click Bake, view the (correct) normal map on the right, switch to Cycles Render, click Bake again, compare.

Thanks for the sample file, that's a pretty good one.

Thanks for the sample file, that's a pretty good one.

Added subscriber: @motorsep

Added subscriber: @motorsep

Sometimes it's not practical to apply location/rotation in the scene. You don't just bake final models that you won't ever touch again. There are iterations in the process and you will need to continue modeling/refining from the moment you left off to bake normal maps (as an example).

Why not to automatically create a copy of objects that are being baked, apply transforms to them, bake maps, delete copies afterward ? This way you end up with unmodified scene, and proper bake results.

Sometimes it's not practical to apply location/rotation in the scene. You don't just bake final models that you won't ever touch again. There are iterations in the process and you will need to continue modeling/refining from the moment you left off to bake normal maps (as an example). Why not to automatically create a copy of objects that are being baked, apply transforms to them, bake maps, delete copies afterward ? This way you end up with unmodified scene, and proper bake results.

@motorsep you misunderstood something. The idea of applying the transformations is only a workaround before we fix this issue. It's a bug and will be fixed.

@motorsep you misunderstood something. The idea of applying the transformations is only a workaround before we fix this issue. It's a bug and will be fixed.

Issue partly fixed, there is a remaining issue though: cycles_bake_sel_to_act_GSR.blend
If the highpoly object has non-uniform scale things don't work well.

Issue partly fixed, there is a remaining issue though: [cycles_bake_sel_to_act_GSR.blend](https://archive.blender.org/developer/F89610/cycles_bake_sel_to_act_GSR.blend) If the highpoly object has non-uniform scale things don't work well.

This issue was referenced by 8d297394ba

This issue was referenced by 8d297394ba51246f2db0d503df7f4cae19ca6e92

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit 8d297394ba.

Closed by commit 8d297394ba.

Changed status from 'Resolved' to: 'Open'

Changed status from 'Resolved' to: 'Open'

This issue was referenced by 2bfc3debd9

This issue was referenced by 2bfc3debd90ac0176e62de37d7aeea1a5316e658

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit 2bfc3debd9.

Closed by commit 2bfc3debd9.

Added subscriber: @BartekMoniewski

Added subscriber: @BartekMoniewski

This issue was referenced by 2057a3a2fc

This issue was referenced by 2057a3a2fcd545ad16fd77f789562727a5fd3f8b

For the records, this is properly fixed now. No errors/warnings, it simply handles whatever transformation the selected objects have.

For the records, this is properly fixed now. No errors/warnings, it simply handles whatever transformation the selected objects have.

I had my tests. Lot of them.
So far, it works fine.
I also performed tests including arrays combined with curve deform. I also tested alt+S on the curve bezier.
Lot of deforms and rotations.
Cycles bakes them perfectly.
I believe it is fixed.

I had my tests. Lot of them. So far, it works fine. I also performed tests including arrays combined with curve deform. I also tested alt+S on the curve bezier. Lot of deforms and rotations. Cycles bakes them perfectly. I believe it is fixed.
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#40156
No description provided.