Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Maxon Cinema 4D Random seed for noise in iteration

  • Random seed for noise in iteration

    Posted by Joshua Stearns on March 17, 2010 at 10:23 am

    First of all, let me say hello! I just signed up on the forums and this is my first post. But surfing answers here has already taught me alot.

    Here’s the project:
    A coworker of mine has set up a field of objects. A few hundred square splines under a heirarchal extrude nurbs. She wants them to move up and down randomly and to be able to pause their motion and then restart it. Essentially, one set of keyframes to handle hundreds of objects. The ideal solution would be Mograph, I know, but our shop doesn’t have it yet. I’m trying to come up with an alternative solution that is less tedious than keyframing every object.

    What I’ve tried so far:
    I’m experimenting with a set of five objects so I can move more quickly than dealing with the final scene.

    First up was to give Vibrate a shot.I dropped one on each object, and adjusted the seed for each one. The motion worked fine, though I had to drop every object in a null to keep it from centering them to the world origin. But Starting and stopping the animation created a jump where the vibrate tag adjusts to the time, so unless I can fix that, it’s out.

    I’m currently working with Xpresso to try and get a better result. I have an ObjectList node feeding the list of objects, so as to not have to set this up over and over again. The position.y of the object is being fed by a noise node, whose amplitude is controlled by userdata set up on the object holding the xpresso tag. This gives me a uniform motion that is definitely the beginnings of what we need.

    Where I’m Stuck:
    The up and down motion is fine, but I need each object to calculate with a different random seed so that they aren’t all moving in the same direction at the same time. I’ve tried to connect several things to the seed value of the noise node, but haven’t found anything that works right.

    The second issue is pausing and starting the movement via keyframe. Frankly, I’m not sure how to set up Xpresso to do this.

    Help would be greatly appreciated.
    Thanks!

    Joshua Stearns replied 16 years, 4 months ago 2 Members · 2 Replies
  • 2 Replies
  • Adam Trachtenberg

    March 17, 2010 at 5:25 pm

    That was a good puzzle, thanks. 😉

    Hopefully you have Thinking Particles. If so, this may be of some use to you: https://www.3danvil.com/tutorials/Random%20up-down%20particles.c4d

    Basically what it does is use particles to distribute the objects. The particle positions are modified by an animated noise node, but only on the Y axis. In this case the particles are generated by a matterwaves node, but you could use any type of generator.

    Freezing the particles is accomplished by animating the user data that feeds into a range mapper node’s “output upper” parameter, so essentially what you’re doing is keyframing the amount of influence the noise has over position.

    Took me a while to figure out, but the key was to feed the getdata node’s random seed into the noise node’s seed parameter. That allows you to influence each particle differently. I found it necessary to reduce the getdata random seed before feeding it in.

    A lot of trial and error, here. You can tweak it any number of ways. I suggest playing with the constant amount in the divide node between getdata and noise nodes, and by playing with the parameters of the noise node itself.

    Oh yeah … get MoGraph. 🙂

  • Joshua Stearns

    March 18, 2010 at 10:23 am

    Hate to say it, but we’re without TP as well. In fact, I do beleive that our shop has no added modules whatsoever. It’s terribly frustrating.

    My thanks though, Adam, for taking the time to find a solution. Our art director has informed me that it’s been added to the budget to get us the other modules sometime this year, so hopefully that will happen, and even though this particular project’ll probably be long past, I’ll come back and check this out. I can always use more Xpresso knowledge.

    In the meantime, though, if you or anyone else has a solution that will work in the primitive environment I’m in, I’d love to hear it. 🙂 If not, no big deal.

    Progress:
    Just figured I’d post what I’ve learned so far. (Aside from how badly our shop needs to purchase MoGraph or Thinking Particles.)

    I’ve found that the vibrate tag will not go into ObjectList nodes, but will go into a Link List node.

    While animating frequency on vibration tags and noise nodes, they’ll pause if you drop it to zero, and start up again from the same place. The problem is that it doesn’t want to animate properly between the values. I guess there’s some strange quirk in the way it’s calculated.

    I found one solution for stopping and starting the motion. I linked my objects (named “1”-“7”) to 7 nulls (named “1”-“7” also) using a PSR Constraint on the y position only. Each null is hooked up to it’s own noise node with the seed varied on each. The weight of each Constraint is linked to one, so only one has to be keyframed. By animating the weight, I can bring them out of synch or back into synch with the nulls. – Unfortunately, this solution still lacks the elegance of your TP solution, since each null has to be manually linked up to a noise node. I guess I could use vibrate to the same effect, to at least save on Xpresso. But the random seed still has to be set for each one. Then the PSR constraints have to be manually set up for each one. I honestly think it’d be less trouble to manually keyframe them rather than do this. If Xpresso can streamline or replicate that process, though, this might be viable.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy