[Closed] Convert noise animation to keyframes
Is there any way to flatten a collection of objects animated with
noise position, so that it removes the noise controller and just
leaves x.y.z. keyframes
First thing I tried, it still leaves the noise on top.
If I create a point helper
add a noise animation to the y pos
and then collapse it in motion tab
If I turn off noise I get no y motion
Here you go. Just select the object and run the script.
obj = $
max create mode
transArr = #()
count = 1
for q in 0 to 100 do
(
at time q
(
transArr[count] = obj.transform
)
count += 1
)
obj.position.controller = position_xyz()
obj.rotation.controller = euler_xyz()
obj.scale.controller = scalexyz()
count = 1
for q in 0 to 100 do
(
at time q
(
with animate on
(
obj.transform = transArr[count]
)
)
count += 1
)
If you run this script on the test scene above, it still needs the
noise mod or the point helper will not move
it creates keyframes however. but if you disable the noise,
it will not move
Oh well I opened your scene and you’re not even using a noise controller. You’re using a noise modifier which is not what you want to do because it won’t affect the point’s transform at all.
Take off the noise modifier, and instead add a position noise controller (in the motion panel), then use any one of the solutions already posted in this thread and you’ll see they all work.
I can try that; but it seems strange that there is no way to bake such things as
noise modifier, or flex down to a base object with keyframes.
Oh and I have a real hate-on for the noise controller, because if you apply
a noise controller to say 25 point objects, randomize the seed via script
you will find that on frame zero the offset are identical on all objects at
frame zero.
If a niose controller was truly random then each and every y would be different
for each and every randomized clone.
I.m afraid not, using the exact test scene as above,
if you turn off the noise, you lose the animation
I can try that; but it seems strange that there is no way to bake such things as
noise modifier, or flex down to a base object with keyframes.
Actually there is. Try scripspot.com, there should be a few scripts available for baking vertex animation or whatever it is you try to achieve.
You can use point cache to bake deformations but it does not create keyframes or bake transforms, which is what you requested in your first post.
Also, point helpers do not have vertices so point cache will not work on them.
How about point cache? Or do you specifically need the animation to be in the base object?
-Johan
Certain effects, such as ky_trail require that the objects pivot point be moving.
So if I animate a bunch of point helpers whether with a noise modifier or a noise
controller, unless you bake the keyframes, it will not be interpreted as motion.
I have found another way to animate the point helpers in pflow.
I create a random vector and store it in matrixrow1 and another random
vector and store it in matrix row2. By alternating between target vector and source
vector I use find target to move to and from to seemingly random points.
All point helpers are then moved to the locations over time.
I hoped to do it with noise controllers OR noise modifiers but they suffer from
a tragic flaw that all the numbers are the same on frame zero and other various
frames, and real random numbers do not suffer this problem.
But with pCont.randSpherePoint() you can be sure of a new RANDOM x,y,z
number of each proceed call in pflow.
Hopefully this explains my situation!
That’s where the seed setting come in play. Have all objects a different seed and all motion is different:
pseudo code = for n in getClassInstances NoiseController do n.seed = random -1000 1000
Not behind max, but that should make all controllers have unique animation.
-Johan
Regardless of seed settings, they all have the same y displacement on frame zero.
I do not consider this to be mathematically “random”
Yeah, there should really be some offset value for the noise controller. Something to actually shift the curve so it doesn’t all start with the same value. It looks like the noise is always a value of 0 on frame 0, so a cheap hack would be to start your scene on a later frame.
I have done that as a cheap hack before, but what if I offset a random frame offset.
On these small test scenes it can be done manually, but there are lots of times I may have
2000+ point helpers.
Thanks for the suggestion.
Apply an Ease curve on top of your noise then shif the keys on the ease curve to create the offset.
Have to admit, never knew all noise starts at zero, but here’s a script to go around that.
Simply make the noise controller with zero weight in the list controller, then add a bezier (for manual offset) and a script controller to time sample the noise controller.
for i = 1 to 200 do
(
local p = point name:(uniqueName "slave_")
p.pos.controller = position_list()
p.pos.controller[1].controller = noise_position frequency:0.05 fractal:false seed:(random 0 10000) noise_strength:[0,150,0]
p.pos.controller.available.controller = position_script()
p.pos.controller.available.controller = bezier_position()
p.pos.controller.weight = #(0,100,100)
p.pos.controller.setActive 3
p.pos.controller[3].value = [10*i,0,0]
p.pos.controller[2].AddConstant "offset" (random 0 50)
p.pos.controller[2].AddNode "self" p
p.pos.controller[2].script = ("at time (currentTime.frame + offset) self.pos.controller[1].value")
)
-Johan