Announcement

Collapse
No announcement yet.

MAXScript help wanted: Attach by material for huge scenes.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • MAXScript help wanted: Attach by material for huge scenes.

    HI, I'm wondering if someone with some scripting experience can help me with the following.

    I use this script a lot: http://www.scriptspot.com/3ds-max/scripts/quick-attach

    But I still need to manually select the things I want to attach. What I would like it to do is something like this script:

    http://www.scriptspot.com/3ds-max/sc...sh-by-material

    Problem: I have a 85.000 object revit model. What I would like is to let this script attach all objects by material but for huge scenes. The quick attach script does this by attaching a maximum of (default) 300 objects at a time because of memory issues.
    A.

    ---------------------
    www.digitaltwins.be

  • #2
    How many materials?
    If there are not too much you can do it by selecting by material by hand first then use the attacher script contained in the soulburn scripts pack


    NVM, skiped the part where you didn't want to do it manually ^^
    Software:
    Windows 7 Ultimate x64 SP1
    3ds Max 2016 SP4
    V-Ray Adv 3.60.04


    Hardware:
    Intel Core i7-4930K @ 3.40 GHz
    NVIDIA GeForce GTX 780 (4096MB RAM)
    64GB RAM


    DxDiag

    Comment


    • #3
      Originally posted by Art48 View Post
      How many materials?
      If there are not too much you can do it by selecting by material by hand first then use the attacher script contained in the soulburn scripts pack


      NVM, skiped the part where you didn't want to do it manually ^^
      Well I used to use Soulburn script. But the QuickAttach script is actually much faster. (Neils' script freezes at around 400 objects). But that part is not the problem it's the fact that there's a LOT of different materials. Lots of Multi-subs as well. And it will take me a few days to sort it all out :/
      A.

      ---------------------
      www.digitaltwins.be

      Comment


      • #4
        Might not work on a really complicated scene but: You could try exporting the scene as an obj, then re-importing this with "Import as single mesh", then use "detach by material ID" script.

        Are you importing an FBX file? If you link it you can combine by material.
        Last edited by sjmoir; 06-04-2016, 03:35 AM.
        www.meetup.com/3DLondon

        Comment


        • #5
          It's often better to link objects to a point-node and freeze them than it is to attach them. With 18000 objects in the scene, I would assume a lot of them are instanced nuts, bolts, washer, etc., and your file will be HUGE if you attach those to each other.
          - Geoff

          Comment


          • #6
            Well no, it's a 700 bedroom hospital, not much nuts and bolts, just a lot of walls, floors, columns, .. Problem with these files they are not clean at all. Walls consisting out of 40 boxes instead of just one. A scene of 85000 objects isn't manageable.

            I'm using the Revit import functionality of 2016 now and it works for the most part, you can choose the resolution of round objects and group by materials also, that leaves me with 65 objects. They didn't do a good job assigning materials though so it's going to be a very sh*tty job cleaning this up. But 65 objects with a total of 6000 000 polygons is much more manageable than 85 000 objects. Viewport speed is 200x faster.
            A.

            ---------------------
            www.digitaltwins.be

            Comment


            • #7
              Still if anybody with scripting knowledge and some spare time could make this, I think this tool would not only be helpfull to me but to all archviz guys out there. Would speed things up a lot.
              A.

              ---------------------
              www.digitaltwins.be

              Comment


              • #8
                Vizioen,
                try this script -
                http://www.daveandgoliath.com/collapse-geometry/
                Chris Jackson
                Shiftmedia
                www.shiftmedia.sydney

                Comment


                • #9
                  Originally posted by jacksc02 View Post
                  Great that's what I was looking for, just tested this with 10 000 boxes with 3 different materials. It took about 15 minutes to complete, which is quite a long time. I don't know what that quick attach script does but it's insanely fast in comparison to all the other attach scripts. It took quick attach 15 seconds to attach the 10 000 boxes at once.
                  A.

                  ---------------------
                  www.digitaltwins.be

                  Comment


                  • #10
                    Might be worth getting in touch with the author of either script and seeing if they can incorporate the good bits of the other script for you?

                    Comment


                    • #11
                      Well I contacted the Dave and Goliath guy and asked if he would take a look at the quick attach script. Will keep this thread updated.
                      A.

                      ---------------------
                      www.digitaltwins.be

                      Comment

                      Working...
                      X