ino Posted March 1, 2020 Share Posted March 1, 2020 if i have an object with a follow path constraint network how can i get the 3d position of the object although the object is moving along the path its position isnt changing in the spreadsheet Quote Link to comment Share on other sites More sharing options...
anim Posted March 2, 2020 Share Posted March 2, 2020 50 minutes ago, ino said: although the object is moving along the path its position isnt changing in the spreadsheet what spreadsheet? parameter spreadsheet? the parameters on each Object represent it's local transform, which is applied on top of it's Parent Transform, Subnet Trandform and Pre-Transform, additionally Constraints can query any of those transforms or combination and produce final world space transform you can query it using Object CHOP, optransform() VEX function, node.worldTransform() Python Function, origin() Hscript function among others you can also objectmerge geo of such object into SOPs and if you Pack Before Merging, the merged geo will have packedfulltransform intrinsic containing the world transform of that object ... 1 Quote Link to comment Share on other sites More sharing options...
ino Posted March 2, 2020 Author Share Posted March 2, 2020 thanks you obviously know what you are talking about yes its the parameter spreadsheet i meant i would need the transformed position in a wrangler to set color depending on position in the meantime i figured i can use right click / reference / scene data / my object / transformation ... and i get this if i copy this straight in to a wrangler i get a bunch of errors not a big thing that i could probably fix in the end this is fine and will work BUT is there really now easier way something like x = getmetransform("object", "position", "X"); z = getmetransform("object", "rotation", "Z"); and not 10 lines of code where i need to add each and every transformation of the object one by one by hand { matrix src_input_xform_inverted = invert(optransform(opinput("../../pen", 0))); matrix src_xform = optransform("../../pen"); matrix src_local_xform = src_xform * src_input_xform_inverted; matrix target_xform_inverted = invert(optransform(opcreator("."))); matrix final_xform = src_local_xform * target_xform_inverted; matrix rest_xform = identity(4); matrix self_xform = rest_xform * final_xform; float result = explodematrixpr( self_xform, vector3(ch("./px"), ch("./py"), ch("./pz")), vector3(ch("./prx"), ch("./pry"), ch("./prz")), chs("./xOrd"), chs("./rOrd"), "TX"); return result; } Quote Link to comment Share on other sites More sharing options...
ThomasPara Posted March 2, 2020 Share Posted March 2, 2020 You could "object merge" inn a null and use that as a reference. Simplest i can think of now. Quote Link to comment Share on other sites More sharing options...
anim Posted March 2, 2020 Share Posted March 2, 2020 5 hours ago, ino said: BUT is there really now easier way something like x = getmetransform("object", "position", "X"); now I'm not sure if you read through my post at all, but as I mentioned you can use origin() Hscript expression origin("", "../path/to/object", "TX") Quote Link to comment Share on other sites More sharing options...
ino Posted March 2, 2020 Author Share Posted March 2, 2020 thx again 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.