Search - User list
Full Version: Random Seed Value in a Fractal SOP
Root » Houdini Lounge » Random Seed Value in a Fractal SOP
AndyS
I am attempting to make a field full of rotten boards sticking up from the ground.

I created the boards using an Add SOP and applied a Fractal SOP predominantly scaled in one direction to give the board a broken/rotted feel. I wired the board, and a grid, into a Copy SOP to create an array across the grid template.

The trouble I'm running into is that each board is identical in appearance. I am trying to figure out a way to generate a random value for the “Seed” value in my Fractal SOP so that each board will be slightly different. Is there a variable I can plug into “rand($____)” that will change the Seed value of my Fractal SOP on a point by point basis?

Thanks,
Andy

Sorry if this is basic, I haven't been using Houdini for very long.
FrankFirsching
Hello!
You have to activate the stamping of parameters. This is done in the Stamp-tab of the copy-SOP. The check-box “Stamp inputs”, needs to be active for this, else your copies won't vary. In Var1 you can name the new parameter (e.g. BoardNr in your case). In Param1 you define the value of the new parameter (in your case $PT, the point-number of the template). In the upstream-graph of the copy-SOP you can acces the new parameter by param(“BoardNr”,1). As you might expect, the first argument specifies the parameter, which value should be read. The second is a default value for the parameter. Simply put this expression into the seed of the fractal-SOP, then you should get what you want.

Frank
wolfwood
You could try copy stamping.

Change the “Seed” parameter to param(“seed”,0) in the Fractal SOP.
Then in the Copy SOP, go to the second tab and check “Stamp Inputs” and
for “var1” enter “seed” and for “Param1” enter “$PT”.

jim.
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