MCG Path Constraint a.k.a IncrCloneOnCurve

11 votes
Version: 
2.01
Date Updated: 
08/31/2016

This MCG constraints your object motion to a path. The motion can be repeated forever beyond the curve.

It can also be used to incrementally clone object along a curve and there is no need to adjust the distance

between the clones and count when length of curve changes.

 

Ver 1.01.00: You can now use a curve to control scaling of the clones.

Ver 1.02.00: updated due to SP2 catering for multi curves in a spline. However this will still work only on the 1st curve in a spline. I have not updated multicurves functionality yet.

I strongly advise you to get SP2 as this provides a great speed boost to MCG....and extra stuff, of course.

ver 1.04.00: now supports multi curves in a single spline. Also added Rotation control curve for Cloning, and Fake movement to utilise Scale/Rotation curves in PathConstraint mode.

Ver 1.05: added Pivot Gap option...WARNING: becareful with low gap values....ie. there will be shitloads of clones for gap approaching 0, I've actually put minimum at 1 for safety reasons.

Ver 1.06: updated for Max 2017 to fix Spline/Path related flaw (please continue to use 1.05 for Max2016)

Ver 2.00: This version will work for both 2016 and 2017. Please note for 2017, you'll get deprecated messages, it's OK, it will still compile and run.

Ver 2.01: you can now rotate your path freely

Any small donations to [email protected] would be greatly appreciated. I intend to then fully donate onto the following:

http://www.worldanimalprotection.org/

https://www.worldwildlife.org/

http://www.redcross.org.au/

http://www.savethechildren.org.au/

Thankyou. Meow. Woof. Moooo. Oink. Grrrl.....Bzzzz...

3ds Max Version Requirement: 
2016
Other Requrements: 
SP2, version 1.06 simply requires Max 2017
Video URL: 
AttachmentSize
vu_pathconstraint_1.00.00.zip17.62 KB
getcurvelength.zip1.07 KB
vu_pathconstraint_1.01.00.zip19.26 KB
vu_pathconstraint_1.02.00.zip20.48 KB
vu_pathconstraint_1.04.00.zip25.61 KB
vu_pathconstraint_1.05.zip25.75 KB
vu_pathconstraint_1.06.zip49.49 KB
vu_pathconstraint_2.00.zip25.58 KB
vu_pathconstraint_2.01.zip26.39 KB

Comments

Comment viewing options

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

easy peasy lemon squeezy..

I'll upload it soon....

Seiku's picture

Default Zero value

I'm trying to find a way that would make easier for architects to use it; i.e. to place panels along a path, and it'd be much more practical to set the gap between the center of the objects. I'm still trying to modify it though, I'll see if I can come up with something...

vusta's picture

compound conflicts

yeah I'm not too happy with packaging an MCG properly, ppl install it...then compounds are overridden with same name compounds in another directory...what is the point of 'packaging' then...I've raised this issue but there's only so much I can do.

The gap is between the BBox of the instances ...so they would fit snuggly end to end...

Note that you can make the gap NEGATIVE, so adjust this to your liking..

Seiku's picture

Gap between pivots points?

Ah, sorry, I should have shown a better screen -- No, I actually played with every single value without ever seeing any change. I think there's something wrong with applying the path to the mesh, since it doesn't even place the actual mesh onto the curve (That's what I did with mine, I don't know if yours keep the original mesh untouched or moves or hides it...)

EDIT--After some research I maybe pinned the problem down, but I still haven't the solution; the MaxScript Listener returns many errors...
From what I saw on Autodesk forums and the MCG Facebook Page, this would mean that the compounds used by the scrips are in conflict with their homonyms in Max default folder.

EDIT--After further researcg again, I had to manually delete every compoint pointed out by the listener, then relaunch Max and voilà! The script worked.

EDIT--So, now I have another issue... I thought the gap between clones would be calculated between their pivot points, not the actual gap between the meshes. Would there be a way to change that by modifying the graph...?

AttachmentSize
pathconstraint104.jpg 257.34 KB
vusta's picture

Percent is 0

because you are currently in Clone Percent mode but your Percent is at 0...so there are no clones...even if you have a small value in there it might be below the threshold of 1 clone so you don't see any. So just put in 50%, then play around with it...

If you were in Clone Count mode, you would see 12 according to your setting...

Should work this time...:)

Seiku's picture

V.1.04 issue

Hi! I started using MCG a few days ago, I was going through hell building a clone-on-a-path thingy when I saw yours - same basic idea, I even could recognize some nodes, but waaaaay more complete~
Anyway, I tried to use it (V.1.04, I've got SP2) but i can't seem to make it work -- The mesh I use won't get onto the path no matter what...
The graphic is way more complicated than my current level, maybe you have any idea of what could be going wrong...?

AttachmentSize
pathconstraint104.jpg 251.85 KB
vusta's picture

updated to 1.04

to support multi curves

vusta's picture

Ver 1.02.00: updated due to SP2

updated due to SP2 catering for multi curves in a spline. However this will still work only on the 1st curve in a spline. I have not updated multicurves functionality yet.

vusta's picture

path issue

have you modified something in:

C:\Users\xxx\Autodesk\3ds Max 2016\Max Creation Graph\Compounds ?

because this is overriding my compounds when the graph is evaluated. This is a
path issue which I have no control of. A quick test is to rename

C:\Users\xxx\Autodesk\3ds Max 2016\Max Creation Graph\Compounds to some dummy name, reinstall my mcg and it should work

k2000's picture

Error occurred in

Error occurred in Vu_PathConstraint defined in C:\Users\user\Autodesk\3ds Max 2016\Max Creation Graph\Tools\Downloads\Vu_PathConstraint.maxtool
- ViperEngine.ViperNullArgumentException, Parameter #0 named 'n' of operator ShapeFromNode cannot be null at Autodesk.Max.MaxPlus.ShapeObject ShapeFromNode(Autodesk.Max.MaxPlus.INode)
at Viper3dsMaxBridge.ViperMaxOperators.NodeOps.ShapeFromNode(INode n)
at _anonymous_type_21.{105}lambda_method(Closure , Single x0, Int32 x1) in C:\Users\user\Autodesk\3ds Max 2016\Max Creation Graph\Tools\Downloads\Vu_PathConstraint.txt:line 307
at ViperEngine.ViperPrimitiveOps.ControlFlowOps.Repeat[T](T init, Int32 n, Func`3 body)
at _anonymous_type_21.main(InstanceState state, Boolean UseScaleCurve, TriMesh mesh, Int32 AlignAxis, Boolean Flip, Single RotY, Single RotX, Single RotZ, INode PickPath, Single Gap, INode PickScaleCurve, Single ScaleMult, Boolean Reverse, Boolean PathPercent, Single OffsetPerc, Single Offset, Boolean OutOfRange, Matrix modifierTransform, Boolean Percentage, Single Perc, Int32 Count) in C:\Users\user\Autodesk\3ds Max 2016\Max Creation Graph\Tools\Downloads\Vu_PathConstraint.txt:line 290

Comment viewing options

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