Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / Rigging / Piston Rig with IK?
  RSS 2.0 ATOM  

Piston Rig with IK?
Rate this thread
 
63415
 
Permlink of this thread  
avatar
  • cptfuro
  • Posted: 09 January 2012 11:17 AM
  • Total Posts: 5
  • Joined: 13 May 2008 05:32 PM

I came across this nice little tutorial for Lightwave…

http://youtu.be/p1EPcTeqeuc

...and I so tried to setup a similar rig in 3ds max 2010. I tried out many different approaches, but I couldn’t quite figure it out. Am I somehow missing the point, or is such an IK driven piston rig actually pretty difficult to do in 3ds max?



Image Attachment Video
Replies: 1
/img/forum/dark/default_avatar.png

You can do this with just “Look At” Constraints

Author: El Camino

Replied: 10 January 2012 11:27 AM  
avatar
  • cptfuro
  • Posted: 11 January 2012 09:45 AM

I know how you would set up a sliding piston with “Look At” constraints… But I think you might have misunderstood my post…

What I would like to achieve is that the upwards and downwards movement of the piston cup is being driven by the rotation of the base object, just like in the video. I don’t want to animate the piston cup manually or wire parameters or something.

If there actually is a way how to set this up just with “Look At” constraints, could you please briefly explain how?



Replies: 1
/img/forum/dark/default_avatar.png

Sorry dude, I dont have time to explain.  Louis Marcoux has some good tutorials.

http://area.autodesk.com/lou...rchitecture_visualization

Author: El Camino

Replied: 11 January 2012 11:03 AM  
avatar
  • cptfuro
  • Posted: 11 January 2012 09:20 PM

Thanks a lot, that’s a very helpful link!

I’ll try to solve this, and once I have found a straightforward solution, I will post about it again!



Replies: 0
avatar
  • pen
  • Posted: 18 January 2012 11:50 PM

We don’t have position IK as they call it in lightwave so it is harder in max. Trig is one of the cleanest solutions an you can see my site for a quick trig lesson using script controllers.



Paul Neale
PEN Productions Inc.
penproductions.ca / paulneale.com
Master Classes for Max, Mudbox and Composite
DotNet Tutorials

MX Driver Car and Trailer Rig On Sale!

Replies: 1
/img/forum/dark/default_avatar.png

what does ‘position IK’ in Lightwave do?

Author: MLB

Replied: 18 April 2012 04:52 AM  
avatar
  • CBruce
  • Posted: 17 April 2012 01:19 PM

Bit late with this reply, but a lookAt constraint and a couple of helpers should do it.

1 - Helper 1 at base of piston head. This serves as the look at target for rod and parent for piston head assembly to move up and down
2 - Helper 2 at base of rod, offset to pivot point of rod and linked to the rotating camshaft, but set to not inherit rotation. So it basically orbits around the shaft as it turns.
3 - Rod linked to campshaft and then lookAt constrained to Helper 1
4 - Helper 1 linked to helper 2, but set to only inherit movemetn on the Z axis (up and down)

This setup is simple and it works, but it’s not very condusive to being moved around or having the whole assembly rotated...as in it’s part of an engine in a car that’s driving around. If you need it to do more I think you just need to find a different solution rather than relying on inherit transform flags.

Cannot figure out how to attach Max 2009 file of this setup in action.



Christopher L. Bruce - Senior Animation - Cryptic Studios
3DSMax 2009 (SP1) 32-bit/64-bit - Windows 7 Enterprise 64-bit
Intel Core(TM)2 Quad CPU Q9550 @2.83GHz - 8.00GB RAM - GeForce 9800 GT (1GB)

Replies: 4
/img/forum/dark/default_avatar.png

step 4 is not correct because the angle of the rod also defines the position of the piston

Author: MLB

Replied: 18 April 2012 04:48 AM  
/userdata/avatar/3rnvknz3j.jpg

In reality, yes. But in a rig that would cause a circular dependancy. So you’ve got to find a solution around it that does the same thing, even though the two parts are not physically connected in the rig.

Author: CBruce

Replied: 18 April 2012 06:43 AM  
/img/forum/dark/default_avatar.png

