PDA

View Full Version : What is the best way to animate a slithering snake ?



blackmondy
09-15-2017, 07:28 AM
As above.

inkpen3d
09-15-2017, 08:34 AM
https://www.youtube.com/watch?v=b_rFztpHYLc&t=840s

kolby
09-15-2017, 08:50 AM
Trailer plugin is your friend. Simple, fast and easy to use.

http://www.dstorm.co.jp/dsproducts/FreePlugins/Displacement/Trailer.html

blackmondy
09-15-2017, 09:10 AM
https://www.youtube.com/watch?v=b_rFztpHYLc&t=840s

That looks pretty tedious.

MonroePoteet
09-15-2017, 06:19 PM
That looks pretty tedious.

The Trailer plug-in may be the way to go, but if the tools in Modeler and Layout are used effectively the Spline setup is pretty easy. Modeling a good-looking snake is the hard part. Attached is a sample scene, where the (very simple) modeling and Spline setup took about 8 minutes. Here are the specific steps:

In Modeler:


Make a "fake snake" - a 50-segment cylinder down the Z axis with its nose at (0,0,0)
From the Back view, use Edge selection to Copy-n-Paste one of the longitudinal edges
Using Polygon selection, lasso the pasted edge's polygons (50 2-point polygons), and move the poly chain it to the center of the cylinder
On the poly chain:

select 2 points from the snake's tail towards its nose
press "]" to select the points to the end of the poly chain
press CTRL-P to create a curve

Select the Curve and press Setup=>Convert Skelegons to convert the curve into 50 skelegons
Using the Polygon Statistics panel delete the 50 2-point polys and the curve
In Layer 2, use Add Points ("+") to add points along the path you want the snake to slither
Press CTRL-P to create a curve, which will be used for the Spline in Layout
Save the two-layer fake snake, send it to Layout


In Layout:


Load the fake-snake two-layer object, if not already loaded
Select Layer 2, use Setup=>CurveToSpline to create the Spline
Use Scene Editor to select all the nodes (bones) created by CurveToSpline
Using the Object Motion panel, in the Controllers and Limits tab, set all nodes to have Spline Control on Heading and Pitch
Using the Rotation numeric panel, set all their Banks to 0.0
Select Layer 1, and use Setup=>More...=>Convert Skelegons to Bones
Use Scene Editor=>Selection=>Select child items (recursively) to select all the bones created by Convert Skelegons
Using the Object Motion panel, set their Spline Control to the Spline created above
Select the top Bone (usually Bone.000 (1)), and use its Z position to slither the snake down the Spline


Obviously, modeling a better looking snake would take a while, but the trick of using an Edge converted to a Curve converted to Skelegons and then using bulk-selection in Layout's Scene editor makes the setup fairly simple. At least once you get used to it! :)

mTp

JamesCurtis
09-15-2017, 06:30 PM
I'm not 100% sure, but I think you could get a decent snake model from Daz3d or other model sources. Animate as in the previous poster's example above.

Oldcode
09-15-2017, 08:30 PM
I'm not 100% sure, but I think you could get a decent snake model from Daz3d or other model sources. Animate as in the previous poster's example above.

Yes you can. Download DAZ for free, load the snake model you're interested in, then export it to OBJ. You can import it directly into Lightwave and save it as a LWO. Bring the snake model into Layout and give it a series of bones along the length of the snake's body. Then use this Spline Control tutorial to see how you can animate the snake to move along the spline, which can be shaped with any kind of path you want. You use the Spline Control option in the Object Motion Options panel to have the spline control the movement of the bones, which will control the snake.

https://www.youtube.com/watch?v=kHAtN-gpyh8&t=266s

137906

Here's a short clip of a snake coming down from a tree that I did using the same technique.

Hope this helps,

Surrealist.
09-16-2017, 12:12 AM
That is all well and good. But snakes don't move that way. Just in case you are interested how they actually move first. That is all dependent on what you want to accomplish. People viewing this will know it instinctively even if they can't tell you why. The spline method is not how they actually move. Unless it is dead and you are pulling it with a string through a flexible moving pipe. Then the spline method is fine. ;)

Though you could with some study animate something approximate. But the spline method falls short on the physics side of it. It just does not happen that way. Look closely at some of the examples:

https://www.youtube.com/watch?v=gbxaC2-o0Gs

https://www.youtube.com/watch?v=5CchyctRFrQ

https://www.youtube.com/watch?v=FU3CWXDQ5rs


http://s.hswstatic.com/gif/snake-motion.gif

This might give some ideas about how to actually rig it.

https://www.youtube.com/watch?v=4q7UhqE-ZeM

Not saying this is not possible with the spline thingy, but at least not looking correct from the samples shown.

Another rig sample:

https://www.youtube.com/watch?v=JUjsNrw3KGw

MonroePoteet
09-16-2017, 02:25 AM
That is all well and good. But snakes don't move that way. Just in case you are interested how they actually move first. That is all dependent on what you want to accomplish. People viewing this will know it instinctively even if they can't tell you why. The spline method is not how they actually move.
...


