top of page
Search
  • Writer's pictureJosh

RANDOMLY ROTATE PACKED PRIMITIVES WITH ROTATION MATRIX VOP

Updated: Feb 4, 2018


I've been using this a lot for my scenes where I've copied thousands of trees or rocks or grass patches. You don't ever wanna use a stamp cause it's pretty slow, so this is a nice alternative.


So basically what's happening is that you first gather the transform data of each centroid of the packed primitive as a matrix. This is done with a primintrinsic vop. Next you want to randomize the rotation. The rotate vop takes a radian value and rotates the point along an axis. so you just randomize by ptnum or id and fit the values to be between values that you like (in radians). I use the degree to radians vop to make it easier to understand the inputs as you can then put in degree values. Finally you multiply the matrixes and set the transform attribute with a setattribute vop. Make sure to set the class to primitive intrinsic and to change the attribute to transform



0 comments
bottom of page