Geometry level sticky

   7500   11   3
User Avatar
Member
166 posts
Joined: Oct. 2008
Offline
I'm trying out Houdini's wire solver for solving guide hairs imported from Maya. What I would need is a way to pin those curves to the geometry which they are stuck to on frame one. And aligning the curve to the point normal.

Just like if I would use Copy SOP with a line onto deforming geometry. However in this case I already have the curves, and they are positioned their vertex from the beginning.

Does anybody have a smart way of achieving this? I have a way that might work but unfortunately probably is a bit computational intense.
User Avatar
Member
166 posts
Joined: Oct. 2008
Offline
To clarify:
I have couple of curves, each with its first point at the same position as a point on a deforming geometry. I would like to have the curves translating/rotating according the the position and normal of the point on the deforming geometry which they are positioned on.
User Avatar
Member
897 posts
Joined: July 2018
Offline
You want the wireglueconstraint DOP. There's a good demo of it in the help.
B.Henriksson, DICE
User Avatar
Member
166 posts
Joined: Oct. 2008
Offline
kahuna031
You want the wireglueconstraint DOP. There's a good demo of it in the help.

Thanks, however, to get the wireglueconstraint DOP to work the curves need to already follow the deforming surface as far as I can tell.Which mine are not.
In the example in the help, lines are copied onto the geometry and therefore follow it in SOP as well.
My curves are only lined up to the geometry on the first frame.
User Avatar
Member
897 posts
Joined: July 2018
Offline
ahh, should have understood that from the topic maby then I think it's this thingie your after:
http://www.fourthwall.ndo.co.uk/HT_HDK_SBCdeformer.html [fourthwall.ndo.co.uk]
B.Henriksson, DICE
User Avatar
Staff
329 posts
Joined: July 2005
Offline
xtimmyx
I'm trying out Houdini's wire solver for solving guide hairs imported from Maya. What I would need is a way to pin those curves to the geometry which they are stuck to on frame one. And aligning the curve to the point normal.

Just like if I would use Copy SOP with a line onto deforming geometry. However in this case I already have the curves, and they are positioned their vertex from the beginning.

Does anybody have a smart way of achieving this? I have a way that might work but unfortunately probably is a bit computational intense.

Would computing a local transform for each point of on the skin and then applying it to each hair work? Here's a simple HDA for doing this. It uses animated and rest skin as inputs and assumes a simple mapping from point numbers on hairs to the corresponding point on the skin. You can then use a Wire Glue Constraint DOP or simply create a point attribute called “gluetoanimation” set to one for points you wish to constrain and zero for unconstrained points.

Attachments:
wire_transform_hairs.otl (7.8 KB)

User Avatar
Member
166 posts
Joined: Oct. 2008
Offline
derrick
Would computing a local transform for each point of on the skin and then applying it to each hair work? Here's a simple HDA for doing this. It uses animated and rest skin as inputs and assumes a simple mapping from point numbers on hairs to the corresponding point on the skin. You can then use a Wire Glue Constraint DOP or simply create a point attribute called “gluetoanimation” set to one for points you wish to constrain and zero for unconstrained points.

Nice! That one seems to do exactly what I want. However I can't seem to get an accurate result with it. I've posted an example scene for you to look at. It seems to work quite well but their not perfectly pinned to the deforming skin.

Attachments:
animatedHairs.hip (57.0 KB)

User Avatar
Staff
329 posts
Joined: July 2005
Offline
xtimmyx
Nice! That one seems to do exactly what I want. However I can't seem to get an accurate result with it. I've posted an example scene for you to look at. It seems to work quite well but their not perfectly pinned to the deforming skin.

Oops. I found my mistake. Here is an updated asset.

Attachments:
wire_transform_hairs.otl (7.9 KB)

User Avatar
Member
166 posts
Joined: Oct. 2008
Offline
Works perfectly! Thank you very much.
User Avatar
Member
897 posts
Joined: July 2018
Offline
Hey derrick.

Sorry, but I get pretty random results unless hair points matches the rest geo. Seems like it doesn't do any nearest point lookup between hair/rest geo. Also, by only inheriting one transform in the apply_transform VOP SOP you can't interpolate the results over a primitive.

I think the first issue can be fixed by doing a pointcloud lookup to get the `ptnum` value that goes into the translation in the apply_transform. The interpolation can then be resolved by doing the lookup a few times and blending.

Alternatively one can precompute the lookup phase in a more clever way and store the initial relationship between hars and rest geo in div attributes but this is kinda what barycentriccoordinates does (as in the link in my previous post).
B.Henriksson, DICE
User Avatar
Staff
329 posts
Joined: July 2005
Offline
kahuna031
Sorry, but I get pretty random results unless hair points matches the rest geo. Seems like it doesn't do any nearest point lookup between hair/rest geo. Also, by only inheriting one transform in the apply_transform VOP SOP you can't interpolate the results over a primitive.

The asset makes some assumptions about how to map from point numbers on the hairs to points on the skin. However, the asset is quite small and should be easy to change. The asset could be modified to do nearest point lookup or something similar. The Attribute Transfer SOP may also be useful for interpolating transforms onto the hairs.
User Avatar
Member
33 posts
Joined:
Offline
Very informative thread! Could you elaborate Derrick, or anyone else, on how to do a nearest point lookup to remedy this problem?

I'm still trying to find a solution to kahuna31's problem that arises from not growing the hairs from the surface points.

Thanks in advance!
  • Quick Links