Jason Posted November 8, 2009 Share Posted November 8, 2009 Hello all, I'm blanking, or something... I have assigned random instances to particles using the Instance POP. Now in another POP I want to get at the instance name, except I cannot find a way to do it. There is no string version of poppoint() and there doesn't seem to be $INSTANCE local variable available either. Can anyone help me here? I cannot find a way to do it. Quote Link to comment Share on other sites More sharing options...
Marc Posted November 8, 2009 Share Posted November 8, 2009 VOPs maybe? Quote Link to comment Share on other sites More sharing options...
Emanuele Berti Posted November 8, 2009 Share Posted November 8, 2009 (edited) ***EDIT** Wrong attachment!!! Hi Jason, Did you try to use the same way you have used to assign intances randomly, to store that value and reuse it later? Maybe it's not the more efficient way, I did a quick test that you can see in the attachment where if the instance is a sphere the second POP emits particles, otherwise if it's a box it doesn't. Emanuele test_instances.hipnc Edited November 9, 2009 by Emanuele Berti Quote Link to comment Share on other sites More sharing options...
Jason Posted November 8, 2009 Author Share Posted November 8, 2009 Hi Jason, Did you try to use the same way you have used to assign intances randomly, to store that value and reuse it later? Maybe it's not the more efficient way, I did a quick test that you can see in the attachment where if the instance is a sphere the second POP emits particles, otherwise if it's a box it doesn't. Emanuele Hey there -- I was doing a similar thing to what you're doing, yes. I see you're having the same issue as I was with your Attribute POP there. There is no "string" type attribute in that POP, meaning your $INSTANCE is not working as you'd prefer. Darn! Quote Link to comment Share on other sites More sharing options...
johner Posted November 8, 2009 Share Posted November 8, 2009 (edited) Hey there -- I was doing a similar thing to what you're doing, yes. I see you're having the same issue as I was with your Attribute POP there. There is no "string" type attribute in that POP, meaning your $INSTANCE is not working as you'd prefer. Darn! If I'm not misunderstanding what you need to do, did you try using VOPs as Marc suggested and just having a string input parameter named "instance"? You could use that to translate the string into an integer code or something, or just do the processing in VOPs itself. Attached just turns two different instance values into different colors. test_instances_vops.hipnc Edited November 8, 2009 by johner Quote Link to comment Share on other sites More sharing options...
Emanuele Berti Posted November 8, 2009 Share Posted November 8, 2009 (edited) Hey there -- I was doing a similar thing to what you're doing, yes. I see you're having the same issue as I was with your Attribute POP there. There is no "string" type attribute in that POP, meaning your $INSTANCE is not working as you'd prefer. Darn! Jason, I uploaded the wrong file with some other ways I was testing... sorry about that. This is the right one, where spheres emit spheres, boxes emit boxes and teapots amit teapots, but as you can see, you can just inherit the $INSTANCE value without be able to change it. Johner, maybe your way it isn't procedural enough but it looks great even if I can't figure out how to manipulate the strings in VOP easily. Cheers, Emanuele test_instances.hipnc Edited November 8, 2009 by Emanuele Berti Quote Link to comment Share on other sites More sharing options...
Emanuele Berti Posted November 8, 2009 Share Posted November 8, 2009 I was thinking, maybe it would be enough to insert an AttribCreate SOP between the two popnet SOP... ... It's really bad that the AttribCreate POP is different from the same node in SOP. Jason can I ask you what you want to achieve? 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.