Creating an Accurate Camera in Maya with fSpy

Поделиться
HTML-код
  • Опубликовано: 8 сен 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 |...

Комментарии • 63

  • @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 8 месяцев назад +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.

    • @user-sg6wp1zh8w
      @user-sg6wp1zh8w 4 месяца назад

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

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

  • @ruimahe
    @ruimahe 4 месяца назад

    Incredible work Kurt, thank you so much!

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

  • @ChaosWolfNinja
    @ChaosWolfNinja 5 месяцев назад

    Awesome! Thanks for this.

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

  • @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 18 дней назад

    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?

  • @DeanCassady
    @DeanCassady 7 месяцев назад

    Thx a lot for the plugins

  • @sarcasmenul
    @sarcasmenul 5 месяцев назад +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  5 месяцев назад +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 5 месяцев назад

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

    • @KurtBernardin
      @KurtBernardin  5 месяцев назад

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

  • @samuelwilson4411
    @samuelwilson4411 10 месяцев назад +1

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

  • @Tubbs935
    @Tubbs935 5 месяцев назад

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

    • @KurtBernardin
      @KurtBernardin  5 месяцев назад

      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.

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

  • @tinkuop7449
    @tinkuop7449 6 месяцев назад

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

  • @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 2 месяца назад

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

  • @zxy9310
    @zxy9310 Год назад

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

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

  • @naaffax6700
    @naaffax6700 Год назад

    how to get the maya script and all

  • @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: ruclips.net/video/daiMOYR8GS8/видео.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

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

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

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