Redshift Photographic Exposure macro

User avatar
Midgardsormr
Fusionator
Posts: 1270
Joined: Wed Nov 26, 2014 8:04 pm
Answers: 5
Location: Los Angeles, CA, USA
Been thanked: 106 times
Contact:

Redshift Photographic Exposure macro

#1

Post by Midgardsormr » Tue Aug 13, 2019 11:51 am

UPDATED!

For anybody who uses Redshift and has experimented with the Photographic Exposure settings in the camera, this macro attempts to replicate the same controls in comp. The math and interface design was provided by Redshift's Adrian Cruceru, who developed a similar tool for Nuke, with additional input from Saul Espinoza, who provided more tonemapping algorithms. This macro replicates the Nuke RsTonemapper gizmo to within a reasonable level of accuracy, and it also similarly matches Redshift's own render. It's not a 100% match, but it's pretty close, and most of the difference seems to be in the vignette.

Documentation and credits have been added, in addition to three more tone mapping methods: Filmic is based on John Hable's tonemap for the game Uncharted 2. Highlight Compression is a simple logarithmic squash of bright values, and Exponential Luma clamps the luminance while preserving hue.


Original post:
Spoiler
Show
For anybody who uses Redshift and has experimented with the Photographic Exposure settings in the camera, this macro attempts to replicate the same controls in comp. The math and interface design was provided by Redshift's Adrian Cruceru, who developed a similar tool for Nuke. This macro replicates the Nuke gizmo to within a reasonable level of accuracy, and it also similarly matches Redshift's own render. It's not a 100% match, but it's pretty close, and most of the difference seems to be in the vignette.

There's still a bit of documentation to be written into it, and I may look at some efficiency improvements before submitting to Reactor, but if you'd like to have some fun with it now, here it is! Feedback is welcome.
edit: Attachment and description updated.
You do not have the required permissions to view the files attached to this post.
Last edited by Midgardsormr on Thu Aug 15, 2019 12:07 pm, edited 1 time in total.

User avatar
bowserlm
Fusionista
Posts: 334
Joined: Sat Apr 28, 2018 3:44 pm
Been thanked: 6 times

Re: Redshift Photographic Exposure macro

#2

Post by bowserlm » Tue Aug 13, 2019 9:03 pm

I was just needing this the other day! I've got a render that was set up looking nice with a photographic exposure setting, but I'm compositing it multipass so I don't get the same beauty render exposure.

Is there something special you need in the flow? Trying to put it at the end of the comp and get a fail

https://cl.ly/57a6609c1451

User avatar
Midgardsormr
Fusionator
Posts: 1270
Joined: Wed Nov 26, 2014 8:04 pm
Answers: 5
Location: Los Angeles, CA, USA
Been thanked: 106 times
Contact:

Re: Redshift Photographic Exposure macro

#3

Post by Midgardsormr » Wed Aug 14, 2019 7:41 am

There seems to be a bug related to the metadata. Try putting a Copy Metadata node right before it and bring the meta in directly from your Loader. It seems to get corrupted somehow by going through a Merge (at least), but examining the sub-view doesn't reveal anything different. I hope to spend some time today narrowing it down so I can send a bug report to BMD.

Thanks!

User avatar
cognitiveconcepts
Posts: 1
Joined: Mon Jul 08, 2019 11:47 am

Re: Redshift Photographic Exposure macro

#4

Post by cognitiveconcepts » Wed Aug 14, 2019 1:06 pm

I've never used a Copy Metadata node. Doesn't seem to be working for me though. Maybe I'm doing something wrong?

User avatar
Midgardsormr
Fusionator
Posts: 1270
Joined: Wed Nov 26, 2014 8:04 pm
Answers: 5
Location: Los Angeles, CA, USA
Been thanked: 106 times
Contact:

Re: Redshift Photographic Exposure macro

#5

Post by Midgardsormr » Wed Aug 14, 2019 3:16 pm

Does the Use Metadata mode work when the tool is connected directly to a Loader? Was your renderer configured to output the Photographic Exposure metadata?

In order for the Use Metadata mode to work correctly, Photographic Exposure needs to be enabled in the camera, and both Enable PostFX and Apply to File Output also need to be turned on. In all AOVs that have such a switch, "Apply Color Processing" needs to be turned off. In this circumstance, you'll get a Beauty render with the Photographic Exposure baked in, but your Light Group and/or component (diffuse, reflect, refrac, etc) AOVs will be unaltered. You can then assemble a "back-to-beauty" composite using the components or light groups, and the RsPhotographicExposure node will use the metadata to create an image that will be reasonably close to the main beauty render.

As for Copy Metadata, it overwrites the metadata of the Background (yellow) input's image with that of the Metadata (green) input. Again, I don't know what's wrong with the meta that makes the copy necessary. As far as I can tell with the tools I have available, the tables are identical.

User avatar
Midgardsormr
Fusionator
Posts: 1270
Joined: Wed Nov 26, 2014 8:04 pm
Answers: 5
Location: Los Angeles, CA, USA
Been thanked: 106 times
Contact:

Re: Redshift Photographic Exposure macro

#6

Post by Midgardsormr » Wed Aug 14, 2019 5:04 pm

Aha! I have detected an issue. If the input image doesn't have the appropriate metadata at all, the macro will fail, even if the Use Metadata switch is off. I'll have a fix for that soonish. Probably not today, though.

User avatar
SirEdric
Fusionator
Posts: 1995
Joined: Tue Aug 05, 2014 10:04 am
Answers: 4
Real name: Eric Westphal
Been thanked: 146 times
Contact:

Re: Redshift Photographic Exposure macro

#7

Post by SirEdric » Wed Aug 14, 2019 9:28 pm

A nasty hackaround for missing metadata in macros can be found in this one:
viewtopic.php?f=6&t=3213
Maybe that helps a bit?

User avatar
Midgardsormr
Fusionator
Posts: 1270
Joined: Wed Nov 26, 2014 8:04 pm
Answers: 5
Location: Los Angeles, CA, USA
Been thanked: 106 times
Contact:

Re: Redshift Photographic Exposure macro

#8

Post by Midgardsormr » Thu Aug 15, 2019 7:20 am

Yes, it does!

User avatar
Midgardsormr
Fusionator
Posts: 1270
Joined: Wed Nov 26, 2014 8:04 pm
Answers: 5
Location: Los Angeles, CA, USA
Been thanked: 106 times
Contact:

Re: Redshift Photographic Exposure macro

#9

Post by Midgardsormr » Thu Aug 15, 2019 12:11 pm

I squashed the metadata bug(s) and improved the performance a little. I've also added three additional tone-mapping methods and a Documentation tab. In addition, there are credits for the various bits and pieces in the Comments tab, if you feel like diving into the original work at all.

If you tried it before, could you please download the new version and try again? I'm hoping you won't run into any further difficulty. If it all seems good, I'll submit to Reactor and the Redshift forums.

User avatar
bowserlm
Fusionista
Posts: 334
Joined: Sat Apr 28, 2018 3:44 pm
Been thanked: 6 times

Re: Redshift Photographic Exposure macro

#10

Post by bowserlm » Fri Aug 16, 2019 2:27 am

Works great! Awesome tool!