What's the difference between "@pscale" an "@scale"?

   6751   4   2
User Avatar
Member
12 posts
Joined: April 2019
Offline

I have a test–use pointwrangle change a grid like @scale=rand(@P) or @pscale=rand(@P),then put a box copytopoint to the grid.I find that both @scale and @pscale work,different size of boxes are attached to the point of the grid.But the effect are not totally the same.If I use @ascale,@bscale,@cscale and so on,they all doesn't work.
So what’s the difference between the meaning of @scale and @pscale?
Edited by Middle-Earth - July 3, 2019 08:22:34

Attachments:
Forloop_make_stars.png (230.1 KB)

User Avatar
Member
2531 posts
Joined: June 2008
Offline
@scale is a vector and @pscale is a float. Using @scale you can specify different scales for different axis, with @pscale all axis sizes remain the same.

Typical practice is to use @pscale for everything!
The only time I have ever had to specify @scale, at the SOP level, was when working with clusters, it is used to set the box size of the cluster.

Try this in your code to observe non-uniform scaling on all axis.
@scale = set(rand(@ptnum),rand(@ptnum+801), rand(@ptnum-311));
Edited by Enivob - July 3, 2019 08:34:23
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
12 posts
Joined: April 2019
Offline
From your answer,it looks like @scale and @pscale have the same meaning,they are both represented the size of the point.The only difference is that one is vector and the other is scalar.Is what I understand above right?
User Avatar
Member
37 posts
Joined: Feb. 2015
Offline
With pscale you set one size. But I think With scale you can set scalex scaley and scalez so you can control those 3 values separately if need be.
User Avatar
Member
8538 posts
Joined: July 2007
Offline
you can even use both, they'll be multiplied
You may want to look into docs for more info
https://www.sidefx.com/docs/houdini/copy/instanceattrs.html [www.sidefx.com]
Tomas Slancik
FX Supervisor
Method Studios, NY
  • Quick Links