Jump to content

How to use all the attributes created via multiple AttribCreate OP?


magneto

Recommended Posts

Hi,

I am creating several attributes and connecting each other one after the other but at the end when I connect it to my Point OP, I can't access all the attributes that I created. Do these OPs not append another attribute after the previous OPs?

I assume that's the case. If so, how can I merge all of them so I can use them in my Point OP?

Thanks.

Link to comment
Share on other sites

I've often found confusion with vecotrs as there are 2 kinds, so be sure you are appending the correct component type ie. $ATTRX, or $ATTR0, or $ATTR1. You can always pop open a details menu to see the explicit atribute names.

$ATTR0 is the first component of a 3 float attribute, but $ATTRX is the first component of a Vector.

Edited by ehsan parizi
Link to comment
Share on other sites

I am creating several attributes and connecting each other one after the other but at the end when I connect it to my Point OP, I can't access all the attributes that I created. Do these OPs not append another attribute after the previous OPs?

I assume that's the case. If so, how can I merge all of them so I can use them in my Point OP?

There are two things to do in these cases, which will allow you to at least know if your attributes are being created the way you expected them to be.

First, on any node in the network click the middle mouse button. A popup window with a black background will appear, and in this window is will list of custom attributes that have been created (and other details). Attributes will be shown in the SOP, POP, DOP and CHOP networks. So it's important to learn what everything in this window means. At first, it'll seem like all Greek.

Second, there is a window in Houdini called "Details View" which lists all the attributes for the currently selected node. This window shows details for all the different networks, and is very handy. To open the window click the "+" plus icon between the tabs in a window panel. "Details View" is listed as a possible panel type. When the window is open you can change which type of attributes to view from buttons on the upper/right of the window.

Using these tools, click each node in your network and see if the attributes are being created the way you expected them to be. If you middle click the Point SOP you should see the attributes previously created by the CreateAttribute SOPs.

Link to comment
Share on other sites

Thanks guys, it works now. I didn't realize the "name" (attibute1) of the attributes were all the same. I thought I only needed to change the "local name".

There are two things to do in these cases, which will allow you to at least know if your attributes are being created the way you expected them to be.

First, on any node in the network click the middle mouse button. A popup window with a black background will appear, and in this window is will list of custom attributes that have been created (and other details). Attributes will be shown in the SOP, POP, DOP and CHOP networks. So it's important to learn what everything in this window means. At first, it'll seem like all Greek.

Second, there is a window in Houdini called "Details View" which lists all the attributes for the currently selected node. This window shows details for all the different networks, and is very handy. To open the window click the "+" plus icon between the tabs in a window panel. "Details View" is listed as a possible panel type. When the window is open you can change which type of attributes to view from buttons on the upper/right of the window.

Using these tools, click each node in your network and see if the attributes are being created the way you expected them to be. If you middle click the Point SOP you should see the attributes previously created by the CreateAttribute SOPs.

Thanks I was using the middle click but not when this was happening I think. After the issue is fixed though, even though I added 3 attribs, it showed another one listed with something called like "varmap". Do you know what this is?

Is the Details View the same thing as right clicking an OP and clicking "Spreadsheet"?

Thanks again guys :)

Link to comment
Share on other sites

$ATTR0 is the first component of a 3 float attribute, but $ATTRX is the first component of a Vector.

Ok esshan, and what is the differnece beween 3 floats and a vector?

(edit)

also, there are special cases, i forget exactly off hand where; but there are times when $ATTR1 is actually the first component in a 3 float. sometimes 1, sometimes 0, sometimes X. That was the point i was making.

Edited by 3dbeing
Link to comment
Share on other sites

Ok esshan, and what is the differnece beween 3 floats and a vector?

(edit)

also, there are special cases, i forget exactly off hand where; but there are times when $ATTR1 is actually the first component in a 3 float. sometimes 1, sometimes 0, sometimes X. That was the point i was making.

Symek told me that floats are faster than vectors so I assume floats are arrays, and vectors are structs.

Link to comment
Share on other sites

Symek told me that floats are faster than vectors so I assume floats are arrays, and vectors are structs.

I fail to see any fundemental difference, yes data type is different but why should a construct be slower than an array? If this is true, and I'm not saying it's not; then why ever use a vector? Perhaps this why vops default output is 3 floats rather than a vector?

Link to comment
Share on other sites

I fail to see any fundemental difference, yes data type is different but why should a construct be slower than an array? If this is true, and I'm not saying it's not; then why ever use a vector? Perhaps this why vops default output is 3 floats rather than a vector?

I think vector would be useful if you want to do transformations using the built in methods, matrices as Symek mentioned. I don't know about vops much yet, but if it's SIMD, arrays should provide better performance.

I am not an expert on optimizations but arrays are pretty light-weight in general, compared to other complex data types like structs, classes, etc.

Edited by magneto
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...