Rendering EXR with DWAA compression

So at some point Vray quietly began supporting EXR 2.2 with DWAA compression. I just stumbled upon it while doing some research into mipmap conversion, and holy cow! It does an amazing job at reducing file size!

I’d like to learn more about how it works with multi-channel EXR files with all the various render elements, including how it works with the vray denoiser. Are there any issues to be aware of when using it? What would be the case where it would be better to use DWAB instead?

Some further questions to get the ball rolling:

I hear there can be issues with RE names and how they are compressed based on their names.

Lossy Channel names:
R, G, B, Y, RY, BY (capital channel names are required)

RLE compressed:
A

Zip compressed - All other channel names not fitting the above:
Red, red, r, Green, green, g, Blue, blue, b, x, y, z, U, u, V, v, etc…

So if a RE is named XYZ (say for point world) then Y will get lossy compression which can mess things up since it needs to be lossless. I imagine the guys and gals at Chaos Group are aware of this, but just wanted to ask. :slight_smile:

Yes, we are aware of the Y vs y issue; it is possible to tell the DWA compressor to use different rules and leave the Y channel uncompressed and I hope we can look into it soon.

Best regards,
Vlado

Thanks Vlado. I’m wondering too about the reverse happening… say for example we have a reflection or specular or lighting RE which should get lossy compression, would it actually get ZIP instead because of the name in a multi-channel EXR where it is called “reflection” as opposed to writing the RE into separate files where the file is then named image_reflection.exr but the channels are then named RGB?

It will be fine. The DWA compressor looks at the suffix of each channel, and we name them reflection.R, reflection.G, reflection.B so it will correctly recognize those as lossy channels and will compress them.

Best regards,
Vlado

Good to know. Is there an option to adjust the DWA* compression level? I don’t see it in the Render Settings OpenEXR options…

I’m hoping that if there is no GUI option to change the DWA compression level currently, that I could set the Vray attribute for this using mel. Sort of like this
setAttr vraySettings.Whatever_the_DWA_level_parameter_is_called 100;

just need to know what that would be.

Currently there is no dedicated GUI option. You can set DWA compression level by adding an extra EXR attribute dwaCompressionLevel, for example dwaCompressionLevel=40.0
Of course, you could also use
setAttr -type “string” vraySettings.imgOpt_exr_attributes “dwaCompressionLevel=40.0”;

Note that you should use decimal point in order to export floating point attribute. Without a decimal point dwaCompressionLevel will be an integer attribute and OpenEXR will ignore it.

Ah yes, I see there is a field for “extra attributes” where I can put the dwaCompressionLevel=40.0. Perfect.
Thanks so much Vasil!

In the latest nightly builds, the “.Y” channels should be properly saved with DWA compression now.

Best regards,
Vlado

can we somehow not compress point channels with dwaa ?