Ever tried to create realistic chain simulations using reactor? It can be frustrating to say the least. The chains break from each other unless you use insane amounts of substeps. Also it can take ages to compute if it doesn't crash your computer. Well here's a tutorial that gets around all of that and looks great.
There are a couple of ways to go about it. One, that we wont document here uses a reactor rope object attached to your chain links. While it works in a pinch, you have to use path deform and that will deform your mesh (links) and doesn't look real great in alot of situations.
This approach does require a free plugin. Its called Attach_Selection_to_Surface_by_Local_Z.ms and can be found here:http://www.time-in-motion.com/ Anyways, go get it and have it handy.
Step one:
Create a torus in the top view and give it segments and sides like you see in the image.
Step two:
Convert it to poly and move the bottom vertices until you get a link like so, or however you want the link to look.
Step three:
Clone/copy the link, rotate 90degrees and move it down so that the edges of both are just touching. Dont worry about needing a distance between the two of them.
Step four:
okay, next select the two links, hold shift and move them down so that they once again touch. In the dialogue box set the # of copies... This will make sure they are the same distance. I chose 10.
Step Five:
Now, still in top view, select all the links, go to the hierarchy tab, choose Pivot, and select "center to object." Followed by pressing the "align to world" button. Make sure each links pivot is indeed centered on itself and aligned to world.
Step Six:
Next pat yourself on the back, cause your through alot of it already! Now create a plane, the WIDTH of the links, and the LENGTH of the entire set of links. Make sure its segments is 1 wide and enough segments in length to have one full poly per link. You will probably have to collapse to poly and manually adjust the vertices of the plane until ease vertex line exactly touches where each link touches the next? Understood? if not look at the image:
Step Seven: Okay now time for the script. Make sure your plane is aligned with the links along the Z axis. Select ALL the links and then run the script. Your going to see a rubberband, now select the plane. Youll see a quick progress bar and then its done. Now if you get an error message talking about something not aligned to the Z of something, dont fret, make sure once again all your links are aligned to the world along the z axis. Make sure your in top view. When properly completed youll have all these little null objects for each links like so:
Step eight: Alright that was the hardest part and it wasn't too bad at all. Now lets setup reactor. Select the plane, give it a reactor cloth modifier and then make it part of a cloth collection. Make sure the cloth is set to concave in reactor object properties. IMPORTANT!! Make sure the plane has a positive mass, and even more important, go to the cloth modifier rollout and set the stiffness to 1.0 If not, the links will break as the cloth stretches.
Create an object the links can react with, a plane, box or something. I chose a prism object. Make it part of a rigid body collection, make sure it has a mass of 0.0 and set it to inactive.
Step nine: hey thats pretty much it! Run your simulation and see how fast it simulates and how great it looks!
Now there are some downsides to this approach. Since the links follow the cloth, the natural rotation of the link caused by the links it touches might not look perfect. After all its all driven by the cloth. Also if the cloth rotates, so do the links, and that might not look great if the cloth rotates too much. But you can go into the subobject mode of the cloth, attach it to other rigid bodies and so on for nice animations. Ive never tried making the links part of a rigid body collection so they properly bounce off of other objects as you can see the links penetrate the prism, though you could set the collision tolerance in reactor to account for the necessary distance.
Hope that explains it. Thanks for checking it out, and thanks to Morbid Angel for giving me the idea to post the tutorial here. Also thanks to Phormis on the cgtalk forum for the help.
Check out my final results:http://myweb.cableone.net/amylenhart...rplayblast.avi
There are a couple of ways to go about it. One, that we wont document here uses a reactor rope object attached to your chain links. While it works in a pinch, you have to use path deform and that will deform your mesh (links) and doesn't look real great in alot of situations.
This approach does require a free plugin. Its called Attach_Selection_to_Surface_by_Local_Z.ms and can be found here:http://www.time-in-motion.com/ Anyways, go get it and have it handy.
Step one:
Create a torus in the top view and give it segments and sides like you see in the image.
Step two:
Convert it to poly and move the bottom vertices until you get a link like so, or however you want the link to look.
Step three:
Clone/copy the link, rotate 90degrees and move it down so that the edges of both are just touching. Dont worry about needing a distance between the two of them.
Step four:
okay, next select the two links, hold shift and move them down so that they once again touch. In the dialogue box set the # of copies... This will make sure they are the same distance. I chose 10.
Step Five:
Now, still in top view, select all the links, go to the hierarchy tab, choose Pivot, and select "center to object." Followed by pressing the "align to world" button. Make sure each links pivot is indeed centered on itself and aligned to world.
Step Six:
Next pat yourself on the back, cause your through alot of it already! Now create a plane, the WIDTH of the links, and the LENGTH of the entire set of links. Make sure its segments is 1 wide and enough segments in length to have one full poly per link. You will probably have to collapse to poly and manually adjust the vertices of the plane until ease vertex line exactly touches where each link touches the next? Understood? if not look at the image:
Step Seven: Okay now time for the script. Make sure your plane is aligned with the links along the Z axis. Select ALL the links and then run the script. Your going to see a rubberband, now select the plane. Youll see a quick progress bar and then its done. Now if you get an error message talking about something not aligned to the Z of something, dont fret, make sure once again all your links are aligned to the world along the z axis. Make sure your in top view. When properly completed youll have all these little null objects for each links like so:
Step eight: Alright that was the hardest part and it wasn't too bad at all. Now lets setup reactor. Select the plane, give it a reactor cloth modifier and then make it part of a cloth collection. Make sure the cloth is set to concave in reactor object properties. IMPORTANT!! Make sure the plane has a positive mass, and even more important, go to the cloth modifier rollout and set the stiffness to 1.0 If not, the links will break as the cloth stretches.
Create an object the links can react with, a plane, box or something. I chose a prism object. Make it part of a rigid body collection, make sure it has a mass of 0.0 and set it to inactive.
Step nine: hey thats pretty much it! Run your simulation and see how fast it simulates and how great it looks!
Now there are some downsides to this approach. Since the links follow the cloth, the natural rotation of the link caused by the links it touches might not look perfect. After all its all driven by the cloth. Also if the cloth rotates, so do the links, and that might not look great if the cloth rotates too much. But you can go into the subobject mode of the cloth, attach it to other rigid bodies and so on for nice animations. Ive never tried making the links part of a rigid body collection so they properly bounce off of other objects as you can see the links penetrate the prism, though you could set the collision tolerance in reactor to account for the necessary distance.
Hope that explains it. Thanks for checking it out, and thanks to Morbid Angel for giving me the idea to post the tutorial here. Also thanks to Phormis on the cgtalk forum for the help.
Check out my final results:http://myweb.cableone.net/amylenhart...rplayblast.avi
Comment