Vectors orientation

   906   1   0
User Avatar
Member
73 posts
Joined: March 2016
Offline
Hey All,
Probably a very easy fix, but particle/ pyro isn't my strong suit.
Image Not Found


I'm trying to learn how to do a powder explosion simulation and I'm using my own geo instead of the sphere in the tutorial. However my vector seem to only be going in one direction when I normalize them. How would I modify it to go in all directions?
Any help would be most appreciated!

Houdini 20.0.0688
Mac OS 15.3

Attachments:
Screenshot 2025-02-13 at 10.22.24AM.png (3.2 MB)

User Avatar
Member
9384 posts
Joined: July 2007
Offline
you can also pretend your text is within a 0 centered unit cube when generating direction from @P
adjust Bias to blend between the that and original @P based directions to get the directions you like

float bias = chf( "bias" );
vector center = getbbox_center( 0 );
vector size = getbbox_size( 0 );
vector P = ( v@P - center ) / lerp( size, {1,1,1}, bias );

vector f = chv("frequency");
vector o = chv("offset");
v@v = normalize( P ) * random(@ptnum) * xnoise( v@P * f + o);

EDIT: also make sure the signatures of random() and xnoise() are what you want as by using them in a single line assigned to vector variable or attribute they will return vector effectively changing directions slightly as they act per component
if you wanted to change just length use float signatures
v@v = normalize( P ) * float(random(@ptnum)) * float(xnoise( v@P * f + o));
or
float length_scale = random(@ptnum) * xnoise( v@P * f + o) ;
v@v = normalize( P ) * length_scale;
Edited by tamte - Feb. 13, 2025 13:24:26
Tomas Slancik
CG Supervisor
Framestore, NY
  • Quick Links