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.
Geometry level sticky
7555 11 3- xtimmyx
- Member
- 166 posts
- Joined: 10月 2008
- Offline
- xtimmyx
- Member
- 166 posts
- Joined: 10月 2008
- Offline
- kahuna031
- Member
- 897 posts
- Joined: 7月 2018
- Offline
- xtimmyx
- Member
- 166 posts
- Joined: 10月 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.
- kahuna031
- Member
- 897 posts
- Joined: 7月 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]
http://www.fourthwall.ndo.co.uk/HT_HDK_SBCdeformer.html [fourthwall.ndo.co.uk]
B.Henriksson, DICE
- derrick
- スタッフ
- 329 posts
- Joined: 7月 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.
- xtimmyx
- Member
- 166 posts
- Joined: 10月 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.
- derrick
- スタッフ
- 329 posts
- Joined: 7月 2005
- Offline
- xtimmyx
- Member
- 166 posts
- Joined: 10月 2008
- Offline
- kahuna031
- Member
- 897 posts
- Joined: 7月 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).
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
- derrick
- スタッフ
- 329 posts
- Joined: 7月 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.
- dvfedele
- Member
- 33 posts
- Joined:
- Offline
-
- Quick Links