PDA

View Full Version : See the speed of a object moving? in 3ds max


Patan77
03-25-2012, 08:33 PM
Hi I want to wire a wind strength value that is going to be controlled by the speed of an animated object, lets say i have a box starting at frame 0 then it accelerates forward to the frame 25 then it slows down to the frame 50 then it stops for a while and so on...

I cant wire the wind strength to lets say the Y position then it would only rise, so is there a way for me to see how fast the object is moving?

(i know that it is possible in after effects so I think that there is a way in 3Ds max too)

thanks in advance :)

(please ask question if you don't understand what i mean.)

3ak
03-25-2012, 09:34 PM
speed is magnitude (CurrentFrame_pos - CurrentFrameMinusOne_pos)

Patan77
03-25-2012, 10:43 PM
speed is magnitude (CurrentFrame_pos - CurrentFrameMinusOne_pos)

I have solved it now, this is the script i wrote:
http://www.patan77.com/screenshot/speed_script.JPG

How it works: I first create a Dummy($speed_D) then the script converts the speed of the moving object ($Box002) to X_position keys on the Dummy($speed_D) then I can wire the x_postion of the Dummy to the wind strength :)

3ak
03-25-2012, 11:22 PM
let's say your object's name is "obj". Then create script controller on Strength parameter of the wind and add:
distance (at time currenttime $obj.pos) (at time (currenttime-1) $obj.pos)

CGTalk Moderation
03-25-2012, 11:22 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.