Page MenuHome

Cycles Baking and applyRotation issues
Closed, ResolvedPublic

Description

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)

Event Timeline

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

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 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.

Dalai Felinto (dfelinto) lowered the priority of this task from Needs Triage by Developer to Confirmed, Medium.May 14 2014, 9:39 AM

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

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.

@Alexander Zubov (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:


If the highpoly object has non-uniform scale things don't work well.

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.