Jump to content

accessing "instance" particle attribute


Jason

Recommended Posts

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

Link to comment
Share on other sites

***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 by Emanuele Berti
Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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 by johner
Link to comment
Share on other sites

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 by Emanuele Berti
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...