Match background orientation between cameras?

   1905   3   1
User Avatar
Member
64 posts
Joined: March 2017
Offline
I have two HIP files with animated cameras. I need the background (environment light with HDR map) orientation to match on a particular frame. It seems simple, but it's giving me trouble.

Put another way, I need to get the world-space orientation of Camera-A and Background-A, find the angular difference between the two, then rotate Background-B by that angle/axis relative to Camera-B.

It seems like there should be a VEX or VOPS way to do this, but quats and matrixes aren't my strong point. Also, note that the cameras are children of animated hierarchies, so I can't directly grab the euler rotation values. Any help?

Thanks!
User Avatar
Member
20 posts
Joined: June 2012
Offline
Is this at obj level? If I'm understanding correctly, cant you just parent the nodes whose orientation you want to match under the nodes whose orientation you want to copy at that particular frame? If keep position while parenting is turned off, the orientations should then allign and you can unparent afterwards with ‘keep position while parenting’ back on.
https://www.richlord.com/ [www.richlord.com]
User Avatar
Member
64 posts
Joined: March 2017
Offline
Sorry for the delay in responding and thank you for the suggestion. It's possible that I'm not understanding the suggestion, but I don't think this is what I'm looking for.

I need to copy just the offset between camera-A and background-A onto camera-B:background-B. Here's an example with fake eulerXYZ rotations (for simplicity):

if
Background-A = {0,0,0}
Camera-A = {45,0,0}

and
Camera-B = {100,0,0}

then
Background-B = {145,0,0}

The offset between Camera-A and Background-A is 45 degrees in X. To make camera-B's background match, I'd have to rotate background-B 145 degrees in X.

The thing that makes this complicated for me, is that the cameras are linked to a series of nulls, so I have to get the world-space orientations, rather than just grab channel values directly.
User Avatar
Member
64 posts
Joined: March 2017
Offline
rich_lord, your suggestion is working for me after all. It just took a bit for me to understand. Thanks again!

Here's the procedure:

1 - Go to Frame Number where match will take place
2 - Create Null and check “Keep Position When Parenting”
3 - Link BG-1 (BG to be matched) to null
4 - link null to camera-1 (view to be matched)
5 - uncheck “Keep Position when Parenting” on null
6 - relink null to camera-2

It would still be nice to have a more programmatic way of doing this.
  • Quick Links