Houdini Stuff


VEX Library


  1. Ramp Pscale
float rand_val = rand(@ptnum);
float ramp_val = chramp("ramp", rand_val);
@pscale = fit01(ramp_val,chf("Min_Size"),chf("Max_Size"));
  1. Randomize Colour
float rand_id = fit(rand(@id*chf('seed')),0,1,0,100);
float red_percent = chf("red_percent");
float green_percent = chf("green_percent");
@Cd = set(0,0,0);
if( rand_id<=red_percent){
    @clr_x = 1;
    }
if ( rand_id >red_percent && rand_id <=red_percent+green_percent){
    @clr_y = 1;
}
if (rand_id >red_percent+green_percent){
    @clr_z = 1;
}

v@Cd = set(@clr_x,@clr_y,@clr_z);
  1. Randomly remove % of points
float rand = rand(@id*chf('seed'));
if(rand>chf('val')){
    removepoint(0,@ptnum);
    }
  1. Fade delete points
int start = chf("fade_start");
int end = chf("fade_end");
if(@Frame>fit01(@noise,start,end)){
    removepoint(0,@ptnum);
    }