View Full Version : coil a snake?
11-16-2007, 04:06 PM
Hi,guys. I just wonder if there is a way to coil a rigged snake? spline IK works fine when rigging a snake . but I find it hard to coil to a circle shape like real snakes do. I tried Flow Path Object in bind mesh and joints , both failed. Any suggestion? Thank you!
11-17-2007, 03:24 AM
since you have a spline IK curve in place, you can have a look at wire deformer.
i saw a tutorial where the author uses an extra path (guide curve) to wire deform this spline IK curve. then you can animate your animation controls which drive your spline IK curve along the length of the guide curve.. sory i cant seem to recollect the url for the tut.. :shrug:
off my head i remembered this, might work...
11-17-2007, 09:48 AM
Hi ashishdantu , thank you! I'll try that .I don't know whether wire deformer can shape a circle shape.I'll just try that.
11-23-2007, 08:05 AM
if you can manage to make a spline into a circle that is. that im not sure about :)
i would also recommend the wire method, its great for snakes and tentacles etc.
i like to make a cluster on each CV then animate the clusters, in order to animate it.
11-24-2007, 07:47 PM
eeeeek Snakes!!!?!! horrible things to rig lol!!
wire deformer is pretty good but you'll find some problems will arise regarding tangency. Give it a shot you may find it works for your purposes of animation but it can start wigging out as the mesh moves around into a circular shape. you may find the entire mesh almost spinning around the wire curve. its certainly been my experience of it - its not exactly softimage xsi's deform by curve which is pure bliss to work with regarding things like this and I wish they'd bloody well stick it in maya... along with deform by surface!!
Are you wanting the snake to coil into a king cobra striking pose? or are you just wanting it to move a bit then twist itself into a coil like its gonna go to sleep?
If its the first "your toast pal" motion you should have a look at how a snake coils into position. Generally the head will stay put, the body pulls itself forward and under into a coil position. This way the snake loses no sight of its target but its body preps itself for a killing strike as it becomes an almost loaded weapon and allows itself to increase its range. bloody nightmare to rig and I have no idea on how to tackle it yet without a copy of maya in front of me to play on lol! (I need a laptop!!)
the second "I'm going to sleep" motion is alot more relaxed. A way to do it may be to recreate the ik spline along the body as you do normally but then extend it off the head with a couple of coils in it and use the iksplines offset to shift the snake along the curve. This should work nicely with a simple snake coiling up into position as if its going to sleep as a snake isn't generally as focused on any prey :)
hope this helps mate - good luck!
11-30-2007, 02:55 PM
hi ant,thank you! I need the snake creeps a certain distance ,and then coil itself , at last lifting its head and staring forward. I don't know wheather path animation will work , at least I will try it. Thank you!
hey yenvalmar ,thank you also !
12-03-2007, 12:02 AM
if and when you get any results, please feel free to post them- i have some snakes i worked on a while back that did everything but coil and this thread is making me want to dig em out of the closet.
I made mine with stretchy splines and then dropped a coulple of sine deformers on top of that so you could adjust wave and amp in x or y and still use spine controllers to get added deformation, but pulling a nice coil together would make it more complete.
12-04-2007, 03:28 AM
a quick reference i found,
12-04-2007, 09:00 AM
that article is really cool - cheers for sharing that - do they have any more on their page as this one seems quite hidden away (couldn't find it from their front page)
just had a thought - we want the skeleton to be controllable by a curve that tackles numerous positions. ie: coiled up.. posed up high to strike... I'm wondering if we have a curve set up on the chain of joints origIkSpline but this curve is driven by a duplicate of that curve BUT posed it so its in a coiled-up/strike postion. Now we can blendshape the origIKSpline into the coiled/strike spline?
I know this wouldn't work neatly - to be honest I think getting it to a coiled position in a nice manner is down to some nice animation and some serious keyframe offsetting and timing lol, but it may help give the rig a degree of flexibility in getting from different positions without having to create different rigs with different setups?
Also it seems like its possible to combine different effects from the curves because of the additive nature of blendshaping? So one curve has a sine deformer running down it, another is the coiled position and the third is a copy that you can offset vertices off? Just done a really simple an quick scene to test it out an it seems to work ok.
good thread this - anyone else got any suggestions? Is there anything someone can suggest involving any broken hierarchy stuff?
12-04-2007, 01:21 PM
Hi , Anton ! I don't quite catch what you mentioned. Do you mean setting up three curves and connecting "worldSpace" to "inCurve" attr of the spine splineIK when using specific curve? Could you post a simple scene file to demostrate?
Thank you !
12-04-2007, 01:37 PM
you know how you can create blendshapes?
well just do the same for your ik spline curve :)
create your snake joint chain
create the curve (snap cv's so they match the joint positions ...20 joints = 20 cv's)
now use that as the driving curve for your ikspline
now duplicate the curve... position the cv's so they're in a coiled/strike position
select coiled curve, then the main ikspline and then create deformers/blendshape.
you can now blend your ikspline into the position of the coiled spline.
beware this is pure brute force linear blend - your snake will sit lengthways along an axis then simply blend into that position which isn't at all how a snake would do that lol - its just a cheataround to save you time in getting the snake into a coiled position :p
12-04-2007, 03:10 PM
Thank you!I've never used blendShpe on curves before. I'll try this. Hope I'd enough time, I'm a little busy this and next 2 weeks. :shrug:
12-05-2007, 10:11 AM
just kicking about but thinking about using a tut that duncan over at autodest did to make a slinky to make a ncloth coiled snake here (http://area.autodesk.com/index.php/blogs_duncan/blog_detail/its_slinky_its_slinky/) and possibly animating that.
OR. . .
make the coil shape, make the snake shape, deform both (wire??) and use multiple blendshapes on and sdk controller to get a smoother blend, cuz mcgrath is right, thats an ugly blend.
12-23-2007, 03:26 AM
Hi , I find this snake reallly amazing : http://www.youtube.com/watch?v=vZDtL5_RA8U. That's the just thing I need. Though I don't know how it works , it can be a reference at least. I rigged a china dragon last week , it's some sort of easy , because it flys in the sky surrounded with clouds, and it doesn't need to coil like snake , splineIk/fk works well. Still I didn't figure out the snake rig. How to smoother the blend between shapes seems to be difficult. Maybe multi blends wiil do , I will try it ,thank you Tripple-I ! I'm really busy last week.
12-24-2007, 01:33 AM
just found something that might help you on highend yesterday :
look for ultraribbonbones there .... seems to be quite what you need
12-24-2007, 04:49 AM
Hi,guys. I just wonder if there is a way to coil a rigged snake? spline IK works fine when rigging a snake . but I find it hard to coil to a circle shape like real snakes do. I tried Flow Path Object in bind mesh and joints , both failed. Any suggestion? Thank you!Hi johnchuang,
Why was that hard? Drawing a curve that coils? You didnít give details about where you are stuck but if thatís the problem let me know - there are plenty of ways to create a curve with any shape.
If you can draw the path spline IK curve, but your problem is with controlling the IK handle, follow these suggestions to create an animation similar to the one from your link:
Create the parent joint at the neck of the snake and add the rest of the joints to the end of the tail with a density that will make the deformation look smooth from the distance of your camera. Then add a few joints on the other side of the parent joint for rigging the head and jaws. In the options of the IK Spline Handle Tool uncheck Auto create curve. Following the instructions from the Help line at the bottom of your screen, first click (or select in Outliner) the parent joint, then the last joint on the tail, and finally click the path curve to use it for the IK spline handle.
To animate the snake going along the path, animate the Offset value in the IK Solver Attributes section of the ikHandle tab (node). To control the twisting, in the next sections go to and enable Advance Twist Controls, then choose or if necessary animate the Up Axis.
12-24-2007, 01:47 PM
Hi,Emil3d. Thank you for reply!
circle shape is not that hard , creeping fowards is also not hard. I feel difficult to get a smooth transition between two different motions.
Hi ,asche! Thank you! I got that mel too. It seems nice. but some warnning occurs when I try to rotate the control point locator beside the joints. I'll read the script thoroughly to figure out that.
PS: Happy X-mas!
12-24-2007, 02:34 PM
...I feel difficult to get a smooth transition between two different motions....It is hard to imagine what motions you have in mind without seeing your storyboard sketch with the key frames of the motions. But the motions in the animation posted on You Tube from your link is very easy and simple to do. Itís something like 15 minutes job to rig and animate.
12-26-2007, 12:39 PM
Hi ,Emil3d! I'm afraid that I have no storyboard sketch. It's just an sudden idea came to me to get a nice snake creep and coil anim . I'm newbie , and I don't know how to rig it properly. I'm so excited if it is really a 15min work.Will you be so kind to share some info. Since there is no storyboard, we have no limitation then. just some motion like that nice snake on youtube will be great. Thank you very much!!!
12-27-2007, 06:37 PM
Hi johnchuang, I meant to say that the snake animation you are referring to is really simple and that easy if you try the suggestions from my previous post #16. If you have problems following my instructions let me know.
Later today Iíll have some time and will try to make and animate a similar snake animation. Iíll share the result.
12-28-2007, 07:59 AM
johnchuang, I made this Playblast snake animation with the technique I suggested earlier. It took me about an hour but I got carried away with modeling the snake. The animatin is very simple but effective. You have to download the file uncompress and watch it on you computer.
If you have Maya 2008 I'll upload the file too.
12-28-2007, 02:44 PM
hi Emil3d! It's very nice! I've never thought using a curv longer than the skeleton to set up the splineIK , that's where I stuck. Also I neglect the "offset" attr . Actually , I never use that attr before. Sorry for my ignorance. Thank you very much for your time!
what's more, I find it will work to combine curv blendShape with this. It seems possible to anim splineIk as normal , and blend in curves pre defined when needed. I find the key point is make the curve's stright part long enough , which prevents the base skeleton bending when turn on the blendShape.
Emil3d, thank you again!:thumbsup:
12-28-2007, 09:37 PM
You are welcome johnchuang. There were a few things I did in the animation that were not mentioned before. Since the IK handle is controlling only one branch of joints - from the root joint at the neck to end of the tail, the other branch of joints controlling the rotation of the neck and head has to be animated separately. I animated it using aim constraints to 2 objects. The first one is the little bone with two joints that travels just in front of the snakeís nose along the same curve, and the second aim object is the camera. The little bone has its own IK handle on the same curve as the snake and is using the same animation with some offset by a simple expression like this:
ikHandleAim.offset = ikHandleSnake.offset - 5;
Depending on the direction of your curve it could be Ė or + a number.
In the constraint node I animated the weight of the two aims so that the snake after it coiled stopped looking at the little bone and turned its head towards the camera while raising and attacking.
At the end I simply animated manually the lasts CVs of the curve to make the snake jump at the camera. I didnít use any curve blendshapes, but they can be used for creating controls for much more sophisticated rigs.
Hope this helps
01-03-2008, 02:17 PM
Hi,Emil3d ! Thank you very much! your method is really cool!
since coilling snake is done, I begin to wonder how to rig a inch worm. yeah, it must be cool too. About inch worm, any suggestions?:)
01-03-2008, 11:03 PM
I put one together quickly using an expression on a simple ikrpSolver
ikHandle1.translateX = -(sin(time*2)) *4
but thats a cheap hack, expressions are slow and im sure it can be done better with nodes or some other method, no time now though. Later maybe.
01-07-2008, 01:46 PM
Hi Tripple-I, your expression works nice ,however , the motion I want to achieve is some sort like the link below:
it must be great fun to animate such a rig , but how to build it?:shrug:
01-07-2008, 07:36 PM
This can be done with a simple IK handle.
In the side view draw the joints of the skeleton in an arch like the pose when the worm contracts. Then add an IK handle by clicking at the start and end joints and thatís it, you are done with the rigging:).
Now start animating; go to the first key frame, pull the IK handle to stretch the skeleton (if you wish you can skin your worm at that pose), select both the IK handle and the root joint and key their transforms. Go to the second key frame, push the IK handle forward to contract the worm, key the handle and the root joint. Go to the next key frame select the root joint, pull it forward and up, and key it. Go to the next key frame move the root joint to the ground and key both - the root joint and IK handle. Thatís basically it, continue repeating the steps and if you want to make a walk cycle make one of the repeating motion with identical pose to the pose at the first key frame, then you can use the Trax editor and a character clip to repeat a walking cycle.
Hope this helps.
01-08-2008, 01:17 AM
Hi,Emil ! Thank you for reply! Is that means the worm must modeled in a squash pose? The straight pose maybe not work I guess?
01-08-2008, 01:57 AM
No, model and UV the worm straight. A poly cylinder is a good start.
As I suggested in my previous post, after drawing the squashed (folded) skeleton with a shape like this Ω and attaching an IK handle, pull the IK handle to straighten the skeleton like this ó
Then put the worm around it and skin/bind it at that pose.
01-10-2008, 01:04 AM
Hi,Emi .Thanks a lot ! It is really cute! thank you !
01-10-2008, 01:04 AM
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.