Jump to content
You must now use your email address to sign in [click for more info] ×

Affinity Photo destroys normal maps


Recommended Posts

Hi,

I've thought I can rely on AP even for tasks related to game development and 3D computer graphics, but it does not seem to be the case at all. Today I've had a trivial need to flip a green channel of a normal map, so I proceeded to do that in AP, but as soon as the normal map PNG file got saved, it was completely destroyed because instead of respecting the image's color space, AP just slapped the sRGB correction on top of it. 

In the "Convert format/ICC Profile" window, there are numerous sensorimetric color management profiles, but there's no simple linear RGB option, nor is there any linear option in the PNG export dialog, even in the advanced settings hidden under "More..."

This straight up means it's just impossible to use AP to edit any PNG normal map, ever...

Link to comment
Share on other sites

29 minutes ago, rawalanche said:

Hi,

I've thought I can rely on AP even for tasks related to game development and 3D computer graphics, but it does not seem to be the case at all. Today I've had a trivial need to flip a green channel of a normal map, so I proceeded to do that in AP, but as soon as the normal map PNG file got saved, it was completely destroyed because instead of respecting the image's color space, AP just slapped the sRGB correction on top of it. 

In the "Convert format/ICC Profile" window, there are numerous sensorimetric color management profiles, but there's no simple linear RGB option, nor is there any linear option in the PNG export dialog, even in the advanced settings hidden under "More..."

This straight up means it's just impossible to use AP to edit any PNG normal map, ever...

Did the source image have a linear sRGB colour profile?

Link to comment
Share on other sites

Just now, Mark Ingram said:

Did the source image have a linear sRGB colour profile?

There's no "linear sRGB" profile. There's either linear or sRGB :)

The source had linear color profile, the saved version had sRGB:

This is before opening a normal map in AP:

Before.jpg.f12392ff8571d6d93658e53f09607ab4.jpg

And this is after opening it in AP, and doing nothing except pressing Ctrl+S:

After.jpg.cd0e17301636f96e910f9fbf387fecbe.jpg

Same happens also when you export the PNG through export dialog. AP will just slap the sRGB on anything, regardless of if you want it or not, and there's no way to prevent that from what I know.

 

Link to comment
Share on other sites

21 minutes ago, rawalanche said:

There's no "linear sRGB" profile. There's either linear or sRGB :)

That's why I was a little confused by your comment in the original post - "but there's no simple linear RGB option". There is Linear scRGB, and PNG does allow 16-bit per channel (in all 4 channels). So I was wondering whether you were importing a 64-bit image. 

When you say "The source had linear color profile", which profile was it using? Could you attach the source image (the normal map) so I can replicate the behaviour?

Link to comment
Share on other sites

11 minutes ago, Mark Ingram said:

That's why I was a little confused by your comment in the original post - "but there's no simple linear RGB option". There is Linear scRGB, and PNG does allow 16-bit per channel (in all 4 channels). So I was wondering whether you were importing a 64-bit image. 

When you say "The source had linear color profile", which profile was it using? Could you attach the source image (the normal map) so I can replicate the behaviour?

Yes, I wrote "linear RGB", not "linear sRGB". That's a difference, since the former makes sense, the latter does not :)

I am attaching one example texture for a test.

Rock_Floating_02_Normal.zip

Link to comment
Share on other sites

16 minutes ago, rawalanche said:

Yes, I wrote "linear RGB", not "linear sRGB". That's a difference, since the former makes sense, the latter does not :)

I am attaching one example texture for a test.

Rock_Floating_02_Normal.zip 17.99 MB · 0 downloads

Thanks, the PNG contains no colour profile at all, so we assign sRGB during load. This is the same behaviour as Photoshop. 

After export from Affinity Photo, what behaviour are you seeing in your other software, and what are you expecting?

Link to comment
Share on other sites

40 minutes ago, Mark Ingram said:

Thanks, the PNG contains no colour profile at all, so we assign sRGB during load. This is the same behaviour as Photoshop. 

After export from Affinity Photo, what behaviour are you seeing in your other software, and what are you expecting?

I am expecting at least some ability to determine if I want to assign sRGB during save or export. There's a difference between sRGB view transform and actually modifying the image data. AP does the latter. I should be able to either use sRGB only as view transform, and not actually bake it into the image data, or have ability to counter/remove the sRGB which was automatically added on file open when saving or exporting the file.

Link to comment
Share on other sites

17 minutes ago, rawalanche said:

I am expecting at least some ability to determine if I want to assign sRGB during save or export. There's a difference between sRGB view transform and actually modifying the image data. AP does the latter. I should be able to either use sRGB only as view transform, and not actually bake it into the image data, or have ability to counter/remove the sRGB which was automatically added on file open when saving or exporting the file.

We don't modify the pixel data on load, but we do use a document's colour profile (which for a PNG with no colour profile, will be sRGB) to convert the document colours (at render time) to your assigned monitor profile (e.g. if you have a wide colour gamut monitor). The same applies to colours that are shown in the pickers in the user interface. They are converted from document to monitor colour space. 

It sounds like you want us to treat a PNG with no colour profile as if it's in a linear colour space. The only way to work in a linear colour space in Affinity Photo is to work in 32-bit.

As we have the same behaviour as Photoshop in this regard, I'm interested to know what software you may have been using previously to make edits to your normal maps (that treated the colours as linear)?

Also, you can export a PNG from Affinity Photo with no ICC profile (and no metadata). You can use the settings below to export a PNG, then open it up in a hex editor to confirm that no ICC profile has been assigned, or embedded, or specified in metadata. On top of that, I made several images in Photoshop, exported them with no ICC Profile, opened in Affinity Photo, exported as PNG again (using the settings below), and then re-opened in Photoshop, and confirmed that the pixel values were the same (to do that, place the images on layers above each other, and apply a difference blend mode to the top layer).

 image.png

 

If you're saying that subsequent edits that you make to the file after it's been opened (and assigned a profile) 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.