Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Rigging and animating a energy chain

Rigging and animating a energy chain

svenhaan
Observer Observer
4,769 Views
19 Replies
Message 1 of 20

Rigging and animating a energy chain

svenhaan
Observer
Observer

Hi folks,

 

I am currently having some difficulties in rigging and animating an energy chain. For those not familiar with these devices have a look at the picture below.

 

The idea is that both end elements are fixed. The lower one on a static machine part, the upper one on a moving part. The chain keeps the form shown in the picture if the moving element is only moved on the linear axis. (see https://www.youtube.com/watch?v=PvP3sDW_ekc)

 

I already modeled the thing and put bones into it. That basically works. But no matter which kind of IK solver I apply between the both end elements, the behavior is quite stange. If the chain is modelled flat on the ground, the HI solver does...nothing. If I move the bones into the shown position, the HI solver seems to be trying to maintain that curve exactly at the angled elements while also trying to maintain the straight parts where they are. And the HD solver completely messes up everything.

 

Then I thought to make the form out of a spline and use the spline solver and link the spline to the moving end element. But the help told me that moving the spline is not meant to be done.

 

So, does anyone have an idea how to do this?

energiekette-1

 

 

 

 

0 Likes
Accepted solutions (1)
4,770 Views
19 Replies
Replies (19)
Message 2 of 20

Anonymous
Not applicable

HI,

 

Try using Path Deformation. i hope it works

0 Likes
Message 3 of 20

leeminardi
Mentor
Mentor

You could think of the energy chain as a closed chain like you would find on a bike.  Create a full closed spline that is longer than the chain and add a IK Spline constraint and path as found at the start of this video: https://www.youtube.com/watch?v=UTWCt2yYwIc&t=94s

 

Rig the entire spline path to move in sync with the transport piece that move so that the beginning of the chain is stationary but the entire path is moving.

 

Post a file with the chain and I will give it a try.

 

~Lee

lee.minardi
Message 4 of 20

leeminardi
Mentor
Mentor

Here's a Screencast showing the results of what I was trying to say in my last post.  Does this represent what you are trying to do?

 

~Lee

lee.minardi
0 Likes
Message 5 of 20

svenhaan
Observer
Observer

Oh yes! That is how it should look.

 

But I didn't get how the animation is done yet. Do you mean to link the spline to the moving machine part, forcing the spline-constraint chain to follow it?

 

Sorry, I haven't had time to try this out...

0 Likes
Message 6 of 20

leeminardi
Mentor
Mentor

The velocity of the spline loop will be 1/2 the velocity of the machine part.  You can control its motion with just a couple of key frames or set up a wire parameter to make it automatic.  If the machine part is always going in, say, the x-direction this would be straightforward.

 

In the drawing below I have wired the x position of the spline (line001) to the percentage along the path of the first bone.  Since percentage along a spline is not equal or linearly proportional to the distance along the path there will be some error and a fudge factor may be needed. In this case I moved the spline to x = 60 then adjusted the value.  Since a bone is 5 units long, and we are working with percent, I started with a value 0.01 / 5 = 0.002 then adjusted this value until the end bone was at the same point when the spline was a 60 as it was when the spline was at zero.  I think the results are pretty good for this amount of travel (the 25 in the wire parmeter is just an arbitrary offset).

energy-chain1.JPG

 

Lee

lee.minardi
Message 7 of 20

leeminardi
Mentor
Mentor
Accepted solution

The velocity of the spline loop will be 1/2 the velocity of the machine part.  You can control its motion with just a couple of key frames or set up a wire parameter to make it automatic.  If the machine part is always going in, say, the x-direction this would be straightforward.

 

In the drawing below I have wired the x position of the spline (line001) to the percentage along the path of the first bone.  Since percentage along a spline is not equal or linearly proportional to the distance along the path there will be some error and a fudge factor may be needed. In this case I moved the spline to x = 60 then adjusted the value.  Since a bone is 5 units long, and we are working with percent, I started with a value 0.01 / 5 = 0.002 then adjusted this value until the end bone was at the same point when the spline was a 60 as it was when the spline was at zero.  I think the results are pretty good for this amount of travel.

energy-chain1.JPG

 

Lee

lee.minardi
Message 8 of 20

svenhaan
Observer
Observer

Works. Cool. I was thinking too complicated...

 

But can you explain why percentage along the spline is not proportional to the distance? I mean, the spline does have a length and travelling along the spline e.g. 50% means, moving 50% of that length...

0 Likes
Message 9 of 20

leeminardi
Mentor
Mentor

"But can you explain why percentage along the spline is not proportional to the distance?"

 

The short answer is that the calculation of the length of a spline is messy to do analytically.   Approximations are made in CAD software to speed the calculation.   Numerical solutions (i.e., trial and error techniques) can provide adequate results. 3ds Max does a good job but there will be a differences in length measurements for sections of a spline with fairly flat curvature than where the spline has a tight curvature.  For some applications this difference between true percentage along the spline based on length will be different than the position determined by 3ds Max.  For your application I think the difference will be negligible.

 

I am glad the rigging works for your application

 

~Lee

 

lee.minardi
0 Likes
Message 10 of 20

phlyx
Collaborator
Collaborator

Stumbled across this thread and sounds like a good solution for doing close to what we're looking for.  But is there a way to actually constrain the energy chain to the fixed and driven components so you can have it installed in a flexible assembly (IAM) and manually move the devices and have the energy chain "act" as it would in the real world?  Would be really helpful in designing the supports and rigging around moving assemblies that require energy chain.

 

Thanks.

0 Likes
Message 11 of 20

Anonymous
Not applicable

Hi, I'm creating a chain too
but I did not understand the passage you indicated
if I use your file it works but I can not create it again using new lines and bones

you could help me by explaining the passage better

0 Likes
Message 12 of 20

leeminardi
Mentor
Mentor

Can you post a 2018 or earlier Max file of the chain model you have created and explain what you would like the rigging to do?  I will take a look at it.  When I have some time I could create a video tutorial.

 

Lee  

lee.minardi
Message 13 of 20

Anonymous
Not applicable

Hello
thanks for the answer I am attaching the file (maximum use 2016)

the problem is that the chain is rotated during the sale

and I can not anchor it as you did in your example

0 Likes
Message 14 of 20

leeminardi
Mentor
Mentor

I did not get the problem with the rotating tread using Max 2018.

 

In the attached file I wired the line Rectangle003 to Bone001 with the relationship 1.0/2036*X_Position. 2036 is the length of rectangle003 which you can get from the Utilities Tab , Measure.  You can move rectangle003 in the X direction and the treads will stick (almost) to the ground.  I also rotated rectangle003 by 180° about Y as the treat were playing out upside down.

tr1.JPG

lee.minardi
0 Likes
Message 15 of 20

Anonymous
Not applicable

Hello
the chain works
  but as the wheels rotate the segment of 180 still
I tried to create the spline again but keep on giving me this problem

where am I wrong?

0 Likes
Message 16 of 20

leeminardi
Mentor
Mentor

I see the twist you are highlighting. I can reproduce it by moving rectangle001 to x = 255.06.

tr2.JPG

I think the problem is caused by your choice of the upnode for IK Chain001.  YOu have chosen Point001 which lies directly in the x direction from the location on rectangle001 where the tread is twisting.  This yields an ill defined plane for the IK solver when a bone is in line with it.  The IK Solver uses three points to define its plane.  Its root, target and a third point, the upnode, if XY plane is not to be used. 

Try the following. Add a dummy object and align its position and orientation with the pivot of rectangle001.  Then move the dummy in the Z world direction and then link it to rectangle001.  This will serve as a reference point for the IK Solver plane. 

tr3.JPG 

 

lee.minardi
0 Likes
Message 17 of 20

Anonymous
Not applicable

I think the problem is how the basic spline is drawn

I tried different solutions

now try also your solution

thank you

0 Likes
Message 18 of 20

Anonymous
Not applicable

now works
the oriental elements are correct,
I did as you told me with the dummy

the last problem is that the movement of the chain does not move smoothly, but moves jerkily

0 Likes
Message 19 of 20

leeminardi
Mentor
Mentor

I don't know why the motion is jerky.  Since this thread is noted as having a solution you may get more eyes looking at the problem if you start a new thread specifically for this problem with a descriptive title for the post.  Include a sample Max file if you can.

lee.minardi
Message 20 of 20

malcomarmstrong
Advocate
Advocate

Have you got the animation curves set to step? Just dipped in to this, not read it all yet.

0 Likes