- Lock option on Nodes
Potential Problem: When you share that hip file (houdini file) with anyone else it won't work because your node is referencing the geometry file.
Solution: Lock the node. That will essentially "bake" the geometry into the node and it will work on any computer. Right click -> lock node
Create variable that will give you the random range you want. The name is arbitrary. You make it up. Seth called it thickness. Notice he is currently using rand($pt). This will give you a random number between 0-1. So when you do it a better solution would be rand($pt)*5. This is Seth's solution later. Stuff You Don't Need to Read:$pt is a local varible called point number. In our case we are "seeding" the random function with point number. This is useful because no two point numbers are the same.
2. You can add referenced parameters
The second example shows two chanel references being added together
3. Stamping
The current network is a tower being copied onto a line with a couple points.
Inside the copy node there is stamping.
Make sure to turn on the stamping.
Create variable that will give you the random range you want. The name is arbitrary. You make it up. Seth called it thickness. Notice he is currently using rand($pt). This will give you a random number between 0-1. So when you do it a better solution would be rand($pt)*5. This is Seth's solution later. Stuff You Don't Need to Read:$pt is a local varible called point number. In our case we are "seeding" the random function with point number. This is useful because no two point numbers are the same.
Now, go to the parameter that you want to be random (in our case it is tower thickness) and reference the stamp parameter by typing the following in the box:
stamp("path name to copy node", "name of parameter in copy node", default value)
Seth uses -1 as the default value because if something goes wrong, he will know immediately because there won't be any towers there anymore!
If you have checked the stamping box, and made sure your rand function evaluates to something greater than 1, and referenced your stamp variable you created using the stamp command, then you are good to go!
4. The Problem With Random Seeds
Let's say you have two "stamp" variables you created. What if you type in rand($pt) * (a number) into both of them? See picture below...
Problem: It's not actually "random." Both thickness and height are getting the same number from rant($pt). Notice how thickness seems related to height. That's because it is. Each time you go throught our "for loop" of copying, the function rand($pt) WILL give you a new random number because $pt is changing. However, this rand($pt) function is in the SAME iteration of the loop and it is using the SAME value for $pt. So it will always return the same number.
Solution: Give your second rand function a new seed. So somehow it needs a unique number from it's partner. Easy solution: Just add a number inside the parentheses.
Now notice how height is no longer related to thickness. We are giving two different seeds to our rand function. So now they return different numbers.
End Part 1









No comments:
Post a Comment