rawalanche Posted February 26, 2021 Share Posted February 26, 2021 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... Quote Link to comment Share on other sites More sharing options...
Mark Ingram Posted February 26, 2021 Share Posted February 26, 2021 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? Quote Link to comment Share on other sites More sharing options...
rawalanche Posted February 26, 2021 Author Share Posted February 26, 2021 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: And this is after opening it in AP, and doing nothing except pressing Ctrl+S: 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. Quote Link to comment Share on other sites More sharing options...
Mark Ingram Posted February 26, 2021 Share Posted February 26, 2021 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? Quote Link to comment Share on other sites More sharing options...
rawalanche Posted February 26, 2021 Author Share Posted February 26, 2021 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 Quote Link to comment Share on other sites More sharing options...
Mark Ingram Posted February 26, 2021 Share Posted February 26, 2021 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? Quote Link to comment Share on other sites More sharing options...
rawalanche Posted February 26, 2021 Author Share Posted February 26, 2021 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. Quote Link to comment Share on other sites More sharing options...
Mark Ingram Posted February 26, 2021 Share Posted February 26, 2021 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). If you're saying that subsequent edits that you make to the file after it's been opened (and assigned a profile) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.