mattjakob Posted May 31, 2017 Share Posted May 31, 2017 uhm... Im trying to avoid using copy stamp as suggested in H16 and use a For Each loop instead... but I cant seem to make sense out of it! (I watched a few videos and checked the help - but they seem pretty useless / over-complicated). I simply want to copy some geometry (eg. circles) onto some points (eg. on a line) + each point has an attribute --> I scale each geometry based on the point attribute. Seems like a perfect iterative loop over points task! When I put my copy to point(s) node inside the for each loop everything works fine (the copy node only receives one point which is fed iteratively from the the for loop). HOWEVER when I apply the transform node and I use vex (@attribute_name) to try to access the attribute value associated to that point to scale my geometry it doesnt work (I get 0). If I try to access the same attribute using a wrangle node it works. Maybe Im doing something silly wrong with the transform node... but what I do seems intuitively right (type the vex attrib name in the scale Thanks! Quote Link to comment Share on other sites More sharing options...
rich_lord Posted May 31, 2017 Share Posted May 31, 2017 Hello. I assume you are just experimenting, but you do not need copy stamp or for each node for this task. If the points on the line have a pscale attribute on them, the copy to points node will automatically use that to determine the scale of the copy. As for the transform node not picking up geometry attributes, I've also had this problem. I'm not sure what the rule is as to when I can just reference attributes in channels and when I can't. When it doesn't work, you can always use a point expression to acess the attribute. I.e point("../foreach_begin1", 0, "scaler", 0) That will pull the point attribute scale off of point number 0 from the node foreach_begin1. I hope to see the regular @ notation working across all nodes soon! Quote Link to comment Share on other sites More sharing options...
mattjakob Posted May 31, 2017 Author Share Posted May 31, 2017 yup that works... but REAAALLY ??!!? I'd love to know why attribs (nor it's local var equivalent) don't work in the transform node... it's really frustrating Quote Link to comment Share on other sites More sharing options...
rich_lord Posted May 31, 2017 Share Posted May 31, 2017 (edited) I agree. I thought sidefx were in the process of getting vex attributes to work in all channels. The transform node would be a very useful place for them! Edited May 31, 2017 by rich_lord Quote Link to comment Share on other sites More sharing options...
Skybar Posted May 31, 2017 Share Posted May 31, 2017 For things like the Transform SOP - how would it know which value it should use? You could potentially transform some geometry with thousands of points, with each point having a unique attribute value. Simply using @myattribute should return exactly what, then? So yes, it won't work with point/primitive attributes - you'd have to use Point SOPs or Primitive SOPs in that case since those work on those individual levels. The Transform SOP works on the detail of the geometry - so what happens if we promote our attribute to detail then? Spoiler, it works just fine using @myattribute in the transform sop when the attribute is a detail attribute. 2 Quote Link to comment Share on other sites More sharing options...
rich_lord Posted May 31, 2017 Share Posted May 31, 2017 That makes sense! Even after using Houdini for a fair bit, stuff like this trips me up all the time. Quote Link to comment Share on other sites More sharing options...
noc2 Posted June 1, 2017 Share Posted June 1, 2017 (edited) Arrrghh, this thread couldn't be more right on. I was just about to post the very same question. Cheers; AJ Edited June 1, 2017 by noc2 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.