Maniphest T54731

Baked normal map from highpoly to lowpoly is too pale unless baking to new image
Closed, Archived

Assigned To
Philipp Oeser (lichtwerk)
Authored By
Mr Zak (MrZak)
Apr 19 2018, 7:03 PM
Tags
  • BF Blender
Subscribers
Brecht Van Lommel (brecht)
Mr Zak (MrZak)
Philipp Oeser (lichtwerk)

Description

System Information
Operating system: Win7

Blender Version
Broken: tested on Blender 2.79a RC2 and Blender 2.79b f4dc9f9d68b

Short description of error
When baking a normal map from highpoly to lowpoly it works up to a certain moment. After some amount of rebakes to the same image (overwriting results) the baked normal map becomes very bright, has values of Hue = 0,667; Sat = 0,2646; Value = 1,0 for the background area (where there should be no normal effect). Default map has Hue = 0,667; Sat = 0,4980; Val = 1,0. So only saturation changes.
The meshes in the file attached are a stripdown version of the mesh with which I catched the bug once again.

Exact steps for others to reproduce the error

  1. Open the file attached. There is Image Texture node with red background color and name "Normal-Map-Will-Be-PALE" in the Node editor window. It is active and baking will happen on the image linked to it. There are 2 example meshes selected in the viewport window - highpoly first, lowpoly last. There is resulting normal map shown in the UV Image editor.
  2. As the selection is already present, press Bake. The resulting map should become the same as one provided (packed), too desaturated.
  3. In the Image Texture node below the red one create new image, link it to the node and bake to it. The result should turn out as usual normal map.

Related Objects

Mentioned Here
rBf4dc9f9d68bd: Fix T54360: FFMPEG bitrate not editable for all codecs

Event Timeline

Mr Zak (MrZak) created this task.Apr 19 2018, 7:03 PM
Philipp Oeser (lichtwerk) changed the task status from Unknown Status to Archived.Apr 23 2018, 1:06 PM
Philipp Oeser (lichtwerk) claimed this task.
Philipp Oeser (lichtwerk) added a subscriber: Philipp Oeser (lichtwerk).

Make sure you set your image up as Non-Color Data.
This way blender doesnt color-manage your image (which is required for baking correct normal maps)

Also see the manual.

Dont think there is a bug here...

Mr Zak (MrZak) added a comment.EditedApr 24 2018, 1:53 PM
In T54731#496278, @Philipp Oeser (lichtwerk) wrote:

Make sure you set your image up as Non-Color Data.

In any way - regardless of Color or Non-Color data - when I start baking normal map, especially with non-saved image or with saved one as well (up to certain amount of rebakes, often without anything happening like what is shown above) I don't get that behaviour:

or after saving image

From what I see this is an unexpected behaviour since it happens only sometimes and most often this won't happen if previewing normal map in sRGB color space as well. Or when saving image to some format with certain color space conversion the image should always be shown with changes that conversion caused if this is really something to expect. Anyway then it will happen always without any randomness.

Philipp Oeser (lichtwerk) added a comment.Apr 24 2018, 3:24 PM

Hm, there might be something going on here, but I am really not able to reproduce by baking myself (tried lots of times)

So even your example file always works for me when I unpack the image, change to non-color and rebake... always.

One thing that I do find a little strange is that blender is not able to generate a preview icon (the image datablock selector in the Image Editor)... but needs more investigation...

Mr Zak (MrZak) added a comment.EditedApr 24 2018, 5:47 PM

But if you don't change image to Non-Color before baking?

Thing is, I haven't really changed it to Non-Color since it was working just fine without that. I always change to Non-Color in the Image Texture node with the map but it's not related here at all as this is in the Node Editor.
I wanted consistency - if data changes that much that without Non-Color colors of the image will be less saturated then it should have changed always. Or not change at all.
So as I see my example isn't generating error except for my own machine. Nice to know.

Philipp Oeser (lichtwerk) changed the task status from Archived to Unknown Status.Apr 25 2018, 3:35 PM
Philipp Oeser (lichtwerk) lowered the priority of this task from 90 to Normal.

will do some further testing later, so this doesnt get lost

Brecht Van Lommel (brecht) changed the task status from Unknown Status to Unknown Status.Jun 26 2019, 6:00 PM
Brecht Van Lommel (brecht) added a subscriber: Brecht Van Lommel (brecht).

The setting on the node and the image was unified now, and using non-color for texture maps like this is required.