Psyop / CryptomatteArnold

Cryptomatte for Arnold
BSD 3-Clause "New" or "Revised" License
56 stars 19 forks source link

Omitting preview channels from EXRs is done problematically #1

Closed jonahfriedman closed 6 years ago

jonahfriedman commented 6 years ago

It's an issue when there's both a display driver and an EXR driver enabled, because the display driver should show the preview channels but the exr driver should not. It would be much better to switch out the AOV being rendered for a dummy one, so that the data is still available for use in the display driver.

jonahfriedman commented 6 years ago

So here's something that didn't work: when creating the new outputs, remove the preview AOVs. Problem was it caused crashes and all sorts of weird inconsistent behavior.

I know replacing filters on the fly works, so I think the next thing to try is disabling those preview AOVs by having a filter do the work.

jonahfriedman commented 6 years ago

This is fixed and will be in the 1.1 release.

peterhorvath-sa commented 6 years ago

I've tested the fix in C4DtoA and the preview AOVs now work in the display driver (Picture Viewer and IPR) as expected. There's a minor thing though, I've noticed. The shader gives these warnings when rendering:

C4DtoA | 00:00:00 800MB WARNING| /_display_driver_: could not read BOOL parameter "half_precision" C4DtoA | 00:00:00 801MB WARNING| Cryptomatte: Can only write Cryptomatte to EXR files.

Question: Why don't you add separate AOVs for the previews? Like:

I think it's cleaner and more obvious for the users. Also this way the 'Do preview channels in EXR files' checkbox would not be necessary since the previews are just a matter of AOV setup.

jonahfriedman commented 6 years ago

Hello @peterhorvath-sa,

Thank you for helping test that. I'll fix those two warnings (and reopening as a result).

For the separate AOVs for previews, I suppose that is an option. The workflow then becomes something like - enable crypto_object and if you want to confirm that it's working, look at crypto_object_preview. It has advantages, but that said, I'm not a huge fan.

For one thing, the preview AOVs are deprecated and are only still there because various tutorials and docs say to look for them to confirm it's working, and I wanted to preserve that appearance for users. This would also invalidate those tutorials. It also would also raise the question - if crypto_object is not enabled but crypto_object_preview is, should that count as not being set up correctly and therefore not render?

I think my inclination is currently to go with the fix I have.

jonahfriedman commented 6 years ago

I've fixed those two issues.

By the way, I've decided to keep the master branch clean and backed it up to 1.0.0. The dev branch contains the newest changes.

jonahfriedman commented 6 years ago

1.1.0 is released.