Author Topic: Arrange / Distribute Objects  (Read 5359 times)

2021-09-15, 08:01:38

cjwidd

  • Active Users
  • **
  • Posts: 1077
    • View Profile
    • Artstation
Look all over, but cannot find a script that evenly distributes a selection of objects in n-rows / n-columns. MCG-Arrange accomplished this task, but is not functional in 3ds Max 2020.

It's very surprising to me that such a script does not exist(?)

2021-09-15, 08:06:01
Reply #1

aaouviz

  • Active Users
  • **
  • Posts: 882
    • View Profile
    • Another Angle 3D
Damn,

That looks handy. I don't have any tips, but posting here in case someone comes up with a solution.
Nicolas Pratt
Another Angle 3D
https://www.instagram.com/anotherangle3d/

2021-09-15, 09:58:49
Reply #2

cjwidd

  • Active Users
  • **
  • Posts: 1077
    • View Profile
    • Artstation
This is the best I've found so far (link)

Not as flexible as I would like, but it does evenly distribute objects between two points. I'm looking for a solution that can distribute a selection of objects into an arbitrary number of rows and columns, like MCG-arrange.

2021-09-15, 16:53:09
Reply #3

pokoy

  • Active Users
  • **
  • Posts: 1850
    • View Profile
Hmm I guess PFlow could help here, you can specify a group as object source, and then use a grid birth operator... but controls are limited.
Maybe TyFlow provides more options...

2021-09-15, 17:56:20
Reply #4

piotrus3333

  • Active Users
  • **
  • Posts: 230
    • View Profile
what is missing from Array tool in 3ds max?
Marcin Piotrowski
youtube

2021-09-15, 21:11:36
Reply #5

cjwidd

  • Active Users
  • **
  • Posts: 1077
    • View Profile
    • Artstation
Right, I was going to use TyFlow, but I was really hoping to avoid that; I assumed there was probably already a script floating around that maybe someone had but never shared online(?)

2021-09-16, 08:31:43
Reply #6

aaouviz

  • Active Users
  • **
  • Posts: 882
    • View Profile
    • Another Angle 3D
what is missing from Array tool in 3ds max?

Honestly I don't know what's missing from it. But this - to me - is an awful tool. I have no idea what it wants, I never get the expected results.
Nicolas Pratt
Another Angle 3D
https://www.instagram.com/anotherangle3d/

2021-09-16, 10:33:44
Reply #7

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Array is a great tool and i use it a lot, but it doesn't do what cwidd wants. It can't take multiple existing objects and arrange them into some array. I need to test that mcg script - never felt particular need for such tool, but who knows, sometime it may come handy.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2021-09-16, 10:34:34
Reply #8

cjwidd

  • Active Users
  • **
  • Posts: 1077
    • View Profile
    • Artstation
what is missing from Array tool in 3ds max?

Do you mean, "How does the 3ds Max array tool not suit the intended use case?"

I think the answer is just that the array tool does not perform this function; the array tool generates an array of instances (or copies) based on the transform of the selected objects, the array tool does not *arrange* objects, which is what I'm trying to do, and what the MCG_Arrange tool used to do.

2021-09-16, 10:39:56
Reply #9

Philip kelly

  • Active Users
  • **
  • Posts: 513
    • View Profile
    • Sketchrender
Forest pro/ Rail clone?
Dell Precision T7910

2021-09-16, 10:42:45
Reply #10

cjwidd

  • Active Users
  • **
  • Posts: 1077
    • View Profile
    • Artstation
Forest pro/ Rail clone?

Right, I assume RailClone does do this, and ForestPack might also do this. I could look into using FP for this, but I do not have access to RC.

To be sure, I was really looking for a turnkey solution for this, thinking a script for it already existed - and it does, but not for Max 2020.

2021-09-16, 11:00:10
Reply #11

Frood

  • Active Users
  • **
  • Posts: 1903
    • View Profile
    • Rakete GmbH
If plugin dependency is not an issue for you:

1. there is a free version of RC
2. you might try the (also free) Clone modifier: Select all objects you want to distribute, apply modifier twice to create a grid with them. All parametric and adjustable.


Good Luck


Never underestimate the power of a well placed level one spell.

2021-09-16, 11:00:55
Reply #12

piotrus3333

  • Active Users
  • **
  • Posts: 230
    • View Profile
Array is a great tool and i use it a lot, but it doesn't do what cwidd wants. It can't take multiple existing objects and arrange them into some array. I need to test that mcg script - never felt particular need for such tool, but who knows, sometime it may come handy.

create an array and replace objects with simple replacer script.
Marcin Piotrowski
youtube

2021-09-16, 11:14:12
Reply #13

cjwidd

  • Active Users
  • **
  • Posts: 1077
    • View Profile
    • Artstation
If plugin dependency is not an issue for you:

1. there is a free version of RC
2. you might try the (also free) Clone modifier: Select all objects you want to distribute, apply modifier twice to create a grid with them. All parametric and adjustable.


Good Luck

Thanks Frood, looking into this +1

2021-09-16, 12:36:26
Reply #14

