Rigid Transform from Deformed Geometry

   5289   8   0
User Avatar
Member
12603 posts
Joined: 7月 2005
Offline
Hi all,

Does anyone have a good method for deriving a transform that would represent the best fit of a reference geometry to an arbitrarily transformed geometry (of the same topology)?

Thanks in advance,
Jason
Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
User Avatar
Member
8742 posts
Joined: 7月 2007
Offline
Extract Transform Object does exactly that (considering that the geometries only differ by transform and no other deformation)
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
12603 posts
Joined: 7月 2005
Offline
Thanks tamte!

I don't know how I missed that! Now I do wish there was a python function or a SOP version of that; using Objects like this can be rather awkward inside setups, don't you think?

Take care,
Jason
Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
User Avatar
Member
8742 posts
Joined: 7月 2007
Offline
yes, SOP, Python or VEX version would be great as well

for now you can include Scene Network with nested Extract Transform Object inside of your asset and sample transform matrix by python or VEX
should work with COPy/Foreach Stamping as well so you can have just one Extract Transform and feeding different geometry pairs per copy/point/primitive and getting the matrix so using it sort of like a function to precompute matrices and store to points then you can just access them quickly later, or keep it live

but yes, still akward
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
12603 posts
Joined: 7月 2005
Offline
Yeah, we've got it working for us, but it's not pretty

Does anyone know the HDK function that does this? I'll try an inlinecpp if I can find it!
Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
User Avatar
Member
8742 posts
Joined: 7月 2007
Offline
looks like this
http://www.sidefx.com/docs/hdk13.0/_o_b_j___extract_geo_8h_source.html [sidefx.com]
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
12603 posts
Joined: 7月 2005
Offline
Yeah, I can't tell from that which function it's using to do the work; and I've done a little wading through GU_Detail with no luck so far. It's gotta be in there somewhere!
Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
User Avatar
Member
4271 posts
Joined: 7月 2005
Offline
I've used this for prototyping a tool that would search published geo datasets where the artists “forgot” to leverage instancing.

http://elonen.iki.fi/code/misc-notes/affine-fit/ [elonen.iki.fi]

Comes in handy when a 1,000,000 poly object is actually composed of a much smaller instancible subset of geo that was copy, pasted, and combined in Maya.
if(coffees<2,round(float),float)
User Avatar
Member
12603 posts
Joined: 7月 2005
Offline
Nice resource, thanks!
Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
  • Quick Links