Announcement

Collapse
No announcement yet.

Batch Auto Unwrapper 3DsMax Script

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Batch Auto Unwrapper 3DsMax Script

    Hi everyone,

    We are happy to share with you a Max Script that will help you unwrap your meshes for light bake. With this script you can batch create a new map channel and unwrap selected meshes. The newly created UVs will be then used for lightmaps in Unreal when light baking.

    When you install this script, you can add it in your toolbar by drag and dropping it from ІІCustomizeІІ > Customize User Interface > Toolbars > Main UI > VRay > Auto unwrapper.

    The Auto unwrapper uses Max's Flatten UV functionality so if the meshes have large amount of polys Max itself will not be able to handle it and will probably freeze/crash. With that in mind we added a threshold for amount of polygons and objects that have larger amount than the specified will be skipped in the unwrapping process. After the unwrap process is completed, all meshes that have been skipped are stored in a selection set for easier selection. The options in the dialogue box of the script have tooltips with descriptions of the functionality. Each time you execute the "Unwrap with flatten" option, an autoUnwrapper.lol file is generated in C:\Users\USER_NAME\AppData\Local\Autodesk\3dsMax\V ERSION - 64bit\ENU\en-US\plugcfg that lists all processed meshes, their location and timestamp for star/end of unwrap process for each mesh.

    Feel free to modify the script in any way you see fit and all suggestions are welcomed for its polishing.

    Best regards,
    Alexander

    P.S. Updated download link - https://drive.google.com/file/d/1ETi...ew?usp=sharing
    Attached Files
    Last edited by Alexander.Atanasov; 27-03-2020, 01:41 AM.
    Alexander Atanasov

    V-Ray for Unreal & Chaos Vantage QA

    Chaos

  • #2
    Alexander!!!!! You are simply the best! This is exactly what I was looking for. Awesome!
    Chaosgroup forever - you made my day... yeehhaaaaaa
    www.bernhardrieder.com
    rieder.bernhard@gmail.com

    Comment


    • #3
      Thank you for the script, but everytime I try to run it I get an error "--unable to convert:false to type:integer" and it highlights the follwing line in the script :

      ---------------------------
      MAXScript Rollout Handler Exception
      ---------------------------
      -- Unable to convert: false to type: Integer
      ---------------------------
      OK
      ---------------------------


      Any help would be appreciated.

      Comment


      • #4
        Hi chad,

        Thanks for your feedback! Could you provide a bit more context please? What version of 3ds Max are you using? Are those all the messages in the MAXScript Listener? What steps do you perform to install and run the script? It looks like an error on my side, but I need more info to replicate it or at least find where it is.

        Best regards,
        Simeon

        Comment


        • #5
          Well, I was using Max 2019 with issues, but I'm now using 2020 and it seems to be working with out any issues....not sure what was going on. I'll let you know if I run into any further problems.

          Comment


          • #6
            Thanks for the script Aleksander.

            When I use it on scenes with objects imported from/linked to AutoCAD I get an error from the addModifier on line 534. I looks like it doesn't lke some of the classes brought in from AutoCAD. I modified line 515 to filter them out:
            Code:
            515 for s in theSel where not iskindOf s LinkComposite do
            I don't know if that's the best place but it seems to work now.

            Dan
            Dan Brew

            Comment


            • #7
              Hi Alexander,

              I have the same error Chad mentioned about
              Here is the screenshot
              Would you please investigate that issue
              I am using 3ds max 2016 with VRay 3.60.05

              Thanks!

              Dmitry

              Comment


              • #8
                Little update:
                Script works fine with 3ds max 2019

                Comment


                • #9
                  Hi guys,

                  Thank you all for the feedback!

                  We will investigate the problem an update you.

                  Best regards,
                  Alexander
                  Alexander Atanasov

                  V-Ray for Unreal & Chaos Vantage QA

                  Chaos

                  Comment


                  • #10
                    Hi again

                    The script is updated both in the link at the beginning and the attachment. For your convenience you can click here: autoUnwrapper_v4.zip. Please let us know if you encounter other issues.

                    Best regards,
                    Alexander
                    Alexander Atanasov

                    V-Ray for Unreal & Chaos Vantage QA

                    Chaos

                    Comment


                    • #11
                      Hi Alexander,
                      It's working now
                      Thanks a lot!
                      Dmitry

                      Comment

                      Working...
                      X