Camera metadata in Karma render

   1391   10   1
User Avatar
Member
11 posts
Joined: Feb. 2019
Offline
Hi all,

Experimenting with XPU for production and was curious if anyone has found a way to bake in camera metadata and extract it in Nuke for compositing. We are traditionally a V-Ray house and V-Ray bakes in metadata that allows you to recreate the CG camera in Nuke. This is extremely handy because it cuts out the need to export an .abc/.usd/.fbx camera for each shot and is just self contained inside of the image sequence.

- Tom
User Avatar
Member
7770 posts
Joined: Sept. 2011
Offline
I thought the view matrix was baked in as metadata. Maybe that's just a mantra thing.
User Avatar
Member
127 posts
Joined: Jan. 2015
Offline
It's possible to add custom metadata that will be added to the exr, as long you use the improved exr driver.

I can try to make something with the python lop node when I have time and post here. Would be great to have this.
User Avatar
Member
10 posts
Joined: March 2020
Offline
Heileif
It's possible to add custom metadata that will be added to the exr, as long you use the improved exr driver.

I can try to make something with the python lop node when I have time and post here. Would be great to have this.

That would be fantastic - definitely something we love about V-Ray is the built in functionality of this. Very useful indeed.
User Avatar
Member
160 posts
Joined: Feb. 2016
Offline
It should already be there by default
WorldToCamera
and
WorldToNDC



edit:
But I guess you want the camera metadata such as f-stop/lens/filmback size/shutter length

edit 2:
What about just embedding the camera as a camera.usda?
Edited by AslakKS - Nov. 16, 2023 21:04:34

Attachments:
karma_camera-exr-metadata.png (298.8 KB)

User Avatar
Member
1621 posts
Joined: March 2009
Offline
There's a tutorial for adding arbitrary metadata to your exr outputs, check this out (note: you need to read the very bottom of the page, where it says "19.5 upgrade"):

https://noahhaehnel.com/blog/custom-metadata-in-solaris/ [noahhaehnel.com]
Martin Winkler
money man at Alarmstart Germany
User Avatar
Member
10 posts
Joined: March 2020
Offline
AslakKS
It should already be there by default
WorldToCamera
and
WorldToNDC

Image Not Found


edit:
But I guess you want the camera metadata such as f-stop/lens/filmback size/shutter length

edit 2:
What about just embedding the camera as a camera.usda?

Thanks guys! I'll look into this. Kicking the camera out as a USD would also work, having it as part of the EXR is nice to cut down on separate files but it would be easy enough to automatically load in the camera into a nuke script when you bring in the latest render.
User Avatar
Member
7770 posts
Joined: Sept. 2011
Offline
tomteller
Thanks guys! I'll look into this. Kicking the camera out as a USD would also work, having it as part of the EXR is nice to cut down on separate files but it would be easy enough to automatically load in the camera into a nuke script when you bring in the latest render.

How are you getting the camera into solaris? Can you import the same file into nuke, or was it created in Houdini?
User Avatar
Member
10 posts
Joined: March 2020
Offline
Sometimes it’s an abc from Maya but we are doing cameras more frequently directly in Houdini.
User Avatar
Member
127 posts
Joined: Jan. 2015
Offline
Could you upload a V-Ray exr example, with the camera metadata?
User Avatar
Member
10 posts
Joined: March 2020
Offline
Sure thing, please see attached (contains full passes + camera metadata). This is the script that we use in Nuke to extract the camera. https://gist.github.com/kpprt/cb07c3c196c5f4937bde6760b483dc82 [gist.github.com]

Attachments:
maelstrom_test_32_boat.0133.exr (8.8 MB)

  • Quick Links