meldrew Posted November 16, 2017 Share Posted November 16, 2017 Hello all, Have been racking my brains/this forum on something seemingly quite simple, but not getting anywhere... Basically, I would like to match the scale/orientation of one set of points, based on another. Then be able to extract those 'transform' paramaters. For example, if i have a pointcloud A, with 10 points, which has been re-scalled/oriented to create Pointcloud B (in a separate process, I don't have access to those transf params). How would i then re-orient it to match? I have a photogrametry pc, which i am trying to match a tracked camera to. The issue is that the camera track is coming it at origin, so I need to transform to match the original pc. I have isolated 10 identically positioned (not identical ptnum) points from the pc & tracking data to use as 'calibrators', but can't figure out the best/most efficient next step in doing the re-orient/scale. Any help, tips, or pointers in the right direction for threads would be very much appreciated as always. Quote Link to comment Share on other sites More sharing options...
Jesper Rahlff Posted November 16, 2017 Share Posted November 16, 2017 do you have access to pointcloud B in houdini? Quote Link to comment Share on other sites More sharing options...
meldrew Posted November 17, 2017 Author Share Posted November 17, 2017 4 hours ago, Jesper Rahlff said: do you have access to pointcloud B in houdini? Hi Jesper, Thanks for the response - Yep, have access to both in H. The camera track (which is the thing I'd like to re-orient) has been done in C4D and has been given to me as an .fbx, the pointcloud is directly from photogrammetry. So far my approach has been finding 3 points in the track that i can pintoint in the PC, then creating a bounding box of each and attempting to align. I would share a .hip but unfortunately can't at the moment due to NDA's etc. Thanks again! Quote Link to comment Share on other sites More sharing options...
Jesper Rahlff Posted November 17, 2017 Share Posted November 17, 2017 so basically if I understand you correctly you want the points from pointscloud a to be on top of the points from pointcloud b? Quote Link to comment Share on other sites More sharing options...
meldrew Posted November 17, 2017 Author Share Posted November 17, 2017 45 minutes ago, Jesper Rahlff said: so basically if I understand you correctly you want the points from pointscloud a to be on top of the points from pointcloud b? Yes, and I also want to extract the XYZ rot/scale transforms needed to place them on top, so I can then apply it to the .fbx upon import. Apologies if I wasn't clear, or if this is a v simple issue that I just am not sure how to approach - one of the pitfalls of being self taught I suppose. :/ Thanks again! Quote Link to comment Share on other sites More sharing options...
meldrew Posted November 17, 2017 Author Share Posted November 17, 2017 (edited) I've worked up a quick annotated example file, with a proxy version of my problem (and a few variants of my initial explorations to solve included/bypassed). I am calculating the centre (average) of each stream as a detail attrib, and my idea was to use that as a pivot point to base the orientation from. Unfortunately I have no real math background, so I'm struggling to wrap my head around the concept of reverse engineering the rotational/translation values. Also would be very helpful to get some tips on correctly using the centerpoints I've generated in the pivot parameters of the transform node. (I am currently exploring some other threads on this specific topic.) Thanks EDIT: One approach I hadn't considered was pclookup/filter etc in VOPs - Again, something I've never used before. So I'm beginning to explore that as well. pc_match_001.hip Edited November 17, 2017 by meldrew Quote Link to comment Share on other sites More sharing options...
jkunz07 Posted November 17, 2017 Share Posted November 17, 2017 Here's something you can try using the blend pose CHOP pc_match_002.hip 1 Quote Link to comment Share on other sites More sharing options...
meldrew Posted November 17, 2017 Author Share Posted November 17, 2017 Hey @jkunz07, That's great, and super lightweight. Thanks! However I'm still trying to calculate how to extract XYZ translate/rotate parameters from this process. Any ideas on that? i.e what XYZ translate/rotate is required to get from geo A > geo B. Being able to morph one to the other is v useful, but my poinclouds are *very* heavy, so being able to just apply a transform to the .fbx would be a lighter fix in this case, If I can get that data from a sample of 3 or 4 points. Thanks again! Quote Link to comment Share on other sites More sharing options...
meldrew Posted November 17, 2017 Author Share Posted November 17, 2017 Essentially I am trying to access the results to whatever calculation(s) the 'extract transform' SOP does at object level... If anyone has any idea how to do that? Quote Link to comment Share on other sites More sharing options...
moneitor Posted November 17, 2017 Share Posted November 17, 2017 I just tried another approach building the transformation matrix itself, the transform contains the transformation values of the set of points B pc_match_001.hip 2 Quote Link to comment Share on other sites More sharing options...
meldrew Posted November 17, 2017 Author Share Posted November 17, 2017 Thanks @moneitor - That is exactly what I was trying to achieve, done in a way I would have not even thought about. I'll spend some time this evening/over the weekend going through it & trying to better understand the math that's going on in there. Plus some VOP stuff that's pretty new to me. Thanks for the annotations as well, they're always very helpful! Quote Link to comment Share on other sites More sharing options...
petz Posted November 17, 2017 Share Posted November 17, 2017 here's another one which is using rigid transformation similar to "extractTransform" but in sops. works also an geometries with points in arbitrary order as long as the pointcount is the same. if that's not the case you could try to use the file in this post: http://forums.odforce.net/topic/28907-wrapping-geo-like-wrap3/?tab=comments#comment-164108 hth. petz pc_match_001_1.hip 1 Quote Link to comment Share on other sites More sharing options...
galagast Posted November 18, 2017 Share Posted November 18, 2017 Hi, here's also another approach. Vex based. The only drawback as of now is that this will not work for non-uniformly scaled objects. H16.5.268 Indie - pc_match_jeff.rar 1 Quote Link to comment Share on other sites More sharing options...
meldrew Posted December 6, 2017 Author Share Posted December 6, 2017 Hey all, Left this thread behind because the workflow got pretty intense! As an update - @moneitor @petz & @galagast solutions all worked well - Thank you so much! - But the issue I kept running into, which was eventually revealed, was that the tracking data was bad So eventually I got it working with all 3 approaches once we re-tracked and got it done correctly. Thanks again everyone for your kind help - I learned a heck of a lot solving this in the end! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.