Creating an Accurate Camera in Maya with fSpy

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ก.ย. 2024
  • In this tutorial, you'll learn how to create an accurate camera in Maya using fSpy. fSpy is an open source software for still image camera matching made by Stuffmatic, which allows you to match the camera position, field of view, and focal length of a photograph to use in your 3D scene. In this guide, I'll cover a few basic tips to use fSpy effectively.
    If you don't already have fSpy installed, you can download it for free from the fSpy website: fspy.io/.
    Additionally, I've created a custom fSpy for Maya Python script that you can download from the link here: kurtbernardin.....
    Whether you're a beginner or an experienced Maya user, this tutorial will help you to create more realistic and accurate scenes by using fSpy to match your camera position and settings.
    For a more in-depth understanding of fSpy, take a look at @bpampuch tutorial here: • BEST way to use fSpy |...

ความคิดเห็น • 64

  • @ruimahe
    @ruimahe 4 หลายเดือนก่อน

    Incredible work Kurt, thank you so much!

  • @samuelwilson4411
    @samuelwilson4411 10 หลายเดือนก่อน +2

    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' # "

  • @Cr381v3
    @Cr381v3 10 หลายเดือนก่อน +1

    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

  • @wanderingthedesert5599
    @wanderingthedesert5599 9 หลายเดือนก่อน +2

    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.

    • @EmilioLopez-t1f
      @EmilioLopez-t1f 4 หลายเดือนก่อน

      Where is this button? Is it in the script editor?

  • @StefWillemse
    @StefWillemse 5 หลายเดือนก่อน

    Worked like a charm! No more struggling with the crooked native fSpy export to Maya which doesn't work at all

    • @KurtBernardin
      @KurtBernardin  5 หลายเดือนก่อน +1

      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.

  • @ddankhazi
    @ddankhazi 8 หลายเดือนก่อน

    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

    • @KurtBernardin
      @KurtBernardin  8 หลายเดือนก่อน +1

      @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.

  • @abdulrhmansoliman2250
    @abdulrhmansoliman2250 ปีที่แล้ว

    this is simply priceless, I'm very thankful really keep up your fantastic videos man ! 🥰🥰

    • @KurtBernardin
      @KurtBernardin  ปีที่แล้ว +1

      Thank you for the kind words. I really appreciate it!

  • @ChaosWolfNinja
    @ChaosWolfNinja 6 หลายเดือนก่อน

    Awesome! Thanks for this.

  • @murray-xr7pl
    @murray-xr7pl ปีที่แล้ว

    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.

    • @KurtBernardin
      @KurtBernardin  ปีที่แล้ว

      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
      @murray-xr7pl ปีที่แล้ว

      @@KurtBernardin Yes I did put it on the ground

    • @KurtBernardin
      @KurtBernardin  ปีที่แล้ว

      @@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.

  • @RemotelyHuman666
    @RemotelyHuman666 26 วันที่ผ่านมา +1

    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?

    • @sajeelshukla
      @sajeelshukla 5 วันที่ผ่านมา

      Same problem

  • @DeanCassady
    @DeanCassady 8 หลายเดือนก่อน

    Thx a lot for the plugins

  • @sarcasmenul
    @sarcasmenul 6 หลายเดือนก่อน +3

    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

    • @KurtBernardin
      @KurtBernardin  6 หลายเดือนก่อน +1

      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!

    • @sarcasmenul
      @sarcasmenul 6 หลายเดือนก่อน

      @@KurtBernardinno problem, when I have the funds im dropping you a big fat stack, your plugin is awesome :)

    • @KurtBernardin
      @KurtBernardin  6 หลายเดือนก่อน

      @@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.

    • @n0t.Puffer
      @n0t.Puffer 5 หลายเดือนก่อน +1

      thank you for this comment!! Saved me some headache

    • @hoanglong-hn1xn
      @hoanglong-hn1xn 5 หลายเดือนก่อน

      tuyệt vời, cảm ơn bạn nhất nhiều !!!!!!!!!

  • @maxlazzarin8417
    @maxlazzarin8417 5 หลายเดือนก่อน

    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?

    • @maxlazzarin8417
      @maxlazzarin8417 5 หลายเดือนก่อน

      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.

    • @KurtBernardin
      @KurtBernardin  5 หลายเดือนก่อน

      @@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!

  • @Tubbs935
    @Tubbs935 6 หลายเดือนก่อน

    How do you set up multiple cameras with different angles of the object im trying to make ?

    • @KurtBernardin
      @KurtBernardin  6 หลายเดือนก่อน

      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.

  • @min-seungmun6091
    @min-seungmun6091 ปีที่แล้ว

    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

    • @KurtBernardin
      @KurtBernardin  ปีที่แล้ว

      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.

    • @min-seungmun6091
      @min-seungmun6091 ปีที่แล้ว

      @@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!

    • @RMANCILL
      @RMANCILL ปีที่แล้ว

      I've had this same exact issue on my side, Maya 2020 as well, I would love to hear about a solution to this

  • @_fom1n
    @_fom1n 3 หลายเดือนก่อน

    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!

    • @KurtBernardin
      @KurtBernardin  3 หลายเดือนก่อน +1

      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.

    • @_fom1n
      @_fom1n 3 หลายเดือนก่อน

      @@KurtBernardin That would be amazing, thank you for you reply!

    • @_fom1n
      @_fom1n หลายเดือนก่อน

      @@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!

  • @shiveshchauhan7296
    @shiveshchauhan7296 ปีที่แล้ว

    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

    • @KurtBernardin
      @KurtBernardin  ปีที่แล้ว

      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.

  • @amitnegi8771
    @amitnegi8771 ปีที่แล้ว

    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.

    • @KurtBernardin
      @KurtBernardin  ปีที่แล้ว +1

      You can select the image plane and change the “depth” value which is the distance of the image plane to the camera.

    • @amitnegi8771
      @amitnegi8771 ปีที่แล้ว

      @@KurtBernardin THANKS BRO IT HELPED.

  • @naaffax6700
    @naaffax6700 ปีที่แล้ว

    how to get the maya script and all

  • @tinkuop7449
    @tinkuop7449 6 หลายเดือนก่อน

    bro cant insall , can you please make video how to install step by step

    • @KurtBernardin
      @KurtBernardin  6 หลายเดือนก่อน

      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()

  • @theapexpredator157
    @theapexpredator157 ปีที่แล้ว

    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...

    • @KurtBernardin
      @KurtBernardin  ปีที่แล้ว

      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: th-cam.com/video/daiMOYR8GS8/w-d-xo.html

    • @theapexpredator157
      @theapexpredator157 ปีที่แล้ว

      ​ @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

  • @zxy9310
    @zxy9310 ปีที่แล้ว

    非常棒的插件,来自中国广西南宁的赞👍

  • @mightguygaming834
    @mightguygaming834 ปีที่แล้ว

    Hey bro i wanna ask can we match perspective in syntheyes and then bring it to maya

    • @KurtBernardin
      @KurtBernardin  ปีที่แล้ว

      I don’t see why not since syntheyes is used for camera tracking. But this script is specifically for fSpy.

    • @mightguygaming834
      @mightguygaming834 ปีที่แล้ว

      @@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

  • @rudy020494
    @rudy020494 ปีที่แล้ว

    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 ?

    • @KurtBernardin
      @KurtBernardin  ปีที่แล้ว +1

      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?

    • @rudy020494
      @rudy020494 ปีที่แล้ว

      @@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 .

    • @KurtBernardin
      @KurtBernardin  ปีที่แล้ว

      @@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.

    • @rudy020494
      @rudy020494 ปีที่แล้ว

      @@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 !

  • @manolomaru
    @manolomaru 4 หลายเดือนก่อน

    ✨👌😎😮😎👍✨

  • @UtterUnit
    @UtterUnit 2 หลายเดือนก่อน

    Just want to let everyone know, this works in Maya 2025 too.

    • @KurtBernardin
      @KurtBernardin  2 หลายเดือนก่อน

      Thank you for testing!

  • @wonkaytry
    @wonkaytry 4 หลายเดือนก่อน

    very noise!

  • @Jimpaez
    @Jimpaez 9 หลายเดือนก่อน

    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
    //