Hi,
I'm trying to copy a teapot to each point on a grid with different random sizes.
The tutorial I am following uses a vopsop to fit a random number between .1 and 1 and applies that to a created pscale attribute.
In Houdini 14 vopsops are a thing of the past. I have tried to use attibute vop as well as point vop. The pscale attribute gets added but all the values are the same.
Anyone know a workaround/solution?
pscale
36390 6 3- stinkylando
- Member
- 6 posts
- Joined: April 2012
- Offline
- Werner Ziemerink
- Member
- 1268 posts
- Joined: March 2014
- Offline
Why don't you use an ‘Attribute Randomize’ SOP instead of the attribVOP. It can be done with the VOPSOP, but Atrribute randomize makes this very easy.
Change the attribute name to pscale and play with the min max settings.
To get your method to work, you need to use the bind export vop, instead of the Add attribute in side the ArrtibVOP. Just set the attribute name to pscale in the bind export.
Change the attribute name to pscale and play with the min max settings.
To get your method to work, you need to use the bind export vop, instead of the Add attribute in side the ArrtibVOP. Just set the attribute name to pscale in the bind export.
- sl0throp
- Member
- 258 posts
- Joined:
- Offline
- trojan_goat
- Member
- 41 posts
- Joined: June 2010
- Offline
- stinkylando
- Member
- 6 posts
- Joined: April 2012
- Offline
- MrReedSmith
- Member
- 49 posts
- Joined: Sept. 2013
- Offline
Hey stinkylando,
I just looked at your file, you have almost the right idea.
Just instead of addattribute inside your attrvop node , use bind_export and name the attribute pscale and then you should be fine.
You can also add a power node after your fit range node to get more fine control over your sizing.
The other method is really simple too,
Just drop down a point wrangle node below your grid object
type in the following snippet:
@pscale = fit01(pow(rand(@ptnum),1,0.1,0.8);
like all other nodes you can add parameters to this too:
so you can go to edit parameter interface and add 3 parameters namely, “power”, “pscale_min”, “pscale_max”
then the above expression will become:
@pscale = fit01(pow(rand(@ptnum), ch(“power”), ch(“pscale_min”), ch(“pscale_max”)));
Now you have control over all parameters and you adjust your pscale the way you want to!
Cheers!
-Yash
I just looked at your file, you have almost the right idea.
Just instead of addattribute inside your attrvop node , use bind_export and name the attribute pscale and then you should be fine.
You can also add a power node after your fit range node to get more fine control over your sizing.
The other method is really simple too,
Just drop down a point wrangle node below your grid object
type in the following snippet:
@pscale = fit01(pow(rand(@ptnum),1,0.1,0.8);
like all other nodes you can add parameters to this too:
so you can go to edit parameter interface and add 3 parameters namely, “power”, “pscale_min”, “pscale_max”
then the above expression will become:
@pscale = fit01(pow(rand(@ptnum), ch(“power”), ch(“pscale_min”), ch(“pscale_max”)));
Now you have control over all parameters and you adjust your pscale the way you want to!
Cheers!
-Yash
- suntemple777
- Member
- 6 posts
- Joined: April 2011
- Offline
@MrReedSmith,
welcome back to life super old thread!
I am trying this now and am able to get rotation and uniform scale to randomize in an attribute wrangle.
Using this:
@pscale = rand(@ptnum);
@orient = rand(@ptnum);
Here @ptnum variable is storing the point numbers being used as a seed through which the key term “rand” is generating random/sudo random values.
However I am missing something when it comes to using your example above. I get a syntax error..
–Just figured it out!
I just tried this and it works:
@pscale = fit01(pow(rand(@ptnum), 2), 0.1, 0.8);
The difference seems to be that I am defining a value of (2 in this case) for the power to be with in the bounds of the parentheses that include the pow function. I found this to also be and issue with the above example where channels sliders are used instead of fixed values also for some reason the quotes where not being recognized as valid quote characters in houdini (pasting font problem or something) :
This does not work:
@pscale = fit01(pow(rand(@ptnum), ch(“power”), ch(“pscale_min”), ch(“pscale_max”)));
This does:
@pscale = fit01(pow(rand(@ptnum), ch(“power”)), ch(“pscale_min”), ch(“pscale_max”));
Hopes this helps other folks who are confused by this!
Thanks!
-James
welcome back to life super old thread!
I am trying this now and am able to get rotation and uniform scale to randomize in an attribute wrangle.
Using this:
@pscale = rand(@ptnum);
@orient = rand(@ptnum);
Here @ptnum variable is storing the point numbers being used as a seed through which the key term “rand” is generating random/sudo random values.
However I am missing something when it comes to using your example above. I get a syntax error..
–Just figured it out!
I just tried this and it works:
@pscale = fit01(pow(rand(@ptnum), 2), 0.1, 0.8);
The difference seems to be that I am defining a value of (2 in this case) for the power to be with in the bounds of the parentheses that include the pow function. I found this to also be and issue with the above example where channels sliders are used instead of fixed values also for some reason the quotes where not being recognized as valid quote characters in houdini (pasting font problem or something) :
This does not work:
@pscale = fit01(pow(rand(@ptnum), ch(“power”), ch(“pscale_min”), ch(“pscale_max”)));
This does:
@pscale = fit01(pow(rand(@ptnum), ch(“power”)), ch(“pscale_min”), ch(“pscale_max”));
Hopes this helps other folks who are confused by this!
Thanks!
-James
-
- Quick Links