|
|||||||
![]() |
|
|
Thread Tools |
|
||||
|
I recently found an easy way to simulate a chain moving using softbody and vertex parents. Here's the result:
http://s132.photobucket.com/albums/q...chainthing.flv I can control the ends with an armature so it's easy to animate, and since it uses soft body it's easy to customize gravity and speed. And here's the blend file for those of you too lazy to set it up yourselves. =] http://www.mediafire.com/download.php?frgfydxnxud Last edited by LiveWire; 19-Jan-08 at 05:06. |
||||
|
#1
|
||||
|
|
|
||||
|
And now a tutorial please on how to achieve that or even better give us the blend
pretty please
............................................
My WIPS: Chameleon and Fly Short, Belor Interesting Vimeo Channels: Blender Tutorials Channel, Blender Animation/Video Channel, Blender Timelapse Channel Go vote for feature requests for blender on Blenderstorm.org |
||||
|
#2
|
|
||||
|
I'll get a tutorial together. =]
|
||||
|
#3
|
|
||||
|
Alright, here's a quick tutorial (set-up is slightly time-consuming):
Start with a plane. Enter edit mode, select all, and scale down along the Y axis to get this shape: Enter edge select mode. Select only the two longer sides. Press W and select "Subdivide Multi". Enter the number of chain links you want minus 1. I want 10 links, so I entered "9". Enter edit mode and select every other vertex on the top and bottom edges. Scale along the Y axis and scale press zero. (Just press S, Y, 0, Enter) Click "Remove Doubles" in the Mesh Tools. The result is a lot of triangles like this: Create a new vertex group (name it whatever you want. I left mine as "Group") and assign the four vertices on the far left and the far right to it. Enter object mode and enable soft body. Enable "Use Goal" and use the vertex group that you created. Set "G Stiff" to 0. Here's how I had mine set up. Depending on how you want you chain to move, you might want to tweak it some. Now, if you press Alt+A, your mesh should sag in the middle. Create a chain link (you can shape it however you want. This method doesn't work for rings very well.) Size the link down until it fits in the triangle on the far left of your mesh. Copy the link several times, moving it along the X axis, until you have one over every triangle of your mesh. Holding down Shift, select the first chain link and the triangle-mesh (in that order) and press Tab to enter edit mode. Enter face select mode and select the face on the far left (directly beneath the selected chain link). Press Ctrl+P and create a vertex parent. Now the time consuming part: do the same thing to all the other chain links. Create a vertex parent with the triangle directly below them. When you are done, press Alt+A. Your chain links should sag with the triangle-mesh. To animate it, simply add an armature modifier to the triangle mesh and set two bones to control the four vertices on the far right and the far left. Make sure the armature modifier is on top of the softbody modifier. Animate the bones, then bake the soft body. Your chain will follow wherever your mesh goes. You can then move your triangle mesh to a different level so it doesn't show up in the render. Let me know if I need to clarify anything (You probably noticed I'm not great at explaining processes like this.) =] And I'd upload the .blend, but I'm not sure how. Can someone tell me how? Last edited by LiveWire; 27-Jan-08 at 15:36. |
||||
|
#4
|
|
||||
|
try uploader.polorix.net or googling free file hosting
............................................
VirtualAnvil --> HERE ""I am a PC and I like life without walls." In a life without walls, where do you put Windows and Gates?" |
||||
|
#5
|
|
||||
|
WOOOOO thanks for the tut!
............................................
Buy my stuff, or make your own! Click Me! *** Currently working on my marble game again!*** |
||||
|
#6
|
|
||||
|
nice tutorial
thanks
|
||||
|
#7
|
|
||||
|
Alright, I uploaded the blend. (see first post)
|
||||
|
#8
|
|
||||
|
FYI, I just tried this out using rings for the chain links, and it worked ok!
|
||||
|
#9
|
|
|||
|
Brilliant, thanks!
I think the setup would be much easier/quicker if blender's dupliverts had an option to automatically vertex parent the duplis when you make them 'real'. i once hacked this into the source, wasn't very difficult. But it was a hack only. What do you think, would such an option be generally useful? If you can provide some use cases, I could try to whip up a decent patch (as time permits, so no promises). Cheers, Björn |
|||
|
#10
|
|
||||
|
@LIveWire:nice tutorial and a very good new approach to chain animation!
![]() thanks!
............................................
lastt WIPs in here Puppet painters theatre, mainframe characters, apaches test, Oscar Chichoni's chimneys finished artwork: Chromanorama & There! Our Home! www.epanimation.com.ar | my studio www.martineschoyez.com.ar | my personal site |
||||
|
#11
|
|
||||
|
Thanks for the feedback, everyone!
@MPPIC: The only problem with your idea is that in this method you need to make vertex parents with 3 vertices. Each triangle is a parent, not each vertex. More of a dupliface instead of a duplivert. |
||||
|
#12
|
|
|||
|
@LiveWire: That's true... but it should be no problem to automatically vertex parent to 3 vertices = a face for 'duplifaces'. But what about quads? Just tested, and (as expected) duplifaces seem to pick one tri out of a quad to work with, so automatic parenting (to 3 vertices) could work with identical results.
I imagine this workflow:
Anybody think this is something worth investigating? Any other nice use cases? |
|||
|
#13
|
|
||||
|
Come to think of it, could you get this to work with just dupliface? I didn't really think about it, but you may not need to "make real" at all. Unless, of course, you wanted to edit the mesh of one particular chain link and not the others.
As for other uses, it's basically a quick way to dupliface something and be able to edit each instance of it individually. That could come in handy if you're making objects float on water. |
||||
|
#14
|
|
||||
|
Quote:
![]() Thanks for a rewarding tutorial LiveWire
............................................
I say stupid things. I\'m human. |
||||
|
#15
|
|
||||
|
Now could such a technique be used to drive a chain driven cog at the appopriate speed according to the movement of the chain and have the chain wrap around the cog correctly?
|
||||
|
#16
|
|
||||
|
@patdog: thanks for pointing that out.
@rndrdbrain: are you people never satisfied? This method is really more for having a chain that reacts realistically to its surroundings. I'm not sure how well it would be able to affect its surroundings. Maybe a cog-driven chain would work, though. I'll have to look into it.
|
||||
|
#17
|
|
|||
|
I noticed that if the bone isn't moving, the "chain links" seem to "jitter" back and forth.
Is there some way to prevent this or reduce the effect? To see what I mean, select the bone in pose mode, and delete the last 2 keys. |
|||
|
#18
|
|
||||
|
@Gimble: Yes, I've noticed that. I think if it's possible to get rid of that, it would have to be done by tweaking the softbody. I'll experiment with that some.
|
||||
|
#19
|
|
|||
|
Hi LiveWire
I reduced the 'Error Limit' setting in the 'SoftBody Collision' panel to the minimum value of 0.001, and that seemed to almost completely cancel out the "chain links" jittering back and forth. |
|||
|
#20
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|