Motion path and double linear nodes

300 views
Skip to first unread message

joiec...@gmail.com

unread,
Aug 26, 2021, 12:59:24 AM8/26/21
to maya_he3d
Hi there,

When I create a motionPath for an object with the "follow" option, it creates three doubleLinear nodes (I guess in order to allow you to offset those values).
I don't really need that functionality and it throws the loop warning in the script editor, which I don't want at all.
So, I can just remove them and simply connect the translations right away.
BUT, I need to create a motion path for HUNDREDS of objects. So I guess is therer a way to AVOID the doubleLinear nodes at the creation of each motionPath (may be via command)?

Thanks for your help! :)

stephen mann

unread,
Aug 27, 2021, 10:27:52 PM8/27/21
to maya...@googlegroups.com
I’d probably script this and just make all the nodes individually a connect them up. 
  The recipe is already there.  



-=s

On Aug 26, 2021, at 12:59 AM, joiec...@gmail.com <joiec...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "maya_he3d" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maya_he3d+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/maya_he3d/370d9d8c-cd21-4fbf-98ce-34f8078a9cd7n%40googlegroups.com.

bobrobertuma

unread,
Aug 27, 2021, 11:10:38 PM8/27/21
to maya...@googlegroups.com

To back up Stephen.  Consider Maya dumb (What makes it elegant as well) Get the pieces out and stripped down you want to connect up then run loops and if for then’s.

stephenkmann

unread,
Sep 1, 2021, 10:57:28 AM9/1/21
to maya...@googlegroups.com
I rushed a tutorial out.. the first 2 times I was better, but the sound had a lot of noise in the BG. 
so sometimes the third time is not exactly the charm.
 however. it should get you going to what you want.




--

joiec...@gmail.com

unread,
Sep 2, 2021, 11:29:17 AM9/2/21
to maya_he3d
Thank you very much.
I dissasembled the way motionPaths are created by the menu and saw the connections are pretty standard without the double linear nodes and still work perfectly.
I stuck at some point with the mel part (before you posted your tutorial) and ended up using a free script calle connect correscponding attributes or something like that, which worked perfectly.
I'll watch your tutorial, but I can't thank you enough for your time to do it! :)

Steve Davy

