How to scatter an object without intersections (Collision)

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

Comment viewing options

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

Right

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's picture

Watch this video and tell me

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's picture

Thank you

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

miauu's picture

So, you want script that will

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

miauu's picture

The code below will check for

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. :)

obaida's picture

Video Link

here is a link for the video that explain this script .
http://www.treddi.com/upload/philix/Tut-Philix-MaxScript/05-GeneratoreDi...

miauu's picture

Loop through all objects and

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's picture

thank you

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 .

Anubis's picture

or Scatter

Create panel > Geometry > Compound Objects > Scatter

my recent MAXScripts RSS (archive here)

Comment viewing options

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