Last active
August 28, 2017 16:16
-
-
Save ayoburgess/8143786da3d8d65d333c1e897951c755 to your computer and use it in GitHub Desktop.
Additional rotation on top of instances in Houdini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "math.h" | |
// additional rotation on top of instance placements | |
vector rot_variance = chv("rot_variance"); | |
float x_rot = fit(rand(@ptnum+1), 0, 1, 0, rot_variance.x); | |
float y_rot = fit(rand(@ptnum+2), 0, 1, 0, rot_variance.y); | |
float z_rot = fit(rand(@ptnum+3), 0, 1, 0, rot_variance.z); | |
vector rotation = set(x_rot, y_rot, z_rot); | |
rotation = radians(rotation); | |
p@rot = eulertoquaternion(rotation, XFORM_SRT); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment