Jump to content

Recommended Posts

Posted

Hi,

I have a 3D rendered image saved as a floating point EXR. When I convert it to 8-bit or 16-bit in Affinity Photo, I get nasty image artifacts. Please check the screenshot below.

If you need it, I can send the EXR file to Affinity support staff privately.

exr_convert_to_8-bit.thumb.jpg.6455f7b7306662f78cb8fa99ad57e731.jpg

Aleksandar Mitov
www.renarvisuals.com CGI and 3D rendering services
email: office@renarvisuals.com

Affinity Photo 2.6.0  Windows 10 Pro x64 ver. 22H2  AMD Ryzen 9950X 16-core + 96 GB DDR5  GeForce RTX 5090 32GB + driver 572.83

Posted

I would check for out of bounds values (RGBA channels), meaning above 1.0.

Use the histogram and set the max value higher than 1 (e.g. 2, 4, 10) to spot if those exists.

You can use a channels mixer filter to show them visually.

 

Another possible cause is HW acceleration. Please  try to deactivate OpenCL / Metal Compute

 

If you can share an example file (a sample cropped region would be enough, in RGB/32) i can probably provide some filters / adjustment to identify those areas, and correct them automatically. 
 

Of course, you can wait for moderators to provide an upload link, this might take a bit longer than help from users.

Mac mini M1 A2348 | MBP M3 

Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.

 

Posted

Thanks for the suggestions, @NotMyFault. I don't have hardware acceleration enabled. Please find attached a cropped version of the EXR. Please note that this issue appears with every 3D rendered EXR image that I've tested so far.

exr2_cropped.exr

Aleksandar Mitov
www.renarvisuals.com CGI and 3D rendering services
email: office@renarvisuals.com

Affinity Photo 2.6.0  Windows 10 Pro x64 ver. 22H2  AMD Ryzen 9950X 16-core + 96 GB DDR5  GeForce RTX 5090 32GB + driver 572.83

Posted (edited)

Thanks for the file. 

Unfortunately I can't reproduce the issue on my Mac or iPad. The file looks totally fine, all values are in the proper range for SDR images.

Can you share the exact steps you are doing to convert the images ? A screen recording would be best, or a few screenshots.

Please include some tools (view>studio) like

  • 32 bit preview,
  • info panel with a color sampler positioned to the problematic pixels,
  • histogram,
  • Your OCIO config (which OCIO version are you using? What parameters set in preferences for OCIO?)

Another difference: your screenshot shows RGBA combined, the file I opened shows them as separate layers. How did you transfer the A information to the RGBA layer? 

Update: I know have setup OCIO, this automatically combines the RGB+A to RGBA which answers my former question.

70055603_Screenshot2022-04-02at17_11_48.png.f1aeec347c71507ebcc3b05d04fc4469.png

It makes a big difference if you do this step in RGB/32 (linear) or RGB/8 (gamma), as long as it stays a pixel layer it would undergo a gamma correction (which might be unwanted).

 

Screenshot 2022-04-02 at 14.44.25.png

Edited by NotMyFault
switched to OCIO on my side to have better matching configuration

Mac mini M1 A2348 | MBP M3 

Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.

 

Posted

I have seen you reporting other rendering issues before which where difficult to reproduce, e.g. https://forum.affinity.serif.com/index.php?/topic/133004-flattening-a-document-containing-specific-filters-causes-square-artifacts/&tab=comments#comment-733445

 

There is I chance that the issues are related to the actual hardware you are using. Do you have any chance to install Affinity on a different PC (without exotic hardware) to check if the issue occurs there, too?

A screenshot of Performance settings might help, too.

Mac mini M1 A2348 | MBP M3 

Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.

 

Posted

I can confirm I get the same issues when directly exporting from RGB/32 to PNG in RGB/8 while OCIO is active.

The resulting document shows transparent pixels.

exr2_cropped-8.png.7e02b25a91940c850e91b5943b555382.png

If I convert the document to RGB/8 and then export PNG (using same settings as before), exported file is ok.

exr2_cropped-8b.png.efb36082eadbacf024157c6f5b7279f3.png

 

Mac mini M1 A2348 | MBP M3 

Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.

 

Posted

