Mika Ihatsu

mihatsu

About Me

Expertise
Not Specified
Location
Not Specified
Website

Connect

Recent Forum Posts

Camera and @orient attribute Aug. 21, 2019, 7:18 p.m.

jsmack
vector4 orient = point(“opobj/geo1/point_to_sample”, “orient”, pt);

Thx! I got it work! “op” was missing element

Camera and @orient attribute Aug. 21, 2019, 5:08 p.m.

jsmack
You can create a custom constraint using a transform wrangle.

Heres an example vexpression using a quaternion representing a 45 degree rotation about the Y axis:

#include <voplib.h>
// Fetch transform inputs
chopTRS c0 = c->fetchInput(0);
float yrot = radians(45);
vector4 orient = set(0, sin(yrot/2), 0, cos(yrot/2));
vector4 rot = eulertoquaternion(radians(c0.r), XFORM_XYZ);
rot = qmultiply(orient, rot);
// Compute transform
@t = c0.t;
@r = degrees(quaterniontoeuler(rot, XFORM_XYZ));
@s = c0.s;


Ok this seems to be what I need but how I can import attributes from geometry node? I tried point() trick but it doesn't seems to work as in normal point wrangle?

Camera and @orient attribute Aug. 21, 2019, 10:32 a.m.

Hi,

How i can put my camera in point the way it uses @orient attribute for camera rotations? I can move the camera in point using point() but camera rotations are in Euler angles.

Thank you
Mika