Jump to content

Slowdown


Sikorsky

Recommended Posts

Analytic solution? The position of an object along its movement path is the integral of its speed over time. So, if your speed is e.g. a constant 3 (distance units per time), then your position is 3t.

 

But you're looking for decay, so let's assume the starting speed is 3, and within 3 time units the object comes to a standstill, and the speed curve is a straight line. Then the speed curve can be described as f(t) = 3 - t, and the integral i(t) is 3t - t²/2.

 

You just need to feed your current time into this formula and get the current position. Verify: at time t=0, the value for i(t) = 0 and f(t) = 3; at t=1, i(t) = 2.5 and f(t) = 2; at t=2, i(t) = 4 and f(t) = 1; at t=3, i(t) = 4.5 and f(t) = 0 (standstill). When t becomes greater than 3, the speed becomes negative, so the object drives backwards.

 

Naturally, a straight line (however angled) is not the optimum motion curve, as the derivate (acceleration) is not continuous (you start and stop very abruptly). For a good speed curve, you may require different formulas with different integrals and (if needed) glue them together piecewise over the path.

Link to comment

Thanks a lot Cairyin, I do have a good idea what should happen but making it work is not easy since i experienced object going into negative direction. Did you try t o build it with nodes?

 

17 hours ago, Hrvoje said:

Seems that effectively you are looking to "decay" a value?

 

 

Yes, that would be it 🙂

Link to comment
40 minutes ago, Sikorsky said:

Thanks a lot Cairyin, I do have a good idea what should happen but making it work is not easy since i experienced object going into negative direction. Did you try t o build it with nodes?

No, I just scribbled on a piece of checkered paper. I guess I would use Python anyway 😉

 

I'm not sure whether the integral method is practical; the timeline display is after all a positional curve (so this is the integral already); I just don't know what the exact usecase is. What is your actual input, and are you trying to get the speed or the position from the time or...

 

 

Link to comment

Not as trivial if you don't want to use keys as @Cairyn already wrote.  I suspect there is some fancy math to make this awesome 🙂
There are few problems here if I assume correctly what you are after:

 

1. No keyframes

 

2. Object has to eventually stop it's motion which is driven parametrically (by time). That assumes that after some duration movement should stop and time value which is a "driver" has to be preserved otherwise the time will simply keep moving the object

 

3. Gradual slowdown. This can be done by remapping duration to output multiplier

 

I attached a scene that does this, hope this is what you are after, couldn't think of anything better.
In memory node you set duration. For more complex decaying with more options you can use spline mapper for multiplier but this involves more work or maybe different approach

 

 

decay.c4d

Link to comment
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • LATEST ACTIVITIES

    1. 16

      3D world #310

    2. 53

      Looking forward to the next C4D release

    3. 8

      CORE 4D Youtube channel

    4. 1

      Nodes Modifier result isn't updated anymore

    5. 8

      CORE 4D Youtube channel

×
×
  • Create New...

Copyright Core 4D © 2023 Powered by Invision Community