Not in any rig, see below.

Author: MLB

Replied: 18 April 2012 07:33 AM  
/userdata/avatar/3rnvknz3j.jpg

There’s a half dozen different ways to do something like this in Max, from helpers and constraints to reactor controllers, to script controllers, and even HD-IK utilizing sliding joints.

An HD-IK solver will give you something close to the example video, but it’s overly complicated for such a simple mechanical relationship in my opinion.

Author: CBruce

Replied: 18 April 2012 10:41 AM  
avatar
  • Location: West Midlands, England, UK
  • Total Posts: 14446
  • Joined: 06 August 2007 11:06 PM
  • Permlink of this post

Cannot figure out how to attach Max 2009 file of this setup in action.

Same way as any other non-image file. Zip it and attach it. See this post if you’re still having problems.



Max 4.2 through 2013.
XP-64 (SP2)
NVidia 9800GTX-512 (Driver 266.58).
Core 2 Quad Q6600 2.4GHz, 8Gb Ram, DX9.0c.

Replies: 0
avatar
  • MLB
  • Posted: 18 April 2012 04:51 AM

You can do this using the old history dependent IK solver, because it supports sliding joints.
See eg. the rig i did here:
http://area.autodesk.com/for...-hexapod-machine-linkage/

Alternatively you can use spline IK, but this is a bit non-intuitive to set up:
See eg. the rig i did here:
http://area.autodesk.com/for...rigginganimation-problem/



3D Studio DOS to 3ds Max 2010
Windows XP 64
NVidia Quadro FX 3700
Dual Quad Xeon, 6Gb Ram

Replies: 1
/img/forum/dark/default_avatar.png

Thanks MLB, those two rigs are quite nice and a good inspiration! Maybe this way I can finally get it working…

Author: cptfuro

Replied: 23 April 2012 08:47 AM  
avatar
  • CBruce
  • Posted: 18 April 2012 06:39 AM

Attached Max 2009 scene with one method.



Christopher L. Bruce - Senior Animation - Cryptic Studios
3DSMax 2009 (SP1) 32-bit/64-bit - Windows 7 Enterprise 64-bit
Intel Core(TM)2 Quad CPU Q9550 @2.83GHz - 8.00GB RAM - GeForce 9800 GT (1GB)

Attachment Attachment
Replies: 1
/img/forum/dark/default_avatar.png

Thanks, just had a look at your file… But the problem with this rig is that is not behaving correctly… it will always be a little off.

As MLB mentioned above, the outward angle of the rod (and the resulting distance) must affect the vertical movement of the piston cup. If you look closely at your rig, you will see that the top of the rod wobbles vertically inside the cup.

With larger radii at the bottom shaft, this problem will become more and more apparent…

Author: cptfuro

Replied: 23 April 2012 08:23 AM  
avatar
  • pen
  • Posted: 25 April 2012 03:48 AM

This is not a linear problem, it requires angles to be calculated to be exact.



Paul Neale
PEN Productions Inc.
penproductions.ca / paulneale.com
Master Classes for Max, Mudbox and Composite
DotNet Tutorials

MX Driver Car and Trailer Rig On Sale!

Replies: 0
avatar
  • MLB
  • Posted: 01 May 2012 03:04 AM

Yet another way to do it, this time using NURBS curves.

Much more flexible than using trigonometry.



3D Studio DOS to 3ds Max 2010
Windows XP 64
NVidia Quadro FX 3700
Dual Quad Xeon, 6Gb Ram

Attachment Attachment
Replies: 0
avatar
  • pen
  • Posted: 01 May 2012 03:28 AM

What on earth made you think of that. That is very cool and I have not touched NURBS in so long I would have never remembered that it created a point like that. Very cool indeed.

Your right it is more flexible then trig, wonder which is faster in a complex system as NURBS have never been fast to calculated.

Just as a note you don’t need dependsOn in script controllers as long as you add the node via the node variable option.



Paul Neale
PEN Productions Inc.
penproductions.ca / paulneale.com
Master Classes for Max, Mudbox and Composite
DotNet Tutorials

MX Driver Car and Trailer Rig On Sale!

Replies: 0