objects along spline

Is there any way to distribute object along spline in 3ds max? Distributed objects should change their position dynamically when I move spline vertices.

__________
Sorry for my English

Spline Scatter at ScriptSpot might be what you are looking for

claude

Thanks for the reply.
But I’m looking for something like Scatter Compound Object in 3ds max.
Scattered objects should be updated after modification of distrubution spline.
After execution of this script I get objects separated from distribution spline.

_____________
sorry for my English

maybe over 10 corners too much. but you can create a spline - dublicate - enable in render - turn to poly - rig with original spline - and attach the objects to faces over attachment controller.
but veeeeery dumpy, and bet there’s a script for what you looking for. but don’t know it…

You can use a “Path Constrain” as position controller.

Select the object and choose Animation/Position Controller/Path Constrain and select the spline.
If you clone it, the new objects will follow the spline, put 10 or so in “Number of Copies” to see clearly how it works.

If you search for “path constrain” in the Max Help, you’ll get a better explanation than mine :slight_smile:

Once you have cloned your objects, you can select them all and run this script to have them equally spaced along the spline:
for i = 1 to (selection.count) do selection[i].pos.controller.path_Constraint.percent = (i - 1) * (100.0 / (selection.count - 1))

This would be one of those instances where the spacing tool would work perfectly as a modifier. Why on earth AD made it a one-way tool is beyond me, and then had the nerve to integrate it into the AEC railing object and still negelct a modifier version.

you could make a rectangular spline, dump an edit poly / mesh modifier on it and then use the scatter

you use a spline but Max thinks it’s a mesh…

Thanks to everyone for the info.

This is very clever :slight_smile:

One more question. I want to distribute streetlights along street.
How to set the orientation of the streetlights in the direction of the center of the road?
Center of the road is defined by another spline.

____________
sorry for my English

This might be more tricky … you can try enabling “Follow” in the path constrain parameters. This way the street lights will follow the curvature of the spline they are attached to.

maybe you can use itoo forest for that?

best regards
themaxxer

Unfortunately scattering along a path is disabled in lite version

Couldn’t you use splineIK and then clone and align the objects to the dummies/vertices then link them them to the dummies/verticies?

I hope the new Max 2011 object paint features have some way of adjusting after creation, some kind of replacement of the old spacing tool, by the demo videos it doesn’t seem so … they forgot again about the modifiers.

they didn’t forget, it’s just functioinality that is already included. PathConstraint works really well. You can manually move objects along the path to place them where you want or you can set their positions through the motion panel.

Path constraint - 3ds max.

To take it a step further, you could add a custom attribute to the spline that sets the spacing in world units or percentage or whatever. Then add a script controller to the Percent property of each LampPost.

There are worlds unexplored in Max if you just dig a little deeper. Expression controllers, Script controllers, MaxScript, DotNet… and now all the badass UI stuff in 2011. This is a pretty amazing release.

2011 looks good indeed, but object paint would be much better if it let you adjust it’s parameters whenever you need. It could have replaced/improved the old way of working, but instead we have to use motion controllers, the graph editor and maxscript if we want to dynamically adjust some lampposts.

@Mnietek2707:
Enabling “Follow” in path constrain has worked for you?

Thanks for sharing that. I am trying to decide if this tool will be useful for an upcoming project, but for that I’ll need to use this approach for initial position and layout, but then I’d like to be able to tweak individual objects height in Z (so offset from the path). Is there a way to “freeze” the constrained objects to remove the path constraint, but keep the shape/layout you create with the path constraint? I can’t seem to get rid of the path now without losing the whole setup.

/b

I don’t know if it’s exactly what you need, but you can create a dummy helper that follows the spline and link the object to it.

hmm. not sure, but it doesn’t sound like it. I need to create a pattern of things kind of like overlapping scales, but more randomly shuffled around in terms of offset, rather than in perfect rows (which could be done by shifting the whole path in Z). With the path constraint I can get what I need in x/y postions, but the objects are all snapped to the spline in Z direction so they don’t overlap properly. I can live with some random interpenetration for a lot of it, but the part right in the foreground will need to be hand tweaked to get the overlaps looking correct. Can’t seem to do that with the path constraint. I was hoping for a way to just turn that ‘off’ once I had the positions laid out.

b

I’ll double check when my rendering stops, but I think you can do this using the VrayScatter plug-in.
IIRC, you can choose meshes or splines to act as the distribution objects…

Thanks Voltron7 - I think you can as well, but I can’t run VRS at this time, unless I change my Vray version, which I was hoping to avoid.

b