Jump to content

How can I see attributes from a Measure SOP?


Recommended Posts

Sometimes I still run into the issue of viewing the value of attributes. I am calculating the value using the Measure SOP. The attribute is clearly there (volume[1]), but the Details View doesn't see it. It's not even listed in its menu for me to pick.

Is this normal? Do I have to create an attribute that points to this attribute to see its value?

I tried this but now I am stuck with how to access it. I tried "$volume0", "$volume1", "$VOLUME", "$volume[1]", "$volume[0]" but no luck.

Any ideas?

Thanks.

Link to comment
Share on other sites

Do you have primitives? Are the values absent or 0? Is your geometry triangulated? The attribute makes sense? (not a grid or a particle system for example).

$VOLUME should work in places that accept primitive attributes.

Edited by Macha
Link to comment
Share on other sites

Yes I know it's a prim attribute which is what I set in AttribCreate OP but it says "Undefined variable" as an error.

Also no I didn't change it to volume because when I middle click on the Measure SOP, it says: 1 prim attribute: volume[1]. I thought "area" field is grayed out, since I didn't override the name.

As for prims, yes I have them, I use it on a box.

Also in case of Grids, etc, it should still create the attribute though, right?

Thanks guys :)

Link to comment
Share on other sites

Also no I didn't change it to volume because when I middle click on the Measure SOP, it says: 1 prim attribute: volume[1]. I thought "area" field is grayed out, since I didn't override the name.

Ahh yes i unwittingly checked override, or half-wittingly... wtcmb

in any event yes it seems that the variable mappings are not being created middle mouse on the measure node and you will not see anything that says volume->VOLUME. So just append an attribute sop set to prim and call it volume and uncheck write values, this will create the neccessary mappings. Sorry for the confussion.

  • Like 1
Link to comment
Share on other sites

Thanks man, I didn't know I had to see "volume -> VOLUME", thought if I only see "volume", it would mean that I wouldn't be able to use the all caps variable.

So I did all the steps, and when I middle click to AttribCreate, it now shows "volume -> VOLUME" but when I select it, I still can't see that attribute in the Details View, nor I was able to show it overlayed in the viewport using the Display Options dialog.

This attribute stuff is confusing :(

Link to comment
Share on other sites

I still can't see that attribute in the Details View, nor I was able to show it overlayed in the viewport using the Display Options dialog.

At the top of the details window there are some icons, one looks like a diamond with a bright yellow square, this is your primitive attributes. Click that. if you are using a custom attr in display options you have to change that attr type to a primitive attr.

It just takes a bit of getting used to that's all, once you've got it you've got it... just give yourself some time...

  • Like 1
Link to comment
Share on other sites

Thanks man, I didn't know I had to see "volume -> VOLUME", thought if I only see "volume", it would mean that I wouldn't be able to use the all caps variable.

So I did all the steps, and when I middle click to AttribCreate, it now shows "volume -> VOLUME" but when I select it, I still can't see that attribute in the Details View, nor I was able to show it overlayed in the viewport using the Display Options dialog.

This attribute stuff is confusing :(

I have a feeling that you forgot to turn on the correct class type in edit option.

It works as expected.

Cheers,

post-6162-132582558187_thumb.jpg

Link to comment
Share on other sites

Thanks guys, it was the diamond icon like 3dbeing said.

As for the viewport display, I found the difference from your screenshot vectorblur. Mine was using VOLUME, but I thought after creating a new attribute with "volume" using the AttribCreate, ensures I have VOLUME. It only shows up when I use volume. It's fine though, I just don't know why VOLUME doesn't work.

Also I jsut checked on the box but it seems to sum all the prims in the box which are planes, but I need the volume for the box as a whole, like Sphere with Mesh type allows. Box doesn't seem to have an option to have a single prim, does it?

Cheers.

Link to comment
Share on other sites

attribute promote

from -> prim

to -> detail

promotion method -> sum

but now your atribute is a detail attribute, if you want that number on each prim you will have to attribute promote it again.. or use the detail() hscript expression or get attribute vop

Link to comment
Share on other sites

after creating a new attribute with "volume" using the AttribCreate, ensures I have VOLUME. It only shows up when I use volume. It's fine though, I just don't know why VOLUME doesn't work.

Looks like your are mixing the idea of attributes and variables here . What exist on geometry is attribute and there is a variable to access that though not all variables are attributes which exist on geometry and are seen in details view. Like $BBX , $GCX

you just forced variable mapping with attribCreate and created volume ->VOLUME but the attribute is still called volume. But accessible now with $VOLUME

so to display that we need to supply it the right name. Check the details view it did not change to uppercase "VOLUME".

but I need the volume for the box as a whole, like Sphere with Mesh type allows. Box doesn't seem to have an option to have a single prim, does it?

I dont think so but one could sum up all the prims to get the voulme of the entire box.

Cheers,

post-6162-132583409274_thumb.jpg

post-6162-132583430362_thumb.jpg

Link to comment
Share on other sites

Thanks 3dbeing, that's very cool. I thought the volumes were being calculated using the planar planes the primitives are in my box. But if they are using cones drawn from the prims to the pivot of the object, then it should work in my case.

Thanks vectorblue, I see what you mean. I thought whenever you have an attribute, Houdini automatically creates an uppercase variable for it.

Cheers :D

EDIT: Also I thought I could show the detail type value in the viewport as well, but looks like that type isn't supported. It's ok though I am using the Details View anyway.

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