Deform Mesh to Face

   1258   6   2
User Avatar
Member
36 posts
Joined: 12月 2016
Offline
Hi everyone, I wanted to get some input on the best way to deform a mesh to a face. In the provided image, I want to deform the complex geometry to the face that can be seen as an outline around the other geo. Would ideally like a solution using mainly VEX if possible. Thanks in advance!

Attachments:
Screenshot 2023-10-05 at 2.40.11 PM.png (683.0 KB)

User Avatar
Member
193 posts
Joined: 12月 2016
Offline
your question is unclear to me.

Do you mean face as in human face, a polygon or a surface at the front of something with complex geometry ?

I'm not sure what u mean here is a solution.

If you need a circular projection or any other sort of projection, you need to offset the back group with an atribute.
If you have anny work you can trow my way please do so.

I could also be that all you need a match size or just a lattice.

THere is also an entrgma tutorial on making a lattice per quad that has a lot of info on it conserning how to write vex doing something similar.
I beleave it was something with dice on a dog or something i don't remember.
Edited by NicTanghe - 2023年10月6日 12:48:22

Attachments:
face.hiplc (92.0 KB)

User Avatar
Member
36 posts
Joined: 12月 2016
Offline
Sorry for the confusion! Here's an example file. I actually was able to get the deformation working using xyzdist and primuv, however I'm now having an issue where the orientation of the pattern is inconsistent due to inconsistent vertex ordering and thus inconsistent parametric UVs across the polygons. Let me know if you have any idea how to solve that... thanks!

Attachments:
match_to_face_test_XYZDist2.hipnc (227.3 KB)

User Avatar
Member
475 posts
Joined: 7月 2005
Offline
You can use uv-coordinates for example to transform geometry onto another similar to creep (but the coordinates must unique). As uv-coordinates the intrinsic uv-attribute can be used.

Attachments:
match_to_face_test_XYZDist2_uvcreep.hipnc (250.5 KB)

User Avatar
Member
36 posts
Joined: 12月 2016
Offline
That is very cool and works really well! However it still has the same issue with not being able to control the pattern orientation. I think this is due to UV unitize, or the intrinsic UVs as you're using, mapping based on point number. I was trying some sort of box mapping to keep the polygon orientations in the UV map however this is still proving difficult to do and to map to the full UV space... any input on this issue would be much appreciated
User Avatar
Member
475 posts
Joined: 7月 2005
Offline
Yes the deformer is influenced by the uv. If you want to change the orientation of the uvs, you can try to sort the points by a specific rule, which gives you one fixed point (which has the lowest sort rank). This point represents a specific index of the primpoints (which are unique) and can be used to rotate(shift) the uv-coordinates.
Edited by Aizatulin - 2023年10月17日 13:17:19

Attachments:
match_to_face_test_XYZDist2_uvcreepA.hipnc (260.2 KB)
match_to_face_test_XYZDist2_uvcreepB.hipnc (273.2 KB)

User Avatar
Member
36 posts
Joined: 12月 2016
Offline
This is brilliant! Thank you so much. I'm really going to have to study your vex code
  • Quick Links