clemens_at

  • Active Users
  • **
  • Posts: 142
    • View Profile
also highly recommended: AdvArray

2021-09-16, 14:25:44
Reply #15

pokoy

  • Active Users
  • **
  • Posts: 1850
    • View Profile
also highly recommended: AdvArray
Neat, never heard of this one.

2021-09-16, 15:18:20
Reply #16

morph3us

  • Active Users
  • **
  • Posts: 7
    • View Profile
Maybethis clone modifier by iToo helps?
https://www.itoosoft.com/freeplugins/clone

You can add it to the stack twice, one for the rows, the second for the columns.
(If its the same object over and over again, which is your user case, if Im correct.)

2021-09-17, 00:10:30
Reply #17

cjwidd

  • Active Users
  • **
  • Posts: 1077
    • View Profile
    • Artstation
If plugin dependency is not an issue for you:

1. there is a free version of RC
2. you might try the (also free) Clone modifier: Select all objects you want to distribute, apply modifier twice to create a grid with them. All parametric and adjustable.


Good Luck

Unfortunately this is modifier does not achieve the desired effect; in fact, this is basically a modifier version of the array tool.

2021-09-17, 00:14:40
Reply #18

cjwidd

  • Active Users
  • **
  • Posts: 1077
    • View Profile
    • Artstation
I just want to clarify, because there are several people offering their advice, but are misunderstanding what I'm looking for.

Imagine you import a Megascans collection of small rocks, they are all separate (unique) objects and all import at transform (0,0,0). Now arrange them in a grid.

I'm looking for a script that does this, as MCG_Arrange does, with parameters to arrange the objects in a grid of arbitrary number of rows and columns. For example, if you have 16 objects, you could create 2 row/8 col, 8 row/2 col, 4 row/4 col, 1 row/16 col, etc.
« Last Edit: 2021-09-17, 04:13:38 by cjwidd »

2021-09-17, 09:21:40
Reply #19

morph3us

  • Active Users
  • **
  • Posts: 7
    • View Profile
Sorry for not having read properly...

Does this Script snippet by Bobo help you?
https://forums.cgsociety.org/t/distribute-evenly/1164337/3

2021-09-17, 11:04:47
Reply #20

cjwidd

  • Active Users
  • **
  • Posts: 1077
    • View Profile
    • Artstation
Sorry for not having read properly...

Does this Script snippet by Bobo help you?
https://forums.cgsociety.org/t/distribute-evenly/1164337/3

Sort of - I linked to this script earlier in this thread(^)

2021-09-17, 12:33:59
Reply #21

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
Hi. Have you tried this: https://www.racoon-artworks.de/resource_quicksplineclone.php
I know it's not exactly like your description, but I think it could make the same end result.

Hope it helps.


Edit: Forget it. It doesn't work :(
« Last Edit: 2021-09-17, 12:57:02 by PROH »

2021-09-17, 17:19:19
Reply #22

morph3us

  • Active Users
  • **
  • Posts: 7
    • View Profile
Again, sorry for not having read thoroughly.

I hope I can make it up with the little script I attached.
Once installed, you can find it in the "morph3us.net" category in the "Customize User Interface" window.

It does not check if your selection is correct. If you do not have anything selected it throws an error.
Also, I did not test it on groups...
There is probably a lot more to sanitize, but I gotta go in 10 minutes...

It does however set the grid size automatically depending on the biggest object that is selected.
I also implemented an undo, if needed.

2021-09-17, 18:29:08
Reply #23

cjwidd

  • Active Users
  • **
  • Posts: 1077
    • View Profile
    • Artstation
Hey morph3us, thanks for your effort! I'm out of the office this weekend, but I will test as soon as possible - looking forward to it :D

2021-09-25, 20:14:10
Reply #24

cjwidd

  • Active Users
  • **
  • Posts: 1077
    • View Profile
    • Artstation
Hey Morpheus, honestly your macros works pretty well - thank you(!) Is it possible to expose parameters for rows and columns or grid spacing? For example, "I want to arrange these 8 objects into 2 rows and 4 columns".

Also, how is the spacing between each 'cell' in the array being determined, by bounding box? Can you expose a parameter to specify the spacing?

If none of that is possible, it's still a great script and thank you so much for sharing - it was what I was looking for!

2021-09-26, 18:15:56
Reply #25

morph3us

  • Active Users
  • **
  • Posts: 7
    • View Profile
Glad I was of some help!

Technically everything you ask for is possible, I guess.
The problem is that I really do not have any time at hand right now.
I have several projects that occupy me quite heavily at the moment.

The spacing is determined by the bounding box, yes.
It searches for the biggest object in the selection and the uses that as a base for all the other objects.

I can not promise anything further than what I assembled already, I will try to remember this for when things quiet down a bit (not in the next two weeks)
If you'd like, take a poke at the .ms file yourself and ask for help if you get stuck.

2021-09-26, 20:42:53
Reply #26

cjwidd

  • Active Users
  • **
  • Posts: 1077
    • View Profile
    • Artstation
No problem, I really appreciate the script regardless - it's awesome!