Make Noise modifier dependent on velocity?

Hi All,

(I am using Blender 2.5x for this project.)

I’m doing some animations of lots vehicles driving around an intersection using a dozen curves with follow-curve constraints, then animating the offset value. I’m also using a subtle noise modifier on the offset animation so the vehicles occasionally speed up or slow down, making it look less mechanical.

The difficulty is when the vehicles slow down or stop – they start rolling back and forth (continuing to return the noise modifier’s results). I do a lot more animating in AE, and in there I’d write a simple expression that returned the speed of the object, then multiplied the noise result by the speed. (Thus, when the speed was zero, the noise would be multiplied by zero and thus return…zero!)

I’m hoping to do something similar here. My gut feeling is that I can do this with drivers but I’m not having any success thus far. I’m attaching a much-simplified blend to demonstrate the basic problem I’m trying to solve. Thanks for any suggestions!

Attachments

noiseAndVelocity.blend (389 KB)

Hi benu,

Yeah you can do it with drivers… Set up an empty and keyframe it to go nowhere and add the noise modifier… Set up a custom property… let’s call it engine on/ engine off. You can now drive the offset value of the noise car with an expression… easier to upload a sample.

Interesting method driving the offset property… think i’ll stick to using a curve modifier method… anyhow off my soapbox…

i think it would be easier to add to its noisy-function
a second one:
limit

set the noise-modifier to “add” and in the second “limit” modifier:
setting the limit for max-x to 100 (=starting at frame=100)
to max-y 0.7 will cut off the noise at frame=100 and make the
fcurve straight - and then the “car” will stand still there.
Same goes to the min-x, min-y values to have it stand still at start.
Only problem is, if the noise is too heavy, the car will sometimes drive
backwards … but this happens only if the noise is too much.

and at the moment i think about… would it be possible to use first a limit-mod.
to force the noise-added to 0.

Thanks batfinger and test-dr. The limit option does seem a bit simpler, but it also creates a hard stop which I’m trying to avoid.

Neither of your suggestions samples the speed, though. Is that even possible?

Here’s the idea in more detail:

The offset’s noise modifier is automatically generated, but there is something attached to it (a driver, perhaps?) that is sampling the offset animation’s speed (rate of change, i.e.), and returning a number between 0 (no speed/changing/animating) and 1 (full speed). When the offset is animating at full-speed, the noise is multiplied by 1, so it remains the same. As the offset’s speed slows down to a stop, the amount of noise applied to the offset decreases proportionally, finally returning zero as the offset animation stops.

What I’m hoping is for the intensity of the modifier to be automated. This allows me to animate literally hundreds of these vehicles without having to worry too much about the noise – it runs itself.

In After Effects I’d write an expression that would sample the speed of the attribute, use a little math to clamp the range to between 0 and 1, then multiply the noise animation by the result. It’s been my experience that Blender usually has more capacity than AE when it comes to animating, but I’m less familiar with the ins and outs of these more subtle tricks.

batFINGER: I am using offset because it doesn’t deform the mesh like the curve modifier does.

Thanks again for your suggestions! I’m learning a lot playing around with them.

ok, maybe i understand what you want.
Its the speed.
Speed ist way in time!
Here is an example,
its with different path(tracks)
and i did add the noise-mod to the fcurve,
BUT this is not necessary.
Normaly you can change the speed by editing the path,
where every little part is the time used to make the way.
Shorter path-parts are more speed … longer parts are slower
and the whole time is spent for the whole track(path).
So scaling the path will not use more time, but will speed up
the movement.

The added noise could be used if there are multiple path-objects,
which are the same … - but i think then the noise should be at all the same,
only a bit editing of the path makes the speed-parts different.

last: working with path-objects is different than working with a mesh-path.
Lets say the default setup had 500 frames for the whole path and it was diveded
into 10 parts. Then every part will use 50 frames … regardless how short you put the points close together … or away.

Attachments

speed_and_noise.blend (497 KB)

Benu,

to use the curve modifier, use a proxy two vertex object to drive along the curve. One vertex to position your car, one vertex to track to along the curve. This allows me to key in distance along the curve of the proxy object which i believe is easier to work with than keying in offsets along a curve. This can also be used then to calculate the speed from the location fcurve using the evaluate function of the fcurve and the method applied here http://blenderartists.org/forum/showthread.php?t=203982 you can use some simple maths to get the gradient off the fcurve and return it to the driver. This can then be used to drive your vibration.

I investigated using a velocity property rather than keying in distance. this way you can key in velocity but this can be difficult to get to an exact point. An example of this i used on the t.blend that I’ll attach… this one uses a keyed in velocity the distance is calculated by a driver = frame*velocity … this can be changed to currentloc + velocity…

I used a noise modifier to emulate your approach in my earlier post however a random(x)-random(x) in the driver would have done the same thing.

Thanks you guys for all the help. Since I need to animate hundreds of these (and I need to do them by the end of today!) I’ll probably discard the slight randomization that I’d get from incorporating noise, at least for this part of the project. However this discussion gives me the next set of blender skills I am going to pursue. Thanks for the link to that other thread, batfinger; this is the closest I’ve seen to AE Expressions (where you write a little code for a specific attribute). I think that approach will certainly give me the best control. If I figure out a solution anywhere near as elegant as I’m hoping for, I’ll be sure to post it for the community. Thanks again batfinger and test-dr!

Hi, there is some new info related to that thread… good luck with your project!

Bless Aligorith’s heart for these little snippets of goodness. Thanks for the link, liero!