Remove duplicated geometries?

I have a map, however some of the geometries are duplicated, how to remove them?

They have the following characteristic:
1. same pivot
2. same texture

so basically everything is the same, thanks!

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
brianuuu's picture

it says unexpected

it says unexpected end-of-script
btw how do I change "material" to other things? I dunno anything about maxscript sorry ;(

barigazy's picture

Now should work If your

Now should work
If your object share same position in world space (overlaping) then will be deleted.

geoArr = geometry as array
while geoArr.count > 0 do
(
	lastObj = geoArr[geoArr.count]
	idxArr = #() ; objArr = #()
	for o = geoArr.count-1 to 1 by -1 where distance lastObj.pos geoArr[o].pos < 0.01 do (append idxArr o ; append objArr geoArr[o])
	if idxArr.count != 0 do
	(
		delete objArr
		insertItem geoArr.count idxArr 1
		for i = 1 to idxArr.count do deleteItem geoArr idxArr[i]
	)
)

Line that you need to change is
... where distance lastObj.pos geoArr[o].pos < 0.01 ...
If you want to learn more you need to start with MaxScript help

bga

brianuuu's picture

for some reason the max just

for some reason the max just stop working, I've 3000 objects and I guess there are about 500 overlapping geometries.
Then I try if it works on 11 objects only, it still stop working!

brianuuu's picture

Ops sorry, the material is

Ops sorry, the material is different (but the texture is the same just the directory is different), is it possible to use pivot or faces or vertex count etc.?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.