Jump to content

Use noise to move particles back and forth in one axis


Recommended Posts

Hello,

Please see the attached video (created in Cinema 4D) for what I am trying to achieve in Houdini.

I'm brand new to Houdini and am trying to move particles in one axis, that smoothly swing back-and-forth.

I don't mind using VEX to do this. I've been playing with P.z and v.z * rand(@id), and can move each particle in a random direction along Z, but I can't get the back-and-forth swinging motion.

Thanks.

particles_random_movement_in_one_axis.mp4

Link to comment
Share on other sites

OK, I've made some progress. I used a POP VOP to drive force instead of position or velocity, and it worked (thanks to Jeff Wagner's comment here). I also used a POP Soft Limit to recover any stray particles shooting off. Scene file attached here. If I'm doing anything grotesquely wrong (or even mildly wrong), please do chime in and let me know how I could improve it.

Particles One-Axis Test.hipnc

Link to comment
Share on other sites

  • 2 weeks later...

Here is a slight variation to Matt's wrangle solution using the full definition for curl noise, extracted from an attributevop using the View VEX Code menu option.

#include <voplib.h>

vector freq = set(1,1,1);
vector offset = set (0,0,0);
vector surface_normal = set(0,0,0);
float amp = 1.0;
float roughness = 0.5;
int turb = 3;
float atten = 1.0;
float step_size = 0.0001;
vector vop_noise = vop_curlNoiseVV(@P+@Time, freq, offset, surface_normal, "pnoise", "", turb, 0, amp, roughness, atten, 1, 1, step_size);
@P.z += vop_noise.z; 

This gives you access to many more noise parameters that you may be used to manipulating, like frequency, amplitude, etc...

Edited by Atom
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.

×
×
  • Create New...