How to rig something like this (spider type legs)

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  06 June 2013
How to rig something like this (spider type legs)

Hi everyone!
I am very new to rigging and was wondering if anyone has any suggestions on where to start if i want to rig something like this: http://www.youtube.com/watch?v=zfNyeOHXgGE

Its the way the legs bend i am interested. They look very flexible and like if they can bend at any point. I looked at some spider rigs but those usually have just 2 bending points.

It looks simple, so hopefully someone can point me in the right direction. Or just give me the name of the rigging technique i should be searching for.

Any help would be appreciated as i am very new to rigging.
__________________
--------
Michael
 
  06 June 2013
he might used spine IK or IK handle with RP solver. i don`t see anything spectacular about that legs though
 
  06 June 2013
Most likely a straightforward spline IK. Could possibly also be similar to a ribbon spine setup.
__________________
ldunham.blogspot.com
 
  06 June 2013
Another way to approach it is just to create curves for each leg and control the curve points with clusters or locators driving the curve points though direct connections. For something really curvy like that where the twist of the mesh (typically along the X axis in Maya) is less important it can be simpler than Spline IK (no joints or skinning involved for one thing).
Then just Extrude a circle curve along each leg curve and leave the history live so that it updates as you animate.

I wrote a script a while back to make setting up this kind of rig easier as I found it a little tedious in Maya (C4D has a built in 'tracer' curve that makes it very simple).
To use this: just draw a curve, select it and run the script and it will create locators that can be used to pose it. Then it's just a matter of extruding along the curve and you're good to go.


 // bh_createCurveControllerLocators 1.1 040113 - now uses global position of locator shape so the controllers can be in a hierarchy 
 // nb the curve must be zeroed out in world space for this kind of rig to work - use clusters or joints if you need to work in world space with hierachies
 
 // get the selected curve
 string $curveSel[] = `ls -sl`;
 string $curve = $curveSel[0];
 
 
 // get the CV count for the curve
 			//	attach a curve info node to the curve
 			string $infoNode = `createNode curveInfo`;
 			connectAttr ($curve +".worldSpace")  ($infoNode+".inputCurve");
 				
 			// Curve Degree
 			int $degree = eval("getAttr " + $curve + ".degree");
 
 			// Curve Spans
 			int $spans = eval("getAttr "+$curve+".spans");
 		
 			//	output the cv count
 			int $numCVs = $spans + $degree;
 			print ("numCVs = "+$numCVs+"\n");
 	
 			// delete the curve info node
 			delete $infoNode;
 
 
 		//	create and position the locators
 			for($i=0;$i<$numCVs;$i++)
 			{
 		// get the position of the vertex 
 
 		float $vtxPos[3] = `xform -q -ws -t ($curveSel[0]+".cv["+$i+"]")`;
  
 		// create a locator and position on the cv
 		
 		string $ng = $curveSel[0] + "_Controller_"+$i;	
 		string $locC[] = `spaceLocator -name $ng`;
 		move -ws $vtxPos[0] $vtxPos[1] $vtxPos[2] ;
 				
 			
 		// tie the CV position to the Locator position	
 		connectAttr -f ($ng+"Shape.worldPosition[0].worldPositionX") ($curve+".controlPoints["+$i+"].xValue");	
 			connectAttr -f ($ng+"Shape.worldPosition[0].worldPositionY") ($curve+".controlPoints["+$i+"].yValue");	
 			 connectAttr -f ($ng+"Shape.worldPosition[0].worldPositionZ") ($curve+".controlPoints["+$i+"].zValue");	
 	
 		}
 


Cheers,
Brian

Last edited by Horganovski : 06 June 2013 at 12:53 AM.
 
  06 June 2013
the way it bends is great with spline ik but i how do i get the foot to stay planted on the ground? the end point is very wobbly and it doesnt stay still in the right place while moving the points.
__________________
--------
Michael
 
  06 June 2013
Originally Posted by Horganovski: Another way to approach it is just to create curves for each leg and control the curve points with clusters or locators driving the curve points though direct connections. For something really curvy like that where the twist of the mesh (typically along the X axis in Maya) is less important it can be simpler than Spline IK (no joints or skinning involved for one thing).
Then just Extrude a circle curve along each leg curve and leave the history live so that it updates as you animate.

I wrote a script a while back to make setting up this kind of rig easier as I found it a little tedious in Maya (C4D has a built in 'tracer' curve that makes it very simple).
To use this: just draw a curve, select it and run the script and it will create locators that can be used to pose it. Then it's just a matter of extruding along the curve and you're good to go.


 // bh_createCurveControllerLocators 1.1 040113 - now uses global position of locator shape so the controllers can be in a hierarchy 
 // nb the curve must be zeroed out in world space for this kind of rig to work - use clusters or joints if you need to work in world space with hierachies
 
 // get the selected curve
 string $curveSel[] = `ls -sl`;
 string $curve = $curveSel[0];
 
 
 // get the CV count for the curve
 			//	attach a curve info node to the curve
 			string $infoNode = `createNode curveInfo`;
 			connectAttr ($curve +".worldSpace")  ($infoNode+".inputCurve");
 				
 			// Curve Degree
 			int $degree = eval("getAttr " + $curve + ".degree");
 
 			// Curve Spans
 			int $spans = eval("getAttr "+$curve+".spans");
 		
 			//	output the cv count
 			int $numCVs = $spans + $degree;
 			print ("numCVs = "+$numCVs+"\n");
 	
 			// delete the curve info node
 			delete $infoNode;
 
 
 		//	create and position the locators
 			for($i=0;$i<$numCVs;$i++)
 			{
 		// get the position of the vertex 
 
 		float $vtxPos[3] = `xform -q -ws -t ($curveSel[0]+".cv["+$i+"]")`;
  
 		// create a locator and position on the cv
 		
 		string $ng = $curveSel[0] + "_Controller_"+$i;	
 		string $locC[] = `spaceLocator -name $ng`;
 		move -ws $vtxPos[0] $vtxPos[1] $vtxPos[2] ;
 				
 			
 		// tie the CV position to the Locator position	
 		connectAttr -f ($ng+"Shape.worldPosition[0].worldPositionX") ($curve+".controlPoints["+$i+"].xValue");	
 			connectAttr -f ($ng+"Shape.worldPosition[0].worldPositionY") ($curve+".controlPoints["+$i+"].yValue");	
 			 connectAttr -f ($ng+"Shape.worldPosition[0].worldPositionZ") ($curve+".controlPoints["+$i+"].zValue");	
 	
 		}
 


Cheers,
Brian



Thank you for the great detailed explanation and script... unfortunatly the legs of my model has some extrudes inside and i cant use an extruded curve as the geometry

Btw that script is really useful!

If i could get any way that i could constrain the foot bone on the ground would be great thought. Any suggestions on that?
__________________
--------
Michael

Last edited by M1KES : 06 June 2013 at 09:39 PM.
 
  06 June 2013
To get the leg to stay put generally I hook up some stretch to the joint chain so that it matches the length of the curve driving it. A bit involved to explain how to do that here but if you search I'm sure you'll find tutorials on setting up stretchy spline IK in Maya, or a script for it on CreativeCrash or elsewhere.

Cheers,
Brian
 
  06 June 2013
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 10:21 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.