Elistan Posted March 30, 2021 Share Posted March 30, 2021 Hi, I'm trying to do a Sierpinski pyramid. So I quickly made a pyramid, copied this pyramid to it's 5 outers point. At this point I thought "why not make a loop", but here comes my first problem. I needed to select only the outer points, no matter how many iterations I put. So I've made an group range. But this group range has to be updated each iterations, because the "selecttotal1" will change depending on how many point is on the geo. I've made a quick code in an attribute wrangler to retreive this value, using the repeat_end's iterations. But now I can't find a way to use my variable as a parameter for my group range. Is there a way to output a variable in an attribute wrangler so I can use it on another node as a parameter ? If so can someone explain me ? (I'm not that good in code btw so I would be kind of you to explain what does a potential code work ) Quote Link to comment Share on other sites More sharing options...
underscoreus Posted March 31, 2021 Share Posted March 31, 2021 You could either store the output as an attribute and fetch the attribute in another node by either just writing "@attributename" in the parameter field or by using the point, prim or detail function in the parameter field depending on where you store the attribute. Quote Link to comment Share on other sites More sharing options...
Elistan Posted March 31, 2021 Author Share Posted March 31, 2021 1 hour ago, underscoreus said: You could either store the output as an attribute and fetch the attribute in another node by either just writing "@attributename" in the parameter field or by using the point, prim or detail function in the parameter field depending on where you store the attribute. Thanks ! But I can find out how to use attributes... As I said I'm not a beginner... What am I doing wrong ? How can I fix this ? Quote Link to comment Share on other sites More sharing options...
underscoreus Posted March 31, 2021 Share Posted March 31, 2021 17 minutes ago, Elistan said: Thanks ! But I can find out how to use attributes... As I said I'm not a beginner... What am I doing wrong ? How can I fix this ? It's a simple syntax issue. Whatever you put in front of the "@" symbol when assigning an attribute determines its datatype and I don't think there is a datatype abbreviated with the letter "p", at least not one I am familiar with. You have "f" for float, "i" for integers, "s" for strings, "v" for vectors, "m" for matrices etc. I haven't been able to find an overview of them all but I'm sure one is out there. These are the most commonly used ones. This video, and series, from Sidefx, explain more about the basics of using VEX in Houdini and talks about the assigning of attributes. Quote Link to comment Share on other sites More sharing options...
Elistan Posted March 31, 2021 Author Share Posted March 31, 2021 43 minutes ago, underscoreus said: It's a simple syntax issue. Whatever you put in front of the "@" symbol when assigning an attribute determines its datatype and I don't think there is a datatype abbreviated with the letter "p", at least not one I am familiar with. You have "f" for float, "i" for integers, "s" for strings, "v" for vectors, "m" for matrices etc. I haven't been able to find an overview of them all but I'm sure one is out there. These are the most commonly used ones. This video, and series, from Sidefx, explain more about the basics of using VEX in Houdini and talks about the assigning of attributes. I'm so sorry I have a last question... I finally made a code that work, but I have still the problem that when I plug my wrangle in my group range, when I put "@myAttribute", it say "Warning Local variable 'groupRangeFilter' not found." Even thought it's showing underneath on the point attribute ... Quote Link to comment Share on other sites More sharing options...
dleonhardt Posted March 31, 2021 Share Posted March 31, 2021 2 hours ago, underscoreus said: I don't think there is a datatype abbreviated with the letter "p", at least not one I am familiar with. Quaternions are abbreviated with "p". 1 Quote Link to comment Share on other sites More sharing options...
underscoreus Posted March 31, 2021 Share Posted March 31, 2021 1 hour ago, dleonhardt said: Quaternions are abbreviated with "p". The more you know! I rarely ever deal with quaternions because my mind breaks whenever I try to understand them so whenever possible I try to avoid actually dealing with them. 3 hours ago, Elistan said: I'm so sorry I have a last question... I finally made a code that work, but I have still the problem that when I plug my wrangle in my group range, when I put "@myAttribute", it say "Warning Local variable 'groupRangeFilter' not found." Even thought it's showing underneath on the point attribute ... I don't know for sure, but this might be an area where you'll have to look at the point function like I mentioned in my original comment to get the attribute value. Not all parameters like fetching point attributes by just using the "@attribname" method because this essentially means you are doing this for each point in your geometry and not all nodes/node parameters are made to work like that. In the point function, you end specifying a specific point to fetch the value from so this is often more stable than just "@attribname". Also do note that is the thing you are putting this expression into usually takes text, like a group field, you might need to add a ` to the beginning to make Houdini understand that it is an expression and not just normal text. 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.