ScriptSpot

Forum topic · Scripts Wanted

How to scatter an object without intersections (Collision)

By obaida · 2011-12-22

Description

Hi .

Is there a script for scattering object(shape or geometry)depending on an object (shape or geometry)with random scale BUT without COLLISION .?

or how to do that .

Comments (11)

Go here.

miauu · 2012-01-03

Right

obaida · 2012-01-02

Thank you miauu for your interest.
This is what I'm talking about , but instead of putting the values in X,Y,Z its better to have a button to pick an object and take the values ​​depending on the dimensions of it
and the possibility of apply it to 2d and 3d object .
thats all

miauu · 2012-01-02

Watch this video and tell me if that is what you want.

The freexed box(width=height=length = 200) represent "Scatter box" X, Y and Z dimension.

obaida · 2012-01-01

Thank you Miauu actually am not good in max script
so I'm waiting you ......

miauu · 2012-01-01

So, you want script that will do exactly what the GeneratoreDiCerchi do, or something else?

The code below will check for

miauu · 2011-12-30

The code below check for intersection between all objects in the scene:


--check for overlapping
allLPobj = objects as array				
for i = 1 to allLPobj.count do
(
							
        for j = i+1 to allLPobj.count do
	(
	   if (intersects allLPobj[i] allLPobj[j]) == true do
	   (
		-- scatter					   )
        )				
)

You can try the Explode function of RTTAssist.

P.S.If you want script like in the video and can't write it, I can do the job, but you have to wait the new year. :)

miauu · 2011-12-26

Loop through all objects and check for intersection of their boundingboxes with "intersect"(check maxscript reference), but this may be very slow on scene with many objects.

obaida · 2011-12-26

thank you for replay .
but am talkin about a script for doing that .
I saw video for lerning max script , I think it was spanish vedio
he was explainig a script called "GeneratoreDiCerchi" or something like that for scattering circle deppending on arectangle .
that's the point .

or Scatter

Anubis · 2011-12-25

Create panel > Geometry > Compound Objects > Scatter

kilad · 2011-12-25

you can use crowd