Jump to content

creating particle attributes


Recommended Posts

Hi, I've been trying to create attributes inside a pop network but I can't seem to be able to access their values. In sop's I would create an attribute and access with the $MYVAL syntax, but inside pops it just doesn't recognise that I have created this attribute. Instead I've been referencing the channel which isn't a nice way of doing it.

Cheers

Link to comment
Share on other sites

Hi, I've been trying to create attributes inside a pop network but I can't seem to be able to access their values. In sop's I would create an attribute and access with the $MYVAL syntax, but inside pops it just doesn't recognise that I have created this attribute. Instead I've been referencing the channel which isn't a nice way of doing it.

Cheers

If you create an attribute in POPs, it creates a local variable which can be only used in that context, ie POPs, but if you look at your particles in SOPs, you will notice the attribute does exist on the points/particles. You have to re-create the variable map in SOPs in order for it to work in the Geometry context. To do this, just lay down an attribCreate SOP and set the attribute name to the name of the attribute want to create the variable for...In your case it looks like you need it to be "myval". Turn the "Write Values" toggle off.

Link to comment
Share on other sites

If you create an attribute in POPs, it creates a local variable which can be only used in that context, ie POPs, but if you look at your particles in SOPs, you will notice the attribute does exist on the points/particles. You have to re-create the variable map in SOPs in order for it to work in the Geometry context. To do this, just lay down an attribCreate SOP and set the attribute name to the name of the attribute want to create the variable for...In your case it looks like you need it to be "myval". Turn the "Write Values" toggle off.

Thanks SpencerL,

I should be a little bit more clear, I want to create and access attribute within POPs. So to create the attribute in POPs then later in POPs be able to access them. I assumed the convention of accessing them by using the name of the attribute in capitals preceded with a '$' would exist inside POPs as it does in SOPs. But unless I'm doing something wrong its just not working for me.

Sorry if you have already explained this.

Thanks,

Link to comment
Share on other sites

Guest Swann
Thanks SpencerL,

I should be a little bit more clear, I want to create and access attribute within POPs. So to create the attribute in POPs then later in POPs be able to access them. I assumed the convention of accessing them by using the name of the attribute in capitals preceded with a '$' would exist inside POPs as it does in SOPs. But unless I'm doing something wrong its just not working for me.

Sorry if you have already explained this.

Thanks,

Better use to usinig expressions like point(), prim(), vertex(). If you create local variable with attribute it will be ONLY accesible with "$" down the road, so if you want to use it in other branch, that is not connected in any way with your attribute, you will have to use some of this expressions to get it to work.

PS. Well, you can also go to Aliases and Variables in Edit menu and add it as global variable but it won't work to good when you will make HDA with Global Variable .

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