unread,
Sep 2, 2021, 8:41:42 PM9/2/21
to maya...@googlegroups.com
... and isn't this just a great example of how bloated and broken Maya is, when some of its own standard tools create nodes that are apparently completely unnecessary 😕. For one motion path it's not a big deal, but since as you say you are creating hundreds (I've had similar situations), that's a lot of redundant nodes.


From: maya...@googlegroups.com <maya...@googlegroups.com> on behalf of joiec...@gmail.com <joiec...@gmail.com>
Sent: Thursday, September 2, 2021 8:29 AM
To: maya_he3d <maya...@googlegroups.com>

stephenkmann

unread,
Sep 3, 2021, 1:44:50 AM9/3/21
to maya...@googlegroups.com
meh, I've never done it this way before. 
 and I've had scenes with close to100's of path animation nodes without any playback issues.

joie

unread,
Sep 3, 2021, 4:53:02 AM9/3/21
to maya...@googlegroups.com
Well, they are NOT completely unnecessary nodes..., they are so for me in this exact situation. Those nodes allow you to offset any parameter of the path animation, so they can be useful if you need them. All I say to Autodesk is, please allow people to decide if they need that feature or not in the option box.

You received this message because you are subscribed to a topic in the Google Groups "maya_he3d" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/maya_he3d/-Vv-_mvl8ME/unsubscribe.
To unsubscribe from this group and all its topics, send an email to maya_he3d+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/maya_he3d/BYAPR07MB5861E9C48CBA2171A0589C54DDCF9%40BYAPR07MB5861.namprd07.prod.outlook.com.


--
Visita mi blog: 3djoie.blogspot.com

stephenkmann

unread,
Sep 3, 2021, 11:35:17 AM9/3/21
to maya...@googlegroups.com
also just Fyi,, I was just deleting my old tabs in my script editor ( I'm up to 53!! ) 
and this is from just a few weeks ago... 
It just  takes all your selected objects and the given curve input and attaches them all via motion path.     
 Just an example of quick scripts you can write to make your life easier.   ( I have a much more involved tool I wrote. but it wasn't available on the cloud computer I was on ( nor internet). so a few lines of code and i got what I needed. 

def multiPath(startFrame = 1001, endFrame = 1501, crv = None):
    sel = cmds.ls(sl = True)
    for each in sel:
        moPathNode = cmds.pathAnimation( each, curve = crv ,startTimeU = startFrame, endTimeU = endFrame, follow = True, followAxis = "z", upAxis = "y", worldUpType = "scene", inverseUp = False, inverseFront = False, bank = True, bankScale = 1, bankThreshold = 90)
        print (moPathNode)

multiPath(crv = 'curve1')

bobrobertuma

unread,
Sep 3, 2021, 1:32:46 PM9/3/21
to maya...@googlegroups.com

Nice.  Begs question what scene your making that you need tons of objects on a shared path?  Is this for cars on a highway or something?

Steve Davy

unread,
Sep 3, 2021, 2:07:48 PM9/3/21
to maya...@googlegroups.com
This could be used for all kinds of things. So far as I'm aware, motion paths are still the easiest way of constraining objects to curves. Half the time I use moPaths it's not even for any animation purposes. A u value offset incrementer feature would be great (I'm guessing Steve's other tool includes something like that), as well as the ability to choose whether or not the U value has keyframes auto set on it at creation or not.


From: maya...@googlegroups.com <maya...@googlegroups.com> on behalf of bobrobertuma <bobrob...@gmail.com>
Sent: Friday, September 3, 2021 10:32 AM
To: maya...@googlegroups.com <maya...@googlegroups.com>
Subject: RE: [maya_he3d] Motion path and double linear nodes
 

joie

unread,
Sep 3, 2021, 3:37:48 PM9/3/21
to maya...@googlegroups.com
I'm making several ski stations with, literally hundreds of cabins, so I'm using motion paths intensively.
Also noticed some math errors when laying UVs for the cable. When you unwrap such thing and long (kilometres) mesh, the process is not accurate anymore. Weird.

stephenkmann

unread,
Sep 3, 2021, 4:44:41 PM9/3/21
to maya...@googlegroups.com
For me I was doing  a swarm of flies.    
I made a huge crazy jumbled up path curve. then put all the flies on that same curve, but randomly offset the start and ends .  
So it was less train car, and more laziness on my part to quickly fill a scene with dozens of flies. 

But yeah there are all sorts of times I'll do that. with incrementing in U. ( I show it in that tutorial as well.. it's trivial once you get going ) 

For a ski lift. nice!      That would make an excellent tutorial.. Especially with deciding whether to make it a closed loop or not. automatically adding sway and bounce.   Which chairs have ppl or not. how many of those ppl are skiers vs snowboarders.. etc etc. !! 
oh man, you could even do a random curve selector for as they get off and transfer from chair to slope ! 

You could also use a pointOnCurve and change it's U over time.. but you may need to give them an up Vector. 

So for the ski lift I'd probably give upVector objects on a mirrored path and connect the uValues. ( something else I do regularly as well ) ( * but I guess they really should always be Y up, unless gravity is having an effect. or you really crank up the speed of the lift and need banked turns..)

BTW: you could instead of extruding along those cables.. use a curve Render node. and render the curves as geometry 

-=s 














bobrobertuma

unread,
Sep 3, 2021, 7:44:44 PM9/3/21
to maya...@googlegroups.com

I’ll watch your tut this weekend.  Always nice to see an interesting Maya tut or have one in the waiting J

joie

unread,
Sep 6, 2021, 4:36:47 AM9/6/21
to maya...@googlegroups.com
Man, you don't know how MANY times I wished MASH could take rigged models as input for the distribute nodes, that would made my life so much easier. I could do everything with MASH networks...., but I can't :(
BTW, I tried the render as curve feature, but for some reason, I can't in the name of God, put the cable texture to be applied in the V direction!
I mean, I can render the curve as a tube (GREAT), but if I need a textured cable, then the texture can't be controlled in any way, it's like the cable had UVs only in one direction but not in the other (you can try yourself).

Steve Davy

unread,
Sep 6, 2021, 5:30:33 PM9/6/21
to maya...@googlegroups.com
Referencing and instancing can be leveraged pretty heavily for situations where you want multitudes of the same rig in a scene. Done right this approach is surprisingly robust and allows for randomization too.

Of course, you still can't use MASH and won't get any procedural distribution for free, but that can be scripted pretty easily.


From: maya...@googlegroups.com <maya...@googlegroups.com> on behalf of joie <joiec...@gmail.com>
Sent: Monday, September 6, 2021 1:36 AM
To: maya...@googlegroups.com <maya...@googlegroups.com>

joiec...@gmail.com

unread,
Sep 7, 2021, 5:57:56 AM9/7/21
to maya_he3d
Yep. The scene is pretty heavy because I have dozens of towers (with their own rig since they have to adapt to terrain and cable tension), hundreds of chairs (with their own rig too, since some parts follow the cable and others follow gravity) and thousands of people sit in those chairs. Thankfully the people is made with MASH, so they are pretty fast and simple.

desig...@gmail.com

unread,
Sep 11, 2021, 5:01:59 PM9/11/21
to maya...@googlegroups.com
Joie,
Now I want to see the scene! Please show!

R

joiec...@gmail.com

unread,
Sep 13, 2021, 12:07:40 AM9/13/21
to maya_he3d
I'm really sorry, NDA contracts :(
Reply all
Reply to author
Forward
0 new messages