In Maya for correct color management, I recommend to add these lines to the python script: 1. after this line: cmds.setAttr(image_plane+'.depth',imagePlane_depth) add: cmds.setAttr(image_plane+'.colorSpace', 'sRGB', type='string') cmds.setAttr(image_plane+'.ignoreColorSpaceFileRules', 1) 2. after this line: cmds.setAttr(projection_fileNode+'.fileTextureName',image_path,type='string') add: cmds.setAttr(projection_fileNode+'.ignoreColorSpaceFileRules', 1) cmds.setAttr(projection_fileNode+'.colorSpace', 'sRGB', type='string') Cheers, D
Thanks for the script. When I press "Create Camera", I get the following error? "# Error: AttributeError: file C:/.../maya/scripts\kb_fSpy_camera_maya.py line 16: type object 'int' has no attribute 'from_bytes' # "
To everyone that is struggling to get an accurate result: It is very important that you set the correct focal length, otherwise the scene can differ by several units and also be misaligned/tilted
Glad it worked for you. To my knowledge, there is no native fSpy export to Maya. Trying to copy and paste the values from fSpy directly to Maya would never work due to it requiring some math to convert it to properly.
I can confirm that this works in Maya 2024, however to anyone who is not used to using custom scripts, make sure to click the MEL button right before the script command prompt line to switch it to Python. I was wondering why this wasn't running for 10 to 20 minutes until I decided to look up "Using Custom Scripts" and had another tutorial highlighting that Python (not MEL) needs to be enabled.
Thank you so much for this! It worked fine mostly, the only issue I had was the camera and the image plane got imported far away from the base point, but I was able to just move it closer towards my scene and rearrange it a bit and the perspective was still nicely in place.
I'm glad it you found it helpful. At 2:30 in the video, I covered how to get your origin point set where you want. Are you saying you did this and it didn't work?
@@murray-xr7pl It appears like I may be missing an attribute related to the principal point from fspy that isn't translating correctly to Maya. I'm currently trying to figure out what's missing.
Hi, first of, thank you for the plugin, however theres an error with the import script! Running the original returns this error: Error: ModuleNotFoundError: file line 1: No module named 'kb_fSpy_camera_maya' I fixed it with this import code: import kb_maya_fSpy_camera as fSpyCam fSpyCam.fSpyCameraImporter_UI() I'm leaving this comment here for anyone having issues running this, cheers
@@sarcasmenul if you want to give funds to anyone, you should support the creator of fSpy. The software is awesome. I simply figured out how to make a bridge into maya.
Had issues with my image, perhaps because it is portrait (Taller than wide). fSpy outputted a focal length of 22.25, however it did not look correct. Turning it down in Maya to 14.85 gave the correct result. This so happened to be 2/3 of fSpy's value which was the device aspect ratio for my image (980x1470 => 0.667). So perhaps fSpy doesn't factor this in where it should.
I've noticed some issues with portrait images, but I believe that may be due to my Maya script and not fSpy. It's something I've been meaning to look into further but have not had the time unfortunately.
@@KurtBernardin The incorrect focal length value is visible in fSpy before I've even used the script. No worries, at least a note is here for those curious
Hi Kurt, thank you for creating this tool! I just tried 2 different images. They are fairly close but definitely not accurate enough compared to what I'm seeing in Fspy, they both have wider angles of view. Do you have any thoughts as to why this would happen?
UPDATE: I got it working, The issue comes into play when you use the 'from 3rd vanishing point' option as your principal point, Every tweak I made with the Z axis points would skew the 3d guide greatly, the littlest adjustment would throw things off. The approach that worked for me was using the 'image midpoint ' principle point, especially if your Y axis has very little perspective change from top to bottom.
@@maxlazzarin8417 I'm glad you brought this up. I recall seeing this same issue related when image midpoint is not used and was unable to find the best approach to translate this into the auto shader that gets generated. I would love to hear if you end up figuring out something I missed!
Thanks for the video! I do have trouble when importing into Maya, camera just doesn't match and that midpoint is off as well. However works great in blender (same file). Any clue where it needs extra care when it comes to maya (....as always). In fact when I export from Blender to Maya it also works so not sure. Cheers!
It's possible I missed a few key variables to make it transfer 1 to 1. I've noticed a few little issues that leads to this not always working. I'll have to take a look to see if I forgot to include the midpoint and try to figure out how to input that into the maya camera.
@@KurtBernardin Other times importing camera from Blender to maya doesn't really work either. But I think I found a solution that works, however it might need some further testing. Here’s how I fixed it: 1. Use the Angle Number from fSpy: Find the angle number under "Camera Orientation" in fSpy. 2. Set the Film Aspect Ratio in Maya: Input this angle number in Maya under the "Film Aspect Ratio" setting (in the camera's attributes that you import from Blender). 3. Adjust Fit Resolution Gate: In Maya, tweak the "Fit Resolution Gate" setting. For me, "Overscan" usually works best. Hope this helps someone!
Hey bro, nice tutorial but Im having some Error on the script , it show "# Error: ModuleNotFoundError: file line 1: No module named 'kb_fSpy_camera_maya'" . It used to be working fine ytd but it just error today . Anyway for me to fix it ?
That error means it can’t find the script. Is the script still located within the scripts folder? Is the file still named the same or did it get renamed? What’s the command that you’re running?
@@KurtBernardin the file all stay the same localtion (C:\Users\RUDY\Documents\maya\2023\script) and named the same from my last use. I tried download and replaced the script but still the same error. I install it be following your instruct , I think it is correct cause it works fine ytd .
@@rudy020494 is the following two lines what you're running through python?: import kb_fSpy_camera_maya as fSpyCam fSpyCam.fSpyCameraImporter_UI() The very first line is what's importing the code, your error says it can't find it.
@@KurtBernardin Yes I run the same python lines but no worries, It work fine now,. I solved it by relocal to other folder (C:\Users\RUDY\Documents\maya\2023\prefs\scripts) . working great ! Thanks for you reply and the script !
Hi Kurt, Can you provide some steps to install the fspy plufgin in maya ? I am trying the same procedure that one uses to install the plugin in maya but it is not opening after I add it to the shelf. I am using Maya 2022
Hello Shivesh, the typical default place on your computer would be a maya folder within your documents, mine looks like this C:\Users\KurtB\Documents\maya. From here you can make a "scripts" folder and place the .py file in this folder. Alternatively, you can open the "2022/scripts" folder and place it there. The difference between the two is having scripts dedicated to a version number vs being useable for multiple versions. Folders would look like either of these: C:\Users\KurtB\Documents\maya\scripts C:\Users\KurtB\Documents\maya\2022\scripts Lastly, you should be able to run this Python code within the script editor: import kb_fSpy_camera_maya as fSpyCam fSpyCam.fSpyCameraImporter_UI() If anything isn't correct, it should give you some sort of error message in the script editor.
This software is used to line-up a single image. I suppose you could line-up multiple individual images, but you would have to match those cameras to one another manually.
hey i dont get any problem while importing scripts but the only problem i faced is the camera i imported is far away from the grid and when i started blocking it overlap the reference picture and half of the overlap mesh hide.please tell me the solution for it , btw great video it helped a lot.
I just tried it, but it didn't work for my case. I'm not sure if there is something wrong with my photo, but I keep running into a similar problem. I'd love to troubleshoot it with you and see if a solution could be found, or at least an explanation...
I wouldn't say I went too deep of an explanation into how fSpy works. This video is more of a brief overview. For a more in-depth understanding of fSpy, take a look at @bpampuch tutorial here: ua-cam.com/video/daiMOYR8GS8/v-deo.html
@Kurt B I've seen that video already and followed it closely when I did my fSpy Scene... I've also reached out to it's author on BlenderArtists.org and you can check out my post there too - I'd appreciate your input. blenderartists.org/t/complete-fspy-tutorial-all-options-explained/1394133/7
Hello! I open your script window and press the Create Camera and I get the following warning message. # Error: AttributeError: file C:/Users/MYNAME/Documents/maya/2020/scripts\kb+fSpy_camera_maya.py line 16: type object 'int' has no attribute 'from_bytes' How can I overcome this problem? 😢 I'm using Maya2020.4
I don't think I ever tested this script with Maya 2020. It's possible that it does not work for that reason. Maya updated to python 3 on version 2022 I believe. I don't currently have 2020 installed so I'll have to install and test when I have time.
@@KurtBernardin I think 2020 version probably shouldn't because it's before Python 3. But if you can test it, I'd really appreciate it if you could test it once! THX!
@@KurtBernardin for syntheyes we dont need any script we just have to export maya asci file from syntheyes and import it to maya ,the camera and the image is placed just like we arranged in syntheyes
Hello, the typical default place on your computer would be a maya folder within your documents, mine looks like this C:\Users\KurtB\Documents\maya. From here you can make a "scripts" folder and place the .py file in this folder. Alternatively, you can open the "2022/scripts" folder and place it there. The difference between the two is having scripts dedicated to a version number vs being useable for multiple versions. Folders would look like either of these: C:\Users\KurtB\Documents\maya\scripts C:\Users\KurtB\Documents\maya\2022\scripts Lastly, you should be able to run this Python code within the script editor: import kb_fSpy_camera_maya as fSpyCam fSpyCam.fSpyCameraImporter_UI()
Hi there, It's not working in Maya 2022.3 file -f -new; // untitled // // Warning: file: C:/Program Files/Autodesk/Maya2022/scripts/others/pluginWin.mel line 934: No initializePlugin() function //
In Maya for correct color management, I recommend to add these lines to the python script:
1. after this line: cmds.setAttr(image_plane+'.depth',imagePlane_depth)
add:
cmds.setAttr(image_plane+'.colorSpace', 'sRGB', type='string')
cmds.setAttr(image_plane+'.ignoreColorSpaceFileRules', 1)
2. after this line: cmds.setAttr(projection_fileNode+'.fileTextureName',image_path,type='string')
add:
cmds.setAttr(projection_fileNode+'.ignoreColorSpaceFileRules', 1)
cmds.setAttr(projection_fileNode+'.colorSpace', 'sRGB', type='string')
Cheers, D
@ddankhazi Thank you for this! I didn't even think about color settings when I set this up. I went ahead and updated the script with this code.
Thanks for the script. When I press "Create Camera", I get the following error?
"# Error: AttributeError: file C:/.../maya/scripts\kb_fSpy_camera_maya.py line 16: type object 'int' has no attribute 'from_bytes' # "
To everyone that is struggling to get an accurate result: It is very important that you set the correct focal length, otherwise the scene can differ by several units and also be misaligned/tilted
Worked like a charm! No more struggling with the crooked native fSpy export to Maya which doesn't work at all
Glad it worked for you. To my knowledge, there is no native fSpy export to Maya. Trying to copy and paste the values from fSpy directly to Maya would never work due to it requiring some math to convert it to properly.
I can confirm that this works in Maya 2024, however to anyone who is not used to using custom scripts, make sure to click the MEL button right before the script command prompt line to switch it to Python. I was wondering why this wasn't running for 10 to 20 minutes until I decided to look up "Using Custom Scripts" and had another tutorial highlighting that Python (not MEL) needs to be enabled.
Where is this button? Is it in the script editor?
Incredible work Kurt, thank you so much!
Awesome! Thanks for this.
Thank you so much for this! It worked fine mostly, the only issue I had was the camera and the image plane got imported far away from the base point, but I was able to just move it closer towards my scene and rearrange it a bit and the perspective was still nicely in place.
I'm glad it you found it helpful. At 2:30 in the video, I covered how to get your origin point set where you want. Are you saying you did this and it didn't work?
@@KurtBernardin Yes I did put it on the ground
@@murray-xr7pl It appears like I may be missing an attribute related to the principal point from fspy that isn't translating correctly to Maya. I'm currently trying to figure out what's missing.
this is simply priceless, I'm very thankful really keep up your fantastic videos man ! 🥰🥰
Thank you for the kind words. I really appreciate it!
Thx a lot for the plugins
Hi, first of, thank you for the plugin, however theres an error with the import script! Running the original returns this error: Error: ModuleNotFoundError: file line 1: No module named 'kb_fSpy_camera_maya'
I fixed it with this import code:
import kb_maya_fSpy_camera as fSpyCam
fSpyCam.fSpyCameraImporter_UI()
I'm leaving this comment here for anyone having issues running this, cheers
Hey thank you for this, I forgot I had changed the script name, but did not update the instructions with the correct name as well. Cheers!
@@KurtBernardinno problem, when I have the funds im dropping you a big fat stack, your plugin is awesome :)
@@sarcasmenul if you want to give funds to anyone, you should support the creator of fSpy. The software is awesome. I simply figured out how to make a bridge into maya.
thank you for this comment!! Saved me some headache
tuyệt vời, cảm ơn bạn nhất nhiều !!!!!!!!!
Had issues with my image, perhaps because it is portrait (Taller than wide). fSpy outputted a focal length of 22.25, however it did not look correct. Turning it down in Maya to 14.85 gave the correct result. This so happened to be 2/3 of fSpy's value which was the device aspect ratio for my image (980x1470 => 0.667). So perhaps fSpy doesn't factor this in where it should.
I've noticed some issues with portrait images, but I believe that may be due to my Maya script and not fSpy. It's something I've been meaning to look into further but have not had the time unfortunately.
@@KurtBernardin The incorrect focal length value is visible in fSpy before I've even used the script. No worries, at least a note is here for those curious
Hi Kurt, thank you for creating this tool! I just tried 2 different images. They are fairly close but definitely not accurate enough compared to what I'm seeing in Fspy, they both have wider angles of view. Do you have any thoughts as to why this would happen?
UPDATE: I got it working, The issue comes into play when you use the 'from 3rd vanishing point' option as your principal point, Every tweak I made with the Z axis points would skew the 3d guide greatly, the littlest adjustment would throw things off. The approach that worked for me was using the 'image midpoint ' principle point, especially if your Y axis has very little perspective change from top to bottom.
@@maxlazzarin8417 I'm glad you brought this up. I recall seeing this same issue related when image midpoint is not used and was unable to find the best approach to translate this into the auto shader that gets generated. I would love to hear if you end up figuring out something I missed!
This might be my lack of experience showing but when I import into Maya 2025 the origin is just slightly off. is this happening for anybody else?
Same problem
Thanks for the video! I do have trouble when importing into Maya, camera just doesn't match and that midpoint is off as well. However works great in blender (same file). Any clue where it needs extra care when it comes to maya (....as always). In fact when I export from Blender to Maya it also works so not sure. Cheers!
It's possible I missed a few key variables to make it transfer 1 to 1. I've noticed a few little issues that leads to this not always working. I'll have to take a look to see if I forgot to include the midpoint and try to figure out how to input that into the maya camera.
@@KurtBernardin That would be amazing, thank you for you reply!
@@KurtBernardin
Other times importing camera from Blender to maya doesn't really work either.
But I think I found a solution that works, however it might need some further testing.
Here’s how I fixed it:
1. Use the Angle Number from fSpy: Find the angle number under "Camera Orientation" in fSpy.
2. Set the Film Aspect Ratio in Maya: Input this angle number in Maya under the "Film Aspect Ratio" setting (in the camera's attributes that you import from Blender).
3. Adjust Fit Resolution Gate: In Maya, tweak the "Fit Resolution Gate" setting. For me, "Overscan" usually works best.
Hope this helps someone!
Hey bro, nice tutorial but Im having some Error on the script , it show "# Error: ModuleNotFoundError: file line 1: No module named 'kb_fSpy_camera_maya'" . It used to be working fine ytd but it just error today . Anyway for me to fix it ?
That error means it can’t find the script. Is the script still located within the scripts folder? Is the file still named the same or did it get renamed? What’s the command that you’re running?
@@KurtBernardin the file all stay the same localtion (C:\Users\RUDY\Documents\maya\2023\script) and named the same from my last use. I tried download and replaced the script but still the same error. I install it be following your instruct , I think it is correct cause it works fine ytd .
@@rudy020494 is the following two lines what you're running through python?:
import kb_fSpy_camera_maya as fSpyCam
fSpyCam.fSpyCameraImporter_UI()
The very first line is what's importing the code, your error says it can't find it.
@@KurtBernardin Yes I run the same python lines but no worries, It work fine now,. I solved it by relocal to other folder (C:\Users\RUDY\Documents\maya\2023\prefs\scripts) . working great ! Thanks for you reply and the script !
Hi Kurt, Can you provide some steps to install the fspy plufgin in maya ? I am trying the same procedure that one uses to install the plugin in maya but it is not opening after I add it to the shelf. I am using Maya 2022
Hello Shivesh, the typical default place on your computer would be a maya folder within your documents, mine looks like this C:\Users\KurtB\Documents\maya.
From here you can make a "scripts" folder and place the .py file in this folder. Alternatively, you can open the "2022/scripts" folder and place it there. The difference between the two is having scripts dedicated to a version number vs being useable for multiple versions. Folders would look like either of these:
C:\Users\KurtB\Documents\maya\scripts
C:\Users\KurtB\Documents\maya\2022\scripts
Lastly, you should be able to run this Python code within the script editor:
import kb_fSpy_camera_maya as fSpyCam
fSpyCam.fSpyCameraImporter_UI()
If anything isn't correct, it should give you some sort of error message in the script editor.
How do you set up multiple cameras with different angles of the object im trying to make ?
This software is used to line-up a single image. I suppose you could line-up multiple individual images, but you would have to match those cameras to one another manually.
hey i dont get any problem while importing scripts but the only problem i faced is the camera i imported is far away from the grid and when i started blocking it overlap the reference picture and half of the overlap mesh hide.please tell me the solution for it , btw great video it helped a lot.
You can select the image plane and change the “depth” value which is the distance of the image plane to the camera.
@@KurtBernardin THANKS BRO IT HELPED.
Dach Knolls
非常棒的插件,来自中国广西南宁的赞👍
I just tried it, but it didn't work for my case. I'm not sure if there is something wrong with my photo, but I keep running into a similar problem.
I'd love to troubleshoot it with you and see if a solution could be found, or at least an explanation...
I wouldn't say I went too deep of an explanation into how fSpy works. This video is more of a brief overview. For a more in-depth understanding of fSpy, take a look at @bpampuch tutorial here: ua-cam.com/video/daiMOYR8GS8/v-deo.html
@Kurt B I've seen that video already and followed it closely when I did my fSpy Scene...
I've also reached out to it's author on BlenderArtists.org and you can check out my post there too - I'd appreciate your input.
blenderartists.org/t/complete-fspy-tutorial-all-options-explained/1394133/7
Hello! I open your script window and press the Create Camera and I get the following warning message.
# Error: AttributeError: file C:/Users/MYNAME/Documents/maya/2020/scripts\kb+fSpy_camera_maya.py line 16: type object 'int' has no attribute 'from_bytes'
How can I overcome this problem? 😢 I'm using Maya2020.4
I don't think I ever tested this script with Maya 2020. It's possible that it does not work for that reason. Maya updated to python 3 on version 2022 I believe. I don't currently have 2020 installed so I'll have to install and test when I have time.
@@KurtBernardin I think 2020 version probably shouldn't because it's before Python 3. But if you can test it, I'd really appreciate it if you could test it once! THX!
I've had this same exact issue on my side, Maya 2020 as well, I would love to hear about a solution to this
Hartmann Valleys
how to get the maya script and all
Hey bro i wanna ask can we match perspective in syntheyes and then bring it to maya
I don’t see why not since syntheyes is used for camera tracking. But this script is specifically for fSpy.
@@KurtBernardin for syntheyes we dont need any script we just have to export maya asci file from syntheyes and import it to maya ,the camera and the image is placed just like we arranged in syntheyes
bro cant insall , can you please make video how to install step by step
Hello, the typical default place on your computer would be a maya folder within your documents, mine looks like this C:\Users\KurtB\Documents\maya.
From here you can make a "scripts" folder and place the .py file in this folder. Alternatively, you can open the "2022/scripts" folder and place it there. The difference between the two is having scripts dedicated to a version number vs being useable for multiple versions. Folders would look like either of these:
C:\Users\KurtB\Documents\maya\scripts
C:\Users\KurtB\Documents\maya\2022\scripts
Lastly, you should be able to run this Python code within the script editor:
import kb_fSpy_camera_maya as fSpyCam
fSpyCam.fSpyCameraImporter_UI()
✨👌😎😮😎👍✨
Carter Port
Just want to let everyone know, this works in Maya 2025 too.
Thank you for testing!
very noise!
Hi there, It's not working in Maya 2022.3 file -f -new;
// untitled //
// Warning: file: C:/Program Files/Autodesk/Maya2022/scripts/others/pluginWin.mel line 934: No initializePlugin() function
//