Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Programming (https://simplymaya.com/forum/forumdisplay.php?f=32)
-   -   Chain Script (https://simplymaya.com/forum/showthread.php?t=9358)

Scraggy_dog 10-12-2003 02:22 PM

Chain Script
 
As I got a neat script for making 'coily' cords/cables - I wonder? Is there one for creating chains? not animating - just making them.

Scraggy

kbrown 10-12-2003 02:56 PM

Well, my createDynChain script creates animating chains (out of toruses) but you could remove the control stuff leaving you with just the chain. You can find the script here: http://www.simplymaya.com/download_p...id=29&type=mel

Scraggy_dog 10-12-2003 04:29 PM

Thanks
 
Thanks Kbrown, will have a go at that, it's for my Dog (In the W.I.P. Forum) I really do wan't to animate it if possible at a later date... [When I learn how to Rig etc etc etc] so that's 'just the ticket' thanks :D

Struggling with the model at the moment, paws and eyes have me baffled.

Regards Scraggy

Scraggy_dog 10-12-2003 06:00 PM

:D
 
Hi,
I thought I may have problems working it out, but it's fine - :D
Works great - I'm just wodering if there's an easier what to make sure my CV's are equally spaced along the curve than measuring by eye.... Oh yes and what does the "Optimize rigid solver" do?

Sometimes I notice the links are not connected at the "ends" of the curve, but I guess that's beacuse I haven't got the spacing of CV's correct - is that so?

Thanks again - Scraggy

kbrown 10-12-2003 08:20 PM

Well, as this script is meant primarily for animating chains, I have not payed much attention to how the chain is created in the initial stage. You could try to rebuild the curve uniform before running the script...

Internally the script works something like this:
- create a straight duplicate with equal length of the original curve.
- create the chain links along the straight curve (easier this way) and point constrain them to each other
- hook up the controlling and dynamic stuff
- move the CVs (actually the control cubes) of the straight curve to match the original curve. This moves the chain links too as they are connected to the curve

If the initial curve is funky and the span lengths are varying, the chain will look odd. But if you hit play, the chain settles down after a while as the spring forces even out. If you're happy with this "pose" you can stop the animation and select Solvers > Initial State > Set For All Dynamic. Now when you hit rewind the chain will keep it's "pose" until you hit play again.

The "Optimize rigid solver" turns off the friction and bounciness calculations of the rigid solver node. I'm not sure how much these actually affects the animation performance (my thought was "why have them on if they're not needed...")

Scraggy_dog 11-12-2003 04:44 PM

Chain
 
Thanks for the help, I must admit it's a bit beyond my meagre knowledge to understand some of what you mean, - but for my Chain - it works fine with just a slight tweak on the ends... :D

I just have to work out how to delete all the Animation stuff that is not needed now. I haven't tried yet, but would think it's pretty straightforward if I open the "Outliner"

Regards Scraggy


All times are GMT. The time now is 12:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018