hopbin9 Posted February 7, 2012 Share Posted February 7, 2012 Hi, I'm using a POP network inside my SOP, and when I use Attribute POP to create a custom attribute named "G". I can't use $G outside the POP network. The Details View clearly shows that the G attribute exists and has data. I can use other particle attributes like $ID or $LIFE. I'm trying to use it in a Partition SOP set to Points type. So I'm trying to group points like this "group_`$G`" but it says variable not known. I'm not sure what I'm doing wrong? Quote Link to comment Share on other sites More sharing options...
Macha Posted February 7, 2012 Share Posted February 7, 2012 (edited) Try creating an attribute that you name G and then set to $G, just after the pop network. I know...it's weird... why do pops do that...some kind of data conversion thing maybe... don't even get me started on the life attribute... Edited February 7, 2012 by Macha Quote Link to comment Share on other sites More sharing options...
hopbin9 Posted February 7, 2012 Author Share Posted February 7, 2012 Try creating an attribute that you name G and then set to $G, just after the pop network. I know...it's weird... why do pops do that...some kind of data conversion thing maybe... don't even get me started on the life attribute... That totally worked! Thanks, that's going into my next tutorial. Quote Link to comment Share on other sites More sharing options...
SpencerL Posted February 8, 2012 Share Posted February 8, 2012 Try creating an attribute that you name G and then set to $G, just after the pop network. I know...it's weird... why do pops do that...some kind of data conversion thing maybe... don't even get me started on the life attribute... The reason putting $G does not work is because when you create an attribute, whether your in SOPs, POPs, etc it creates a local variable to that context. But that doesnt get passed to the other contexts. All the variable is, is a way to access the data in your attribute. $G isnt the attribute, its just a pointer to the attribute 'G'. You may notice there is a detail attribute called 'varmap'. This is the attribute which stores the variables. $ID, $LIFE, etc work because they are just standard in houdini even though, technically, they are local attributes. instead of putting $G in there, you can also just uncheck 'Write Values' and it will create a local variable which gets stored in 'varmap' detail attribute. Quote Link to comment Share on other sites More sharing options...
Fabiano Berlim Posted February 8, 2012 Share Posted February 8, 2012 You can actually go even further. When you middle click in a node you will see all the variables you have, they are written like this: mass -> MASS If you put down a attribute create and set it to: Name - varmap Class - Detail Type - String You can now create any custom attribute variable typing in the String parameter, for example: mass -> MASS or mass -> YOUR_OWN_CLEVER_VARIABLE Quote Link to comment Share on other sites More sharing options...
gaurav Posted February 8, 2012 Share Posted February 8, 2012 (edited) If you put down a attribute create and set it to: Name - varmap Class - Detail Type - String You can now create any custom attribute variable typing in the String parameter, for example: mass -> MASS or mass -> YOUR_OWN_CLEVER_VARIABLE That's a very neat tip fabiano. Any ideas on how can we have mapping for multiple attributes of different classes in one go. Just, so that we don't have to put 10 attrib creates for 10 different attributes ? Thanks, Edited February 8, 2012 by vectorblur Quote Link to comment Share on other sites More sharing options...
hopbin9 Posted February 8, 2012 Author Share Posted February 8, 2012 wow guys, i just learn a ton of stuff. thanks 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.