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:
To convert quaternion coordinates of the camera:
To align the camera:
To create new camera:
https://www.food4rhino.com/app/heteroptera (This better)
To change background when click with mouse on the view or Named views:
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 @seghierkhaled
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 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).
-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)