View Full Version : Delay Transform script
lontra 04-11-2006, 02:53 PM Hi guys!!!
This one is a double first for me... First post and first script...
I wrote this script to help me learn maxscript, and I think it's a nice tool to have...
As expected, still has a few bugs that maybe some of you can help me out with... ;)
DELAY TRANSFORM (http://www.tiagocastro.net/foruns/DelayTransform/Transform_delay.mcr)
(save target has...)
Instruction and other stuff inside the script...
Please feel free to comment...
Cheers
Tiago Castro
|
|
You using verlet algorithm, because with that the delay can have accuacy and be based on physical values like acceleration and mass.
lontra
04-12-2006, 09:39 AM
Thanks eek, but I thing that is WAY over my head... after all since this is my first script I still scratching the surface... :)
But its good to now that's a way to improve it...
Thanks
lontra
04-13-2006, 12:17 AM
Just did a little video showing the script at work...
DelayTransformTut.avi (http://www.tiagocastro.net/foruns/DelayTransform/DelayTransformTut.avi)
TSSC codec...
The next feature I wanted to include is an UNDO. Right now I can seem to get the script to go into the max UNDO memory...
Any ideas?...
Mattrne
04-18-2006, 06:10 PM
Hey thats a nice little script there - congrats on such a fun little thing as a first script!
bloggs
04-18-2006, 06:34 PM
wow i like it alot man thats great. could really use this in alot of riggs. it would be cool also to get it to amplify along the chain so you could make it into a cool tail on a character or somthing.
well done man.
cheers
john
lontra
04-18-2006, 07:23 PM
Hey thats a nice little script there - congrats on such a fun little thing as a first script!
Thanks... I'm still working on it... for now I've done a transform filter so we can get only position rotation or scale...
More to come... ;)
wow i like it alot man thats great. could really use this in alot of riggs. it would be cool also to get it to amplify along the chain so you could make it into a cool tail on a character or somthing.
Cool... I'm glag it has some real uses...
I think it's esay enought to add a multiply value, but for the tail I'd go with the spring controller...
Still, a cool feature to add to the list...
Any more ideas?... I'd by more than appy to try to improve it...
Cheers,
T.
bloggs
04-18-2006, 07:50 PM
yeah i thought it might be usfull because you could probly see the reasults while animating where as spring controllers slow things down like crazy. this would be a good controllable fake that you could probly add layers of animation to.
have to have a better play with it later
cheers
john
lontra
04-22-2006, 05:02 PM
Hy guys!...
Here is the latest version of Delay transform...
http://www.tiagocastro.net/foruns/DelayTransform/DelayTransform03.gif
DOWNLOAD (http://www.tiagocastro.net/foruns/DelayTransform/Transform_delay03.mcr) (save target as....)
new features:
--local delay for Position, Rotaion and Scale;
--multiply values for Position, Rotaion and Scale; (need help with some issues...)
--Add, Remove and order Slaves;
--opening the dialog keeps the last Master and Slave selection if available;
known issues:
--if master as animation prior to applying Delay, that animation will not drive the Slaves
-animate only after Delay is applyed;
--is a Slave is listed more than once Max WILL crash; (need help here too...)
I need help with:
-- the rotation on the slaves is linked to the previous slave's rotation witch is a quaternion rotation. This makes the multiply funcion useless...
-- in the listBox I have a filter funcion tah filters the master object only, and I need to be able to filter the current slave object list (witch is an array) so that the user wount select the same object mode than once...
Can anyone help me out???
small test (http://www.tiagocastro.net/foruns/DelayTransform/bricks01.mov)
Cheers and enjoy...
Mattrne
04-24-2006, 05:40 PM
why does the rotation being a quaternion make your multiply useless? I havent had a chance to look at the script yet, but can you not convert your quaternion back to euler apply your multiply and then convert back to a quat?
lontra
04-24-2006, 06:10 PM
Here is the basic structure: (ie. 10 box objects)
MasterObj: Box01
SlaveObj: Box02 to Box10
On the MasterObj I create list controllers for Pos, Rot and Scl. (freeze transform)
On the Slaves I also create list controller so they keep current Pos, Rot and Scl and add a Script controller that gets the previous slave's Pos, Rot or Scl with a delay...
The thing is that when a slave gets "linked" to the previous slave it gets the rotation as Quat values, and the multiply does work (at least in the listener) but I cant see any change in the viewports...
One other thing... I only teste with object created in the top VP (local and world values are aligned) but when I did a test with another object the master got rotated arround...
My guess is that I'm missing something on the creation of the list controllers (freeze transform)...
If any of you guys could have a look at the code it would be greate!!!
I think its preety well organized... :)
Thanks a lot for the input...
Cheers
Tiago
hotknife
06-01-2006, 05:49 PM
hey fellas this thread got me playing around with the idea of delay transforms, and after playing with the script you put up for a bit (which was great) discovered some pro's and con's.
so attempted one of my one....also popping my cherry on script posting as well, so please don't look to hard at the code. pretty buggy but it shows the concept.
thought the script could be improved with the addition of distance into the equation.
i.e the further away the object the longer the delay.......this will also get over the problem with your script in that in matters in which order you select the slave as to which is animated first.
I've also used a matrix transform script, instead of controllers, which may help with some of your problems.....looking forwards to the next update.
www.hotknife.co.uk/delay/delay.avi (http://www.hotknife.co.uk/delay/delay.avi) is a quick example..
anyway hope this helps, script attached......works in the same way but does not matter if you animate the master first....just don't have any spaces in the names of the objects
floyd1510
06-02-2006, 01:21 PM
Hey,
I've been using somewhat the same fundamental for secondaries in objetcs like earrings etc. using a time delay in a position script controller. A query: can someone use this system and also create some damping??? The sudden stop in a frame based delay does not look good at times. A higher level would be if we could detect deflections. For this, i've tried using intersect rays, but am not getting anywhere as yet. Also i would like to know what people have to say about springs in Max. I havent had a good experiance, but ive seen a clip on the net of very well implemented deflections using springs. Would like to know how.
Thanks,
Vikram.
shibumenon
06-06-2006, 02:39 PM
Hi vicky,
you could use the script controller for the delays, and you could derive the dampening from a spring controller and add up both to get the required result.
Yes, spring controllers are slow, but its only when they are in a complex heirarchy where
even parents have springs on them that the system becomes sluggish at higher frame counts.
shibu
josh3light
06-06-2006, 08:18 PM
This is great... I learned how to do this in Houdini before, it is really easy as they have a frame variable you can use in any expression, I've been trying to figure out how to do it in maxscript ever since.
So thanks!
floyd1510
06-07-2006, 05:06 PM
Hey Shibu,
Thanks for the help. Actually I've been trying your system of using rays to define distance between two objects. I get a variable distance parameter but havent figured how to instruct the helper to react after the minimum distance value is achieved. Is there a better way to get some kind of scripted solution to detect deflection (when i say better i mean easier) and also react to it as desired.
Thanks,
Vikram
CGTalk Moderation
06-07-2006, 05:06 PM
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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.