fSpy camera importer?

I have a project where I need to match the viewport camera with a picture and I found a software capable to do this task. The software it is called fSpy. The only issue, I don’t know how to import the resulting solution from fSpy into Rhino.

Hello, i create a definition with Grasshopper to use fspy result but the importer will be better

Can you share your definition?

Hello; you need some plugins and maybe you find a better way to read JSon file and extract informations, to create new camera and change background the 2 plugins are optional you can use other plugins and you can change background manually (in the script)


To read JSon file:
https://mathrioshka.ru/ghjson
And

To convert quaternion coordinates of the camera:

To align the camera:

To create new camera:
Heteroptera | Food4Rhino (This better)
Or
horster camera Control for Grasshopper | Food4Rhino
To change background when click with mouse on the view or Named views:
Parakeet | Food4Rhino


You get something like this; and fSpy is limited in some cases will not work properly with Rhino but work fine with Blender.

quaternion2.gh (35.8 KB)

1 Like

Thank you @anon39580149

Quite complex definition. I installed all the components but I think that I will need also a short how-to on how to make-it work if possible. :slight_smile:

The plugins are very useful not just for this definition.
Someone with expriencein programming can shorthand all this steps
The method is very simple
Setup Camera
-Setup your image in fSpy
-Save the file as JSon
-Import JSon file in the definition(from the first file path component)
-Go to Camera Crane component and right click on view input and choose Perspective and click the button (Refresh).
Change Wallpaper
-Go down to “Change wallpaper manually”
-Choose image file in the file path component
-Play with other settings
-Make sure that the view in camera crane is the same in change wallpaper.

Try this i make it simple

fSpy Camera.gh (31.9 KB)

4 Likes

I found this post in 2022, the content seems to be exactly what I need now, but Mathrioshka’s site is down…

Can anyone help me on this?

You can still download the plugins from the Food4Rhino website:

Prairie Dog | Food4Rhino

FUROBOT | Food4Rhino

There are other json file readers available.
Anyway i will try to update the script

Check this, you don’t need plugins except the one from Heteroptera

fSpy Camera.gh (21.4 KB)

And make sure you choose Focal length: 35mm in fspy

1 Like