Well, yes they do. In the reference videos, there are plenty of instances where they are moving as if they're on a spline. For example, in the first video referenced, at 0:08 to 0:58, 1:11, and 1:26. The spline method will work fine in many instances unless you want to model the "concertina" or "side-winder".

Here are other examples of real-life snake movement where the spline approach would work fine:

https://youtu.be/oj2BE6qwTK0
https://www.youtube.com/watch?v=OE-ngBhX6lA
https://www.youtube.com/watch?v=bfMK40aEVeY

In some cases, you'd want the path drawn for the spline to be more "serpentine" than the example I posted, and lift off the ground in places for the "weight redistribution" referenced in the videos if desired, but in the videos above, the weight distribution is very subtle if it exists at all (the snake locomotion studies indicate the weight distribution is to increase speed, but is not *required* for locomotion). In addition, the nodes of the spline could be animated up and down and side-to-side.

The bones in the neck and head section could be animated separately for the "searching" type of motion by removing the Spline control from them (they're still parented to the bones on the Spline) and key-framing their rotation as desired.

mTp

Surrealist.
09-16-2017, 02:51 AM
I never said they were not moving "as if on a spline". We can all see that. What I said what this is not how they move to achieve that appearance. And the difference is subtle. As well as the controls you really need are not there.

And I also said I thought that the spline examples shown did not approximate it close enough. But improvement could be made there using the spline tool. If you want to more closely approximate the reality of a snake movement you'd have to move beyond the spline trick and give yourself a better rig.

My opinion. Though I think you could get pretty close using the spline trick for most situations. Depends on what you want.

blackmondy
09-16-2017, 02:51 AM
The Trailer plug-in may be the way to go, but if the tools in Modeler and Layout are used effectively the Spline setup is pretty easy. Modeling a good-looking snake is the hard part. Attached is a sample scene, where the (very simple) modeling and Spline setup took about 8 minutes.
mTp

Thanks for the detailed tip :)

inkpen3d
09-16-2017, 04:03 AM
That looks pretty tedious.

Really? Apart from modelling the snake, you could set up that whole rig in under 5 minutes!

blackmondy
09-16-2017, 04:25 AM
Really? Apart from modelling the snake, you could set up that whole rig in under 5 minutes!

It's unnecessarily tedious. The trailer plugin does away with bones completely and I was able to set it up under 5 mins.

Don't know about you, but I always find navigating bones in Lightwave a very big pain in the rear, just like navigating plugins.

Axis3d
09-16-2017, 09:46 AM
I believe Lightwave was used to create the 3d (and snake shots) in this Nike commercial years ago.
http://www.digitaldomain.com/work/nike-speed-chain/

Greenlaw
09-17-2017, 02:18 AM
By far, I think 2015.3's Spline Control works great for snakes. So does DP Spline Deformer. Both are easy to setup and use.

If you want to see some examples, checkout my Asylum reel from a few years ago (2013-2015): http://littlegreendog.com/2017/03/23/asylum-vfx-demo-reel-2015/

All the icky, wiggly lampreys and the alien tentacle scenes were animated using either or both of these tools.

Basically, you want to set up your path and then animated the critter though the path by pushing it along its z-axis. You can get quite a lot out of this without animating the path itself. For example, when the tentacles wrap around the soldiers, I just preset the paths around the soldiers and then the tentacle slides through it. The path doesn't actually animate until the tentacle needs to lift the soldier off the deck. Easy peasey!

DP Spline is probably easier to setup. Spline Control gives you more flexibilty but you'll need to use a bone chain with Spline Control. If I recall, I used DP Spline for most the Bermuda Tentacles stuff, and Spline Control for most of the lampreys (Blood Lake,) and the Sharknado 2 scenes I created.

DP Spline can be downloaded from here: http://dpont.pagesperso-orange.fr/main_en.htm

Spline Control is built into LightWave. There are many excellent demo scene for it in the content.

Hope this helps.

Surrealist.
09-17-2017, 05:35 AM
I believe Lightwave was used to create the 3d (and snake shots) in this Nike commercial years ago.
http://www.digitaldomain.com/work/nike-speed-chain/

Which is a great example of someone doing the research on how snakes move first, before rigging and animating. Nice find!

blackmondy
09-18-2017, 10:14 AM
By far, I think 2015.3's Spline Control works great for snakes. So does DP Spline Deformer. Both are easy to setup and use.

If you want to see some examples, checkout my Asylum reel from a few years ago (2013-2015): http://littlegreendog.com/2017/03/23/asylum-vfx-demo-reel-2015/

All the icky, wiggly lampreys and the alien tentacle scenes were animated using either or both of these tools.

Basically, you want to set up your path and then animated the critter though the path by pushing it along its z-axis. You can get quite a lot out of this without animating the path itself. For example, when the tentacles wrap around the soldiers, I just preset the paths around the soldiers and then the tentacle slides through it. The path doesn't actually animate until the tentacle needs to lift the soldier off the deck. Easy peasey!

DP Spline is probably easier to setup. Spline Control gives you more flexibilty but you'll need to use a bone chain with Spline Control. If I recall, I used DP Spline for most the Bermuda Tentacles stuff, and Spline Control for most of the lampreys (Blood Lake,) and the Sharknado 2 scenes I created.

