Troubles orienting objects along curves

   1148   2   0
User Avatar
Member
1 posts
Joined: 12月 2019
Offline
Hey everyone I'm an artist who's fairly new to Houdini and struggling with how to control orientation of objects along a curve. The curve is being generated by the ‘edgegroup_to_curve’ sop and my objects are orienting along the U tangent from a ‘polyframe’ properly, but I also want to control their orientation along another normal (N) generated from the original geometry, so that all the objects face inward as well. I've been trying to do this via a pointvop and messing around with the tangentu and tangentv and N from the original geo, but I'm getting into quaternions and mathy stuff that I'm really new at and I have no clue what I'm doing. I've attached my .hip file if anyone out there is feeling kind enough to help me out.

Thanks!

Attachments:
OrientToCurve.jpg (1.1 MB)
OrientCurveHelp.hipnc (326.4 KB)

User Avatar
Member
480 posts
Joined: 7月 2005
Offline
Hi,

with xyzdist() you can get the closest point of each curve point to the original geometry.

With primuv() you can read the local attributes (normal ~ ‘N’), which is an interpolated value of the surrounding neighbour attributes.

Here is an example.

Attachments:
attributes_to_curves.hipnc (89.7 KB)

User Avatar
Member
555 posts
Joined: 2月 2017
Offline
is this what you mean by facing inward ?

So after polyframe2, I think your N are all correctly facing out, doesn't matter if it's out it's all relative.

Then next step is to ensure your tube is facing Z correctly, then align it with max or min Z, one of them is right, the other is wrong depending on your N above.

Attachments:
FaceIn.jpg (99.0 KB)
vu_OrientCurveHelp.hipnc (295.0 KB)

  • Quick Links