Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Additional rotation on top of instances in Houdini
#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
You can’t perform that action at this time.