Fspy and camera matching

   5149   5   1
User Avatar
Member
63 posts
Joined: 9月 2014
Offline
Has anyone found a direct way to get the Fspy camera matching to houdini without going through blender? Or are there any other programs out there that do camera matching on a single image that work directly with houdini?
User Avatar
Member
833 posts
Joined: 1月 2018
Offline
Can you just type in the Fspy parameters to Houdini's camera manually?

I touch on using Fspy on a couple of my tutorial videos such as the one below. I sent a message a while back to the SideFX LABS team since I think this is totally something they should tackle.

https://youtu.be/xgh5Vg3hqwI [youtu.be]
>>Kays
For my Houdini tutorials and more visit:
https://www.youtube.com/c/RightBrainedTutorials [www.youtube.com]
User Avatar
Member
63 posts
Joined: 9月 2014
Offline
As far as I could tell FSpy only lists axis rotation and quarter ions. Houdini’s camera seems to only take Euler rotations. I thought about making something to do it semi automatically the the files that FSpy create are not in plain text. I also thought this would be a great tool from Labs but didn’t know the beat way to approach that.
User Avatar
Member
44 posts
Joined: 5月 2017
Offline
the new dictionary data type from houdini 18.5 is a way of getting the data in. Did a quick test and it seems to be working (altho it seems to read the matrix data in as a string array). Based on the test scene it seems to come in correctly, but unfortunately i dont know much about fspy to verify which way the transform orders are or the up axis specifications.
User Avatar
Member
44 posts
Joined: 5月 2017
Offline
a quick test file attached. if you export the camera parameters as a JSON file from fspy and paste the text into the JSON copy field on the asset, you can test if it does whats expected. Thats based on the example file that comes with fspy.

Attachments:
fspy_02.hip (221.9 KB)

User Avatar
Member
1 posts
Joined: 2月 2021
Offline
Hey!
I found a sort of solution that works. You can convert to Euler pretty simply. All you need is to multiply the rotation axis's by your angle. For example;

x = -0.12465106576367925 * 71.65117990678947
y = 0.9799695259453202 * 71.65117990678947
z = 0.15531207300942002 * 71.65117990678947

Now it's converted to Euler!
  • Quick Links