3 point align (like in maya)

   2106   4   0
User Avatar
Member
1004 posts
Joined: April 2017
Offline
Hi!

I'm doing some photogrametry of a rock I did in Photoscan. I've done it in 2 steps (I flipped the rock so capture the top and bottom). Both mesh have overlaping features I can visually identify.

Once I get into houdini to clean/process both meshes, I end up with 2 meshes with different position/rotation and even scale. I would like to replicate a tool in maya that lets you select 3 points (in a specific order) on the first mesh and the equivalent 3 points on the second mesh. From there, it moves/rotate/scale the mesh to match the second.

I'm guessing I would:

1. group 3 points on first mesh
2. group 3 points on second mesh that seems to be at the same place (in the same order)
3. create poly triangle for each sets of 3 points (how?)
4. get @N info from both triangles
5. use @N info to rotate the mesh (how?)
6. somehow move and scale with info found on both point groups… (zero clue on how to do this… …????)

I'm not a Houdini scientist and so, any help would be appreciated about how to use the info found on those points to do the translate/rotation/scale.

-Olivier
Edited by olivierth - Sept. 9, 2018 13:01:17

Attachments:
3_pont_align_like_maya.jpg (102.4 KB)
top_and_bottom_photoscan_rock.jpg (277.9 KB)

User Avatar
Member
7754 posts
Joined: Sept. 2011
Offline
There are probably better ways to do this, but this is the only way I can think of that doesn't involve a bunch of code and math.

It's not the most intuitive, since it frustratingly requires creating a duplicate of a target mesh in order to prevent a recursion error.

Attachments:
three-point.png (990.9 KB)
three-point.hip (327.8 KB)

User Avatar
Member
1004 posts
Joined: April 2017
Offline
Chop is definitely something I know nothing about!

I'll take your setup for a spin. Thanks!

-Olivier
User Avatar
Member
7754 posts
Joined: Sept. 2011
Offline
It's the ‘new’ constraints. I try to pretend it isn't chops, since it doesn't really overlap with normal chop nodes/usages.
User Avatar
Member
1004 posts
Joined: April 2017
Offline
I forgot about this post.

I ended up figuring out my own way. You can check it out if you're interested.

https://www.sidefx.com/forum/topic/58153/ [www.sidefx.com]

-Olivier
  • Quick Links