Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Remove duplicate geometry

Remove duplicate geometry

Anonymous
Not applicable
8,163 Views
5 Replies
Message 1 of 6

Remove duplicate geometry

Anonymous
Not applicable

I somehow ended up with a scene that has most of the geometry cloned on top of each other, in the same exact position. This is quite a large scene so manually deleting will take too much time. I was wondering is anyone knew of a method or script that could delete identical geometry on top of each other. Thank you.

0 Likes
Accepted solutions (1)
8,164 Views
5 Replies
Replies (5)
Message 2 of 6

hagen.deloss
Alumni
Alumni
Accepted solution

@Anonymous 

 

Thanks for posting your question on the 3ds Max forums! 

 

I found this script on Scriptspot, but wasn't able to get it to work at first (I'm a novice with MAXscript).

 

As @miledrizk notes below, If you run the script, it will add the option to add the script to the toolbar. You can add this script to the toolbar by navigating to Customize > Customize User Interface > Toolbars tab. Under the Group "main UI, search for "Duplicate Geometry Remover", and add it to a new toolbar. 

 

Screenshot (848).png

 

For more information about making Toolbars, see the Learn article: Toolbars Panel.

 

I hope this helps, talk to you soon!

 

This post was edited to redact incorrect information by @hagen.deloss 

 

 



Hagen Deloss
Community Manager | Media & Entertainment
Installation & Licensing forums | Contact product support | Autodesk AREA


 

Message 3 of 6

miledrizk
Advisor
Advisor

Hi,

 

Actually the first script works,

Maybe you tried to run it from the editor, in that case, it will be installed as a new action

Without being executed. You need to add it to the UI by going to the Customize menu,

Customize User Interface, and then, if you like to create a toolbar for it, in the Toolbars tab,

In the Category: look for "Niklit Scripts", click New to create a new toolbar and drag the script to it.

 

It's better than the second one because it's based on the Vertex counts, the second script is 

Based on the names of the objects, so if you clone an object its duplicate will have an incremental

Name and will not be deleted. Now the first one is not perfect eighter, because some objects might have

The same number of vertices without being duplicates. So it has to be used with caution, and better make a

Copy of the original file first.

------------------------------------------------------
miledrizk@gmail.com
3DS Max 2025, V-Ray 7
3DS Max user since 2003 (3DS Max 7)
V-Ray user since 2008 (V-Ray 1.47)
Message 4 of 6

hagen.deloss
Alumni
Alumni

@miledrizk 

 

Ahhh, yep just made a toolbar with it and I can confirm that script works! I will edit my post above and add those steps, Thanks Miled 😄 

 

 



Hagen Deloss
Community Manager | Media & Entertainment
Installation & Licensing forums | Contact product support | Autodesk AREA


 

Message 5 of 6

laomusic_arts
Advocate
Advocate

Hi!

I just gave the script a try in Max 2018.4 and some warnings:

- first I opened it in Script Editor because ANY Macro is suspect, specially coming  from russians!
- selecting the code and "Evaluate all" just bring the first bit of code:

messagebox "If selected 0 Work to all objects\nIf Shift pressed then will select objects by geometry vertex count.\nIf Shift NOT pressed then will select by center objects position"
messagebox("Category: \"Niklit Scripts\"")

- I did open it the with "Scripting/Run Script" instead, then "Customize/ Customize User Interface/Toolbars/Niklit Scripts" and drag "Duplicate Geometry Remover" to my Custom Toolbar

- WHITOUT selecting any Objects in my scene, press the icon... and it selects all duplicates. Press delete and works like a charm!!

Hope this helps others!

 

LAO

Message 6 of 6

lynn_zhang
Alumni
Alumni

Hi @laomusic_arts 

 

Glad to hear it works for you and thanks so much for sharing the solution! This will benefit other users in the community with the same issue.





Lynn Zhang
Community Manager