Jump to content

Use noise to move particles back and forth in one axis

Recommended Posts


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.



Share this post

Link to post
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

Share this post

Link to post
Share on other sites

Thank you both. Matt, that was what I originally wanted, but I do want to later simulate them. I'm still taking baby steps into Houdini's way of doing things, so I'll probably be back with related questions.  Thanks again.

Share this post

Link to post
Share on other sites

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

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now