I'm not able to record my screen currently, but I don't do anything out of the ordinary. I just open the EXR file and convert it to 8 or 16 bit. Please note that I have the following options enabled in settings (see below). Maybe try again with these turned on and you will see the bug. If you don't, it's probably because you're on a Mac and I'm on a Windows PC. The Windows and Mac versions of Affinity Photo are not exactly the same so it very well might be that the Mac version of Photo doesn't have this bug. I will try to record my screen when I have some free time.

EXR_settings.png.4975225a5e62497c578b280441a89bc7.png

Aleksandar Mitov
www.renarvisuals.com CGI and 3D rendering services
email: office@renarvisuals.com

Affinity Photo 2.6.0  Windows 10 Pro x64 ver. 22H2  AMD Ryzen 9950X 16-core + 96 GB DDR5  GeForce RTX 5090 32GB + driver 572.83

Posted
10 minutes ago, NotMyFault said:

I can confirm I get the same issues when directly exporting from RGB/32 to PNG in RGB/8 while OCIO is active.

 

 

Interesting. So what do I need to do to not get this problem? Disable OCIO? How do I do that?

Aleksandar Mitov
www.renarvisuals.com CGI and 3D rendering services
email: office@renarvisuals.com

Affinity Photo 2.6.0  Windows 10 Pro x64 ver. 22H2  AMD Ryzen 9950X 16-core + 96 GB DDR5  GeForce RTX 5090 32GB + driver 572.83

Posted

The cause is a wrong value on alpha channel. It is larger than 1.

I use a PT filter ant take (A-1) which must be 0, and multiply it by powers of 2. 

Soon you start to see that A is a bit larger than 1.

To rectify the issue, you can use a pt filter with formula A=min(A,1) to correct the wrong values within the exr file.

The issue might be caused by using OCIO and (minimal but important) rounding issues.

Normally LUTs like OCIO should not impact alpha channel, and that they do is actually a bug in my perspective.

Never the less, it can be "healed" with that simple PT filter.

 

Screenshot 2022-04-02 at 17.27.27.png

Mac mini M1 A2348 | MBP M3 

Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.

 

Posted

Here the same file as above, with a corrective PT filter in the middle of the layer stack.

A channel is mapped to RGB to make the issue visible.

The PNG export is correct even when exported directly from RGB/32.

Screenshot 2022-04-02 at 17.32.53.png

Mac mini M1 A2348 | MBP M3 

Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.

 

Posted

So I gather this is a bug, yes? Hopefully the Affinity technical team can chime in to confirm.

Aleksandar Mitov
www.renarvisuals.com CGI and 3D rendering services
email: office@renarvisuals.com

Affinity Photo 2.6.0  Windows 10 Pro x64 ver. 22H2  AMD Ryzen 9950X 16-core + 96 GB DDR5  GeForce RTX 5090 32GB + driver 572.83

Posted
5 minutes ago, Alex_M said:

So I gather this is a bug, yes? Hopefully the Affinity technical team can chime in to confirm.

+1.

Find the file with the corrective PT filter below for your convenience. You can save this as preset, or directly copy the layer into all other files until Affinity finds and fixes this bug in about 200 million years. ;-)

 

I wouldn't reject if you plan to give me a like or champ for volunteering to spend 1 hour investigating the issue, providing a simple and functional workaround, finding the root cause (which proves my initial assumption of out of bounds values).

One more example where Affinity stumbles with correct handling of the alpha channel.

exr2_cropped_bug_and_fix.afphoto

Mac mini M1 A2348 | MBP M3 

Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.

 

Posted

Additional comment about what causes the bug:

the too high alpha value is present in you exr file, and not caused by Affinity. So the bug on Affinity is only inconsistent handling of out-of-bounds alpha values. When converting to RGB/8, there are capped at 1.0 automatically. Unfortunately, when exporting from RGB/32 to png (which must convert  RGB/8 or RGB/16 as PNG does not support higher bit depth) alpha is not handled properly and maybe causing an overflow, the values in PNG result in 0. This happens only if OCIO is active.

I cannot say if the OCIO version plays any role in this bug. 

I would rate this as minor bug, as it is totally easy to clip alpha with one filter. You should check the parameters of the tool producing the exr files, possibly there is an option to limit alpha channel to 1.0 which would avoid the issue directly on the source side.
 

 

 

Mac mini M1 A2348 | MBP M3 

Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.

 

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.