Neon Junkyard Posted March 25, 2019 Share Posted March 25, 2019 (edited) Is there a way to transfer -all- point & prim attributes in VEX like you can with attribute transfer (or ray), which is old and slow and non-compilable, looking for a modern VEX solution Normally I would just use intersect or pcopen or whatever for single attributes but I want to be able to transfer ALL incoming attributes (or have a typed list that can utilize wildcards) without having to manually specify them, so it can account for any incoming attributes upstream thanks Edited March 26, 2019 by Neon Junkyard Quote Link to comment Share on other sites More sharing options...
toadstorm Posted March 26, 2019 Share Posted March 26, 2019 You can use the `pointattributes`, `primattributes` and `vertexattributes` intrinsics to get VEX arrays of attribute names. Quote Link to comment Share on other sites More sharing options...
Neon Junkyard Posted March 28, 2019 Author Share Posted March 28, 2019 awesome, I will check that out. starting to use intrinsics more and more Quote Link to comment Share on other sites More sharing options...
anim Posted March 28, 2019 Share Posted March 28, 2019 (edited) I'd not do it in VEX, it can get tedious as you will have to check for attribute size, attribute type info attribute type, etc. Also it would probably not be the fastest for minimum amout of work and maximum efficiency, you can do one of the following for example 1. if it's a single value - create i@sourcept, i@sourceprim, ... attribute on the original geo (from its @ptnum, @primnum, ...) - create i@sourcept, i@sourceprim, ... on the other geo based on which one you want to copy from - after VEX use Attribute Copy to copy all needed attributes from original geo based on that attrib 2. to interpolate values - on the other geo create i[]@sourcepts f[]@sourceweights storing array of point numbers and weights you want to interpolate from and use Attribute Interpolate SOP (point numbers and weights) to transfer all the attributes you want similar for prims and vertices Edited March 28, 2019 by anim 4 Quote Link to comment Share on other sites More sharing options...
Neon Junkyard Posted March 28, 2019 Author Share Posted March 28, 2019 Ah thanks Tomas, those are great solutions! Yea the vex route Im realizing is more trouble than its worth, currently for most cases that dont require interpolated values im using the ray sop (that is now compilable) set to mindist with transform points unchecked and import attributes from hits. Doesnt account for your second solution though so thank you for that I know as soon as I spend any sort of time making some custom attribute transfer sop that handles all edge case scenarios sidefx will release a new version of it, happens every time 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.