Surface Deform SOP and Piece Attribute

   658   4   2
User Avatar
Member
13 posts
Joined: Dec. 2015
Offline
I'm currently uncertain if I'm doing something completely wrong or if it's just a bug:

I have a single flower with some petals simulated with Vellum cloth. Nothing too fancy, the simulation is working fine.
As the render geometry is quite detailed I created a remeshed and poly-reduced version of the petals to get faster and more stable simulations.

After that I wanted to use the Surface Deform SOP to deform the high res petals with the low res from the Vellum sim.
This is working to some point but the problem is areas where the petals overlap (because they don't "know" which low res petal to follow because they're very close to each other).

But there's a nice feature in the Surface Deform SOP to use a piece attribute to tell the geometries which deformed piece captures and deforms which high res piece. I tried several combinations of Connectivity SOPs to assign either an integer "class" attribute or a string "name" attribute: It doesn't work. As soon as I add a "Piece Attribute" in the Surface Deform SOP the whole node stops working.

I attached a super-reduced version where two simple low res grids are bent in two opposite directions and are used to deform two higher res versions of themselves with a Surface Deform SOP. Because they overlap in space I used a Connectivity SOP to assign a unique piece attribute to each of them.

If you open the hip file the Surface Deform isn't working at all. As soon as you remove the name of the piece attribute it actually does "something" but the overlapping parts are not deformed by their proper counterparts.
Edited by Steffen Dünner - June 24, 2024 13:21:39

Attachments:
BUG_Surface_Deform_v02.hipnc (139.9 KB)

User Avatar
Member
491 posts
Joined: July 2005
Offline
It looks like, that the class attribute has to be primitive type (and not point type). It is working for me, if you turn the connectivity type from point to primitive (connectivity node).
User Avatar
Member
13 posts
Joined: Dec. 2015
Offline
Thanks a lot, it actually works!

I tried a lot of things but never to use a primitive attribute instead of a point attribute because of this in the documentation:



It clearly states "point attribute". :/
The attribute selection in the Surface Deform SOP also only offers to select the attribute if it's on points. So in the end it's not a bug but just a case of wrong documentation. I didn't use the Surface Deform before, maybe this behaviour (primitive instead of point attribute) changed some version of Houdini ago?
Edited by Steffen Dünner - June 25, 2024 02:27:15

Attachments:
Capture.png (28.1 KB)

User Avatar
Member
491 posts
Joined: July 2005
Offline
Sure

and you are right, there should be another hint. I think it makes more sense to use the primitive attribute anyway, because if you capture the geometry, it is creating information about the prim and the primuv coordinates. So the node can restrict the search to the corresponding class.
Just checked it, it doesn't matter if the source class is point or prim type, it only matters for the surface.
User Avatar
Member
4616 posts
Joined: Feb. 2012
Offline
Generally if the type is specific, this should be mentioned in the parameter label because if it's changed later on, you wouldn't need to change the parameter name.

If it's not specific type, then it should be agnostic like above. There are cases where it's not done this way and it can be confusing.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
  • Quick Links