Best-fitting a mesh to some points

   2074   2   1
User Avatar
Member
207 posts
Joined: Nov. 2015
Offline
Hello!

I'm interested in best-fitting a mesh to a series of points in 3d space (using only translation/rotation/scaling of the mesh, rather than warping it).

To elaborate: I have some data generated by matchmove software: a camera, and several trackers that exist in 3d space. The trackers indicate the position of various features in the plate for my shot. I also have a mesh – generated using photogrammetry techniques – that I would like to position in my scene. I'd like to use the trackers as indicators for where this mesh should be positioned.

I *think* what I'd like to do is associate (constrain?) some of the points on my mesh to their corresponding trackers in my matchmove data (e.g. “This feature of this mesh should be constrained to this tracker.”). This, at least, is the trategy described in most matchmove software literature I see.

What tools or techniques should I explore for accomplishing this in Houdini?

Thanks!
–a
User Avatar
Member
4495 posts
Joined: Feb. 2012
Offline
Hi,

Do you have some images? If the points and the mesh line up roughly given the proper orientation and they are both dense enough, you can compute the PCA on both and then transform your mesh according to the matrices computed.

Here is a video that can give you some ideas whether you think it would work with your data:

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 | animatrix2k7.gumroad.com
User Avatar
Member
207 posts
Joined: Nov. 2015
Offline
Here is my plate in Houdini, seen from a matchmoved camera. The pyramidal trackers are from Syntheyes (matchmove software):




Here is a mesh I generated from the plate itself, using PhotoScan:



This mesh bears no relationship to the trackers at all, so I need to position it into place so that it matches my camera. Right, now I'm doing this by eyeballing, which is obviously crazy tedious and also imprecise.




Syntheyes offers a mechanism by which I can import this mesh into the matchmove scene, and associate a given tracker with a point on the surface of this mesh, which constrains that bit of the mesh to that tracker. Ostensibly, I can do this for several points on the mesh to leverage the trackers to move the mesh into place. But I figure Houdini could surely do this as well, and I'm curious how.

Attachments:
Screen Shot 2018-03-14 at 1.42.38 PM.png (2.5 MB)
Screen Shot 2018-03-14 at 1.43.20 PM.png (1.9 MB)
Screen Shot 2018-03-14 at 1.43.38 PM.png (2.0 MB)

  • Quick Links