Search - User list
Full Version: Vectors orientation
Root » Houdini Indie and Apprentice » Vectors orientation
vishnu1024
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
tamte
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;
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB