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)
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. 
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.
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:
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
Does anyone still have ghJSON by mathrioshka?
I clicked the URL and it says ‘sorry, you have been blocked’. I tried the method with less plugins (the method mentioned by anon39580149), but it’s always a bit off…
Hi,
Many years back I requested Rhino be able to handle fspy files. I use Blender and fspy works easy without all the hassle. You could download blender there are many tutorials on how to use fspy with blender. Other nice thing in blender you can then model your objects or city etc. using camera projection so it works with video files not just stills.
Here’s a short I did from a video of Tokyo using fspy and blender.
RM
You can do it via this PYscript in rhino easily now ![]()
CC



