Creating an Accurate Camera in Maya with fSpy

Поділитися
Вставка
  • Опубліковано 9 лис 2024

КОМЕНТАРІ • 70

  • @Cr381v3
    @Cr381v3 Рік тому +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

  • @ddankhazi
    @ddankhazi 10 місяців тому

    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  10 місяців тому +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.

  • @wanderingthedesert5599
    @wanderingthedesert5599 10 місяців тому +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 6 місяців тому +1

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

  • @StefWillemse
    @StefWillemse 7 місяців тому

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

    • @KurtBernardin
      @KurtBernardin  7 місяців тому +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.

  • @ruimahe
    @ruimahe 6 місяців тому

    Incredible work Kurt, thank you so much!

  • @ChaosWolfNinja
    @ChaosWolfNinja 7 місяців тому

    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.

  • @DeanCassady
    @DeanCassady 9 місяців тому

    Thx a lot for the plugins

  • @maxlazzarin8417
    @maxlazzarin8417 7 місяців тому

    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 7 місяців тому

      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  7 місяців тому

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

  • @samuelwilson4411
    @samuelwilson4411 Рік тому +3

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

  • @_fom1n
    @_fom1n 5 місяців тому

    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  5 місяців тому +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 5 місяців тому

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

    • @_fom1n
      @_fom1n 3 місяці тому

      @@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 Рік тому

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

  • @vinnyclifton7006
    @vinnyclifton7006 25 днів тому

    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.

    • @KurtBernardin
      @KurtBernardin  25 днів тому +1

      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.

    • @vinnyclifton7006
      @vinnyclifton7006 24 дні тому

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

  • @sarcasmenul
    @sarcasmenul 7 місяців тому +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  7 місяців тому +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 7 місяців тому

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

    • @KurtBernardin
      @KurtBernardin  7 місяців тому

      @@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 7 місяців тому +1

      thank you for this comment!! Saved me some headache

    • @hoanglong-hn1xn
      @hoanglong-hn1xn 7 місяців тому

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

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

  • @ShellaStancato-o8g
    @ShellaStancato-o8g Місяць тому

    Dach Knolls

  • @DonaldHarris-y7s
    @DonaldHarris-y7s Місяць тому

    Hartmann Valleys

  • @RemotelyHuman666
    @RemotelyHuman666 2 місяці тому +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?

  • @Tubbs935
    @Tubbs935 8 місяців тому

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

    • @KurtBernardin
      @KurtBernardin  7 місяців тому

      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.

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

  • @rudy020494
    @rudy020494 Рік тому +1

    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 !

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

  • @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: ua-cam.com/video/daiMOYR8GS8/v-deo.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

  • @tinkuop7449
    @tinkuop7449 8 місяців тому

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

    • @KurtBernardin
      @KurtBernardin  8 місяців тому

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

  • @manolomaru
    @manolomaru 6 місяців тому

    ✨👌😎😮😎👍✨

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

  • @JacquieJayson-g1p
    @JacquieJayson-g1p Місяць тому

    Carter Port

  • @UtterUnit
    @UtterUnit 4 місяці тому

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

  • @wonkaytry
    @wonkaytry 6 місяців тому

    very noise!

  • @Jimpaez
    @Jimpaez 11 місяців тому

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