Jump to content

Recommended Posts

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 )

Capture.JPG

Link to comment
Share on other sites

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 pointprim 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 ?

Capture.JPG

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 ...
 

Capture.JPG

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...