DP Spline can be downloaded from here: http://dpont.pagesperso-orange.fr/main_en.htm

Spline Control is built into LightWave. There are many excellent demo scene for it in the content.

Hope this helps.

Thanks. Any video tutorials on this ?

Oldcode
09-18-2017, 11:12 AM
https://www.youtube.com/watch?v=kHAtN-gpyh8&t=266s

https://www.youtube.com/watch?v=XWTPk-wQhuk

Greenlaw
09-18-2017, 01:44 PM
For Spline Control, I think there may be some in LW3DG's YouTube channel, and there are several excellent scenes with tutorials in the content that show many different ways you can use Spline Control. (In fact, there's one called 'Snake' in there. It's very basic but might help get you started.) Also, be sure to read the user manual...how to set up and use Spline Control isn't obvious but once you understand it, it's actually very easy to use.

In a nutshell, you create a master null, then parent a bunch of child nulls. Next you arrange the child nulls into will become your spline path. Now, you set the object you want to follow the path in its Motion properties; under Spline Control, choose the master null. Now you have an animateable spline. To push an object through it, just animate its z-pos.

For a snake, you also need to do this for the bones associated with the object. Just select all the bones and then choose the master null from Spline Control in Motion properites. Now, all the bones will follow the shape of the path. Depending on your rig, you'll want to hold out bones from the rig that shouldn't follow the path (e.g., the jaw bones.)

This is really easy once you've done it a couple of times. Here are some tips.

Tip 1: As mentioned above, it's better to get the path defined first, then animate the item(s) moving through it, and then animate the spline's nulls if you need the creature to move away from the original path. (It's still on the path of course; you're just animating the path now.)

Tip 2: you can automatically align your nodes to follow the spline path using the Motion Properties panel. Just set the rotation you want to align to Spline Control, keyframe it, then set it back to Keyframe.

Tip 3: if you need to add more nodes to the path, change scene editor to display Item ID. This way, you can sort the new nodes into proper position by simply dragging and dropping in the scene editor.

Sorry, no time for a full tutorial but I hope this helps. Anything else you might need to know is in the docs, so I highly recommend reading it.

Ryan Roye
09-18-2017, 03:47 PM
The main issue with spline control for any type of rigging is that you sacrifice control over your figure in order to utilize it. Cage Deformer (http://www.3rdpowers.com/) opens up a bunch of doors:


https://www.youtube.com/watch?v=WaBIXn9LrXs

In the video, my character is being affected by geometry that is rigged to use the spline. Because this is effectively stacked over the character's rig, I don't lose control over it to make this happen.

Metalink is a tool native to Lightwave that lets you do something similar to cage deformer, but you won't get interactive feedback; the entire animation has to be cached by playing through the entire timeline before you can see any changes which the metalink deformer is intended to influence. Furthermore, you have no direct control over smoothing and very limited control over how exactly the deformation is applied (IE: do you want to use the average of all points or just the proximity to points?).

hypersuperduper
09-18-2017, 05:50 PM
Spline control is pretty neat. I thought for a while that it was largely unusable for anything but animation along a track or just weird wobbling tentacles because of managing all those control points is so unwieldy. but I realized after a bit of playing around that it is very flexible if you take the time to rig it up a little beyond the basics. you can make the spline work like handy bezier s-curve with just two handles at the ends that can be effortlessly manipulated by moving, rotated and scaling the handles, by adding a few extra control nulls a few same as item constraints, and some nodal motion with grade school arithmetic. (addition and multiplication only). in the image below the green nulls operate like bezier handles.
137938

Or you can use nodal motion to compress a sinus shaped spline control path as a null passes each knot so that a snake's head doesn't move back and forth as much as the body for a nice variable slither.

137936
The spline knots in this case move towards the green nulls (their parents) as the red box passes by them. you can even then take that basic slither path and the red null and control THEM will yet another spline so that you can steer its overall path like this.
137937

Like a lot of stuff in Lightwave, it is unwieldy at first but offers a lot of control if you are willing to set it up.

Greenlaw
09-18-2017, 08:56 PM
Over the years Spline Control has saved my butt on many dozens of VFX shots for TV and film productions, for everything from creature effects, space- and aircraft, to continuous tank tracks. (Last year I used it for a swarm of cartoon bees.) I'm constantly amazed by the versatility of this tool.

The only real issue I've run into with it is that occasionally I'll get a little 'wobble' at a node. Usually it's not noticeable unless the camera is following an item following the same or nearly same path. Sometimes I can hammer it out; when I can't, I wind up baking the motion and deleting the offending keys. (Where there's a will, there's baking.) I think it has to do how the paths enter/exit the nodes. I mentioned it to some of the LW3DG guys quite awhile ago...hopefully they'll fix for the next release.

Mr Rid
09-27-2017, 02:47 AM
I animated many snake shots, and I tried every approach in LW. I found DP Spline Deformer the best solution. Some examples are in my demo at 34 secs https://youtu.be/yOOixvRhcs4?t=34