Automatic Hard Edges in Maya - Free Script

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ต.ค. 2024
  • www.playcreati...
    See the blog article for more information: www.playcreati...
    This is a quick video showing how to automatically find Hard Edges in Maya - with a free script for you to use!
    See how it can dramatically speed up your workflow by using Selection Constraints!
    Visit www.playcreati... for more!

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

  • @chriswong225
    @chriswong225 5 ปีที่แล้ว +7

    maya had the same buildin function on select>use constaints, properties> smoothing can choose hard edge
    but sure your script is much faster because of 1 click, thank you

  • @andreitab9500
    @andreitab9500 12 วันที่ผ่านมา

    2024 and I am so happy I found this! Thank you very much! You just made my day and work so much easier!!

  • @CGITutorials
    @CGITutorials 4 ปีที่แล้ว +9

    This script is life changing. I will be making sure that all my students have this on their shelf! Thank you!

  • @MoustafaShaheen
    @MoustafaShaheen 5 ปีที่แล้ว +4

    Can't believe that i won't do this manually anymore, As simple this script is, It saves a lot of time, Thanks :)

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

    This script is the business, massively sped up my workflow on a tight turnaround job. Cheers!

  • @amitdalvi1491
    @amitdalvi1491 4 ปีที่แล้ว +3

    you are a genius brother....that saves hell lot of time... I have been doing hard surface modeling and always gets afraid while sharpening the edges.... you just made life easy.... Best wishes to you channel :)

  • @arifulislamsunny2992
    @arifulislamsunny2992 5 ปีที่แล้ว +5

    This is one of the best script ever...

  • @devjitpaul1191
    @devjitpaul1191 4 ปีที่แล้ว

    i can't work with maya without this priceless script, thanks
    i can't live without it

  • @MustafaBerkeGureltol
    @MustafaBerkeGureltol 2 ปีที่แล้ว

    Script prevented me from spending hours on a model. Much appreciated.

  • @k-vandan
    @k-vandan 3 ปีที่แล้ว +1

    UV - Autoseams - select cut along hardedges this is what i have been using but good to have Icon in shelf for the purpose thank you

  • @henk.design6504
    @henk.design6504 5 ปีที่แล้ว +2

    Hands Down!
    as a Maya generalist this SOOO Great!

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

    Very useful script! I told all my colleagues about your channel

  • @lootmaster1337
    @lootmaster1337 2 ปีที่แล้ว

    Thanks, really liked the extra part after the script where you explained how it even does it so make my own changes if needed.

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

    Appreciate the script mate. Wish you were still doing videos

  • @D_K04
    @D_K04 17 วันที่ผ่านมา

    You just saved me a LOT of time, thank you so much!

  • @jameelachallawala5577
    @jameelachallawala5577 5 ปีที่แล้ว +3

    Thanks for the script...this is great..... Please keep uploading more such useful videos

  • @philipbristow8243
    @philipbristow8243 4 ปีที่แล้ว

    to change where you want the shelf icons to be is easy you just middle mouse button and drag the icon no need to go to the shelf editor just need to save shelf afterwards.

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

    Thanks! BTW this is the first video i see on my life that doesn't have a downvote. Kudos

  • @tomasla9345
    @tomasla9345 4 ปีที่แล้ว +2

    very helpful, thanks for sharing.!!!!. .. how could i edit the script so after the selection it does automatically does the bevel and/or pop up the bevel tool menu -????

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

      Hi Tomas, you can add a new line to the end: polyBevel3;

    • @tomasla9345
      @tomasla9345 4 ปีที่แล้ว

      @@playcreative5523 thanks a lot, it works great! =)

  • @litote9
    @litote9 4 ปีที่แล้ว

    Thanks, much simpler than messing about with Maya menus.

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

    Dude these are great please make more

  • @ElRixSape
    @ElRixSape 3 ปีที่แล้ว

    thanks for the script, im new with maya and this kind of things help me to speed up!

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

    Thank you very much ! I was looking for this kind of tool!

  • @VertexMachina
    @VertexMachina 3 ปีที่แล้ว

    Super helpful. Thank you! Really appreciate the explanation at the end, too.

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

    Thanks!!! Waiting for more videos.

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

    Oh wow, this is very helpful, thank you!

  • @artbybruno1734
    @artbybruno1734 3 ปีที่แล้ว +2

    Hi there! First of all, thanks for the script! Just found out about this and installed it. Exactly what I was looking for. But there is an issue with it... I noticed that after I run the script on a object, my Target Weld tool stops working - tested it a couple of times and it is indeed because of using this script.. Wondering if there is a fix or an update for it...!? (using Maya 2020) Thanks so much!

  • @62Tob
    @62Tob 4 ปีที่แล้ว

    Oh thanks man, very helpful!! And free. Pretty rare in these days. You gain a sub.

  • @charlied1420
    @charlied1420 4 ปีที่แล้ว +2

    This script was awesome. As was mentioned before though, for some of us Target Weld doesn't work after using the script.
    I figured out that when you run the script, it leaves the constrain for Vertices on "Current and Next" instead of "Nothing." Any way to add to the mel script to switch the vertice mode back to "Nothing" after it's run? Thanks again!

    • @charlied1420
      @charlied1420 4 ปีที่แล้ว +7

      Nm. I edited the last section and got it to work. Here it is for anyone who wants it(not a coder, so hopefully it doesn't break anything else):
      ////////////////////////////////////////////////////////////////
      //SELECT HARD EDGES
      //Author : www.playcreative.io
      //Date : 01/05/18
      //Version : 1.1
      ///////////////////////////////////////////////////////////////
      source dagMenuProc;
      int $lowAngle = 30;
      int $highAngle = 150;
      //Change the object back to object mode, just in case it wasn’t already
      toggleSelMode;
      changeSelectMode -object;
      //Store the object that is selected
      string $curSel[] = `ls -sl`;
      //Select all edges and store in an Array list
      doMenuComponentSelectionExt($curSel[0], "edge", 0);
      int $edgecount[] = `polyEvaluate -e $curSel[0]`;
      select ($curSel[0] +".e [0:" + ($edgecount[0] - 1) + "]");
      //Constrain that selection to only edges of a certain Angle
      polySelectConstraint -m 3 -a on -t 0x8000 -ab $lowAngle $highAngle;
      //Remove the selection constraint so everything back to normal
      //Edited to set Vert constraint to nothing
      polySelectConstraint -m 0 -t 0x0001 -a off;
      print ("Hard edges between " + $lowAngle + " and " + $highAngle + " degrees have been selected");
      ////////////////////////////////////////////////////////////////

    • @GamingDrifterGD
      @GamingDrifterGD 4 ปีที่แล้ว

      @@charlied1420 Your a life saver! I just started using the script with maya 2020. I initially thought it was a Maya glitch but then realized it started to happening everytiem I used the script. I just changed the script to reflect your edit and it works! Thanks a lot!

    • @mattferris3767
      @mattferris3767 3 ปีที่แล้ว

      You're a hero

    • @henryfive8862
      @henryfive8862 2 ปีที่แล้ว

      @@charlied1420 Works perfectly, thanks

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

    Thanks man, this will be very helpful!

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

    Hey Dude! Is a good script, thanks! THE PROBLEM is a huge ERROR preventing TARGET WELD tool to be used. I cant use Target weld bcs this script has wrritten in it "change selection". It switches to that.

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

      There is a comment chain lower down from @matsuikohiroka7875 with an edited script that will prevent this error. I thought I had updated the script on the webpage but looks like I hadn't!

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

    Hey, thanks for sharing! This is a really great tool!

  • @deehmendes4499
    @deehmendes4499 5 ปีที่แล้ว

    Pleeease post more videos, you’re awesome

  • @sadichchhaparulekar691
    @sadichchhaparulekar691 2 ปีที่แล้ว

    this video is so helpful …really helped rookie like me a lot :D

  • @matsuikohiroka7875
    @matsuikohiroka7875 5 ปีที่แล้ว +2

    just to inform you there is a bug , after executing the script try to use the target weld tool , it doesnt work anymore in order to fix it i need to restart maya ( using maya 2019.1 )

    • @charlied1420
      @charlied1420 4 ปีที่แล้ว

      I'm having this same issue as well. Any Idea if there's any way to fix this yet?

    • @charlied1420
      @charlied1420 4 ปีที่แล้ว

      I figured out a work around fix for this. After using the script on an object: Open Selection Constraint (Select > Use Constraints...). Activate Target Weld(Mesh Tools > Target Weld). In the Polygon Selection Constraint window, click on "Nothing" under Constrain. Target Weld should work now.
      I've been leaving the Polygon Selection Constraint window open while using this script. You can also click "Close and Reset" if you aren't using the script again in a while, and Maya will remember.

    • @charlied1420
      @charlied1420 4 ปีที่แล้ว +4

      Played around with the mel and got it to work. Not a coder, so hopefully it doesn't break anything else. But here it is if you're interested:
      ////////////////////////////////////////////////////////////////
      //SELECT HARD EDGES
      //Author : www.playcreative.io
      //Date : 01/05/18
      //Version : 1.1
      ///////////////////////////////////////////////////////////////
      source dagMenuProc;
      int $lowAngle = 30;
      int $highAngle = 150;
      //Change the object back to object mode, just in case it wasn’t already
      toggleSelMode;
      changeSelectMode -object;
      //Store the object that is selected
      string $curSel[] = `ls -sl`;
      //Select all edges and store in an Array list
      doMenuComponentSelectionExt($curSel[0], "edge", 0);
      int $edgecount[] = `polyEvaluate -e $curSel[0]`;
      select ($curSel[0] +".e [0:" + ($edgecount[0] - 1) + "]");
      //Constrain that selection to only edges of a certain Angle
      polySelectConstraint -m 3 -a on -t 0x8000 -ab $lowAngle $highAngle;
      //Remove the selection constraint so everything back to normal
      //Edited to set Vert constraint to nothing
      polySelectConstraint -m 0 -t 0x0001 -a off;
      print ("Hard edges between " + $lowAngle + " and " + $highAngle + " degrees have been selected");
      ////////////////////////////////////////////////////////////////

  • @TechniNoiX
    @TechniNoiX 3 ปีที่แล้ว

    so much of a thanksgiving

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

    Thanks for this! :)

  • @alexbobyr8076
    @alexbobyr8076 3 ปีที่แล้ว

    Thank You for the great script

  • @AceiteAxilar
    @AceiteAxilar 4 ปีที่แล้ว

    You save my life! Thank you so much!

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

    BIG THANKSSSSSS!!!

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

    thx man. that was very helpful

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

    Thank you, mister!

  • @Barneschild
    @Barneschild 3 ปีที่แล้ว

    Bang Tidy me old mucker, this is 10000000% useful. Thanks for the excellent script, great work!!

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

    A big thank you !

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

    great script!!!! and nice tutorials

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

    love it, thanks!

  • @poojasharma256
    @poojasharma256 3 ปีที่แล้ว

    can you please share how to save selected edges on shelf

  • @brylian4966
    @brylian4966 4 ปีที่แล้ว

    THANK YOU. You are the best.... i have subscribed to your channel : D

  • @KumarSambhhav
    @KumarSambhhav 3 ปีที่แล้ว

    wooaaw , Why have you stopped uploading more videos, Your videos are a class apart !!

  • @InstrumentMania
    @InstrumentMania 5 ปีที่แล้ว +2

    I opened your channel and expecting more videos to learn but my bad luck......
    you only uploaded two videos.............

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

    I am studying Digital Animation, and when I am in class, my teacher says that we should not reinforce the edges with the Bevel tool because it leaves triangles in some parts that are not manageable figures for Maya and that there are other fast and safe ways to reinforce the edges that are not manually (of which I no longer remember very well XD), I would like someone to explain this to me please.

    • @imcaionahas
      @imcaionahas 4 ปีที่แล้ว

      He is right. You need to maintain the correct edge flow in the mesh. If possible keep everything in quad. But there are cases where you just need this mesh in lowpoly and another version in highpoly to add some details in ZBrush for example and then use it in Substance Painter to bake. In this case it would not be so necessary to maintain the integrity of the mesh.

  • @AmitKolay
    @AmitKolay 5 ปีที่แล้ว

    amazing! thank you very much.

  • @splootcrate
    @splootcrate 3 ปีที่แล้ว

    Legendary!

  • @santodkewl
    @santodkewl 3 ปีที่แล้ว

    thank you soooo much lots of love to you...

  • @angustobiancusto6623
    @angustobiancusto6623 3 ปีที่แล้ว

    THANK YOU.

  • @NinusMaximus
    @NinusMaximus 3 ปีที่แล้ว

    for some reason my target weld stopped working after i installed the script, had to remove it :(

  • @bboyframly
    @bboyframly 4 ปีที่แล้ว

    Thank you for that!!. and how draw mouse like 1:22-1:24 to smooth edge?

    • @CGITutorials
      @CGITutorials 4 ปีที่แล้ว

      I think he just hit '3' on the keyboard for soft select (hit 1 to go back to normal)

  • @pranabsen7481
    @pranabsen7481 4 ปีที่แล้ว

    Thnx so much for the script :-)

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

    thanks a lot..........today is my best day,,,,,,,,,,,wowo

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

    super and
    trhank you

  • @lempiyaka
    @lempiyaka 4 ปีที่แล้ว

    Omg - omg this is so cool

  • @pavelgre7072
    @pavelgre7072 4 ปีที่แล้ว

    Thanks man

  • @liuzzivfx9413
    @liuzzivfx9413 2 ปีที่แล้ว

    Anyone have an idea of how to get this to iterate on multiple objects? tried the usual create list/ throwing it into a for loop but it only seems to keep the selections from the first object

  • @snap-n-shoot
    @snap-n-shoot 2 ปีที่แล้ว

    Handy script but still creates Ngons at times so you need to check everything

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

    The script is great but it breaks my target weld tool, and I'm guessing some others too which I haven't found yet. Every time I use it I have to reopen the Maya project so target weld works again. Do you know why this is happening and any solutions?

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

      Hey Sam, this appears to be a known issue with the selection change options in the script. I will look into it and get back to you.

    • @playcreative5523
      @playcreative5523  ปีที่แล้ว +2

      Hey Sam, I've found a fix by changing the following line in the script,
      from: polySelectConstraint -m 0;
      to: polySelectConstraint -m 0 -a off;
      Hope that helps.

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

      This helped thanks@@playcreative5523

  • @ciecle1000
    @ciecle1000 3 ปีที่แล้ว

    dont work for me ERROR SYNTAX help plz

  • @poojasharma256
    @poojasharma256 3 ปีที่แล้ว

    saved almost 1 hr

  • @3daefimov
    @3daefimov 5 ปีที่แล้ว

    // Error: line 19: Cannot find procedure "doMenuComponentSelectionExt".

    • @playcreative5523
      @playcreative5523  5 ปีที่แล้ว

      I believe it only works in later versions of Maya, perhaps 2017/18 onwards

    • @3daefimov
      @3daefimov 5 ปีที่แล้ว

      @@playcreative5523 Thanks, I solve one - thanks, it's working :) I had to show the edges and then run script.

  • @73maxmau
    @73maxmau 5 ปีที่แล้ว +1

    It doesn't seem to be working on Maya 2018.6 I get this error " ////////////////////////////////////////////////////////////////;
    // Error: ? //
    // Error: Line 13.1: Syntax error //
    // Error: ? //
    // Error: Line 21.1: Syntax error // "

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

      It's likely you pasted it into the MEL tab incorrectly - try copy it fresh again and see if that works.
      Also, often the quotation marks (" and ") can copy over strangely depending on what browser/text-editor you use. If you can't get it to work replace over the quotation marks in the text with new ones. Hope that helps.

    • @i20010
      @i20010 5 ปีที่แล้ว

      @@playcreative5523 ive tried 4 different browsers, retyped all " singns, its still erroring: // Error: line 18: Cannot find procedure "doMenuComponentSelectionExt". //

    • @73maxmau
      @73maxmau 5 ปีที่แล้ว

      @@playcreative5523 I tried, like you said, to copy from different browsers, same error. I then tried to replace the " in the text, still no luck. then I tried also in Maya 2019, but nothing seems to work. One thing, when I try to run it, the first time, after giving the error, in the text shows the ?, where the was an empty line, exactly in those lines.

    • @73maxmau
      @73maxmau 5 ปีที่แล้ว

      @@playcreative5523 If instead of copy the text, I do the dowload txt as file, and then copy it, I get I different error, instead.
      // Warning: string $curSel[] = `ls -sl`; //
      // Warning: Line 16.28 : Redeclaration of variable "$curSel" shadows previous declaration at line 15. Previous value will be overwritten by explicit initializer. //
      // Warning: int $edgecount[] = `polyEvaluate -e $curSel[0]`; //
      // Warning: Line 20.48 : Redeclaration of variable "$edgecount" shadows previous declaration at line 19. Previous value will be overwritten by explicit initializer. //
      hilite pCylinder1 ;
      hilite -u pCylinder1 ;
      select -r pCylinder1 ;
      // Error: line 19: Cannot find procedure "doMenuComponentSelectionExt". //

    • @73maxmau
      @73maxmau 5 ปีที่แล้ว

      When copy paste =
      ///////////////////////////////////////////////////////////////
      //SELECT HARD EDGES
      //Author : www.playcreative.io
      //Date : 01/05/18
      //Version : 1.1
      ///////////////////////////////////////////////////////////////
      int $lowAngle = 30;
      int $highAngle = 150;
      //Change the object back to object mode, just in case it wasn’t already
      toggleSelMode;
      changeSelectMode -object;

      //Store the object that is selected
      string $curSel[] = `ls -sl`;
      //Select all edges and store in an Array list
      doMenuComponentSelectionExt($curSel[0], "edge", 0);
      int $edgecount[] = `polyEvaluate -e $curSel[0]`;
      select ($curSel[0] +".e [0:" + ($edgecount[0] - 1) + "]");

      //Constrain that selection to only edges of a certain Angle
      polySelectConstraint -m 3 -a on -t 0x8000 -ab $lowAngle $highAngle;
      //Remove the selection constraint so everything back to normal
      polySelectConstraint -m 0;


      print ("Hard edges between " + $lowAngle + " and " + $highAngle + " degrees have been selected");
      ////////////////////////////////////////////////////////////////

  • @demihan14
    @demihan14 5 ปีที่แล้ว

    This script works on maya 2016?

    • @playcreative5523
      @playcreative5523  5 ปีที่แล้ว

      I believe it might have difficulty in 2016 sorry - you might have to do the manual way of using 'selection constraints'.

  • @MW-fx9nb
    @MW-fx9nb 4 ปีที่แล้ว

    //Error: Line 26.0: Syntax error here in Maya 2020

    • @leonidassavvides2558
      @leonidassavvides2558 4 ปีที่แล้ว

      // Error: line 16: Cannot find procedure "doMenuComponentSelectionExt". //
      Maya 2016

  • @ranjeetlodhi2830
    @ranjeetlodhi2830 3 ปีที่แล้ว

    👍👍👍👍

  • @Lyco0n
    @Lyco0n 2 ปีที่แล้ว

    This is terrible from Maya in Blender it is literally a 1 sec thing to do

  • @phoenixconnor1508
    @phoenixconnor1508 4 ปีที่แล้ว

    Thanks! Very useful script.