How to get other particle attribute

   3642   8   0
User Avatar
Member
102 posts
Joined: March 2013
Offline
I tried to use “import Attribute” to get other particle's attribute. Give a integer number to the “point number” input then can get other point attribute.
But there is a problem, for particle the “Point number” is changed every frame. Can I specify the target particle base on a “ID” attribute, not on a Point Number?

If “Import Attribute”can't, any node can? ( just trying “Find att value by index”, but can't understand this node)
Or any idea can get other particle's attribute?

Hope some one can give me a idea, thank you!

iGou
User Avatar
Member
58 posts
Joined: Sept. 2009
Offline
I guess you are talking about VOPSOP. if you only have one particle system and you want your point index remain consistent in VOP, use ID attriubte.

Attachments:
importAttr.hipnc (60.8 KB)

User Avatar
Member
102 posts
Joined: March 2013
Offline
Hi Laiwayne, thank your reply.
yes I'm talking about VOP.
I'm wonder how to use ID to get other particle attributes. for example, when I give a integer “1” to Point number input, importAttribute will to find the particle which point number is “1” but I hope it is to find which ID is “1”, not number.

if you only have one particle system and you want your point index remain consistent in VOP, use ID attriubte.
sorry I can't understand well.
you mean I can hold point index even some particle die(just use ID)?
User Avatar
Member
58 posts
Joined: Sept. 2009
Offline
Check the file I posted, you can link ID to the point number input
User Avatar
Member
102 posts
Joined: March 2013
Offline
Hi Laiwayne, I checked your file. but it seen still to find point number not to find ID
I changed your setting LIFE to Cd, so can clearly to see the result.

as you can see in Console, the id:1 has a Cd {0.510}, but {0.510} is not id1's color, it's id'2's color,
because even I give a id value “1” Houdini will go to find which PT value is “1”…Orz

Attachments:
Noname.jpg (170.2 KB)
importattr_869_2.hipnc (69.0 KB)

User Avatar
Member
8833 posts
Joined: July 2007
Offline
I'm not sure if you tried Find Attribute By Value VOP, but if you are using H12.5, that is a way to go, especially if you are using it in SOP context
here is simple example

Attachments:
importattr_by_id.hipnc (74.7 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
102 posts
Joined: March 2013
Offline
Hi Tamte.
yes it is what's I need! thank you.

btw, can I ask a extra questions? I just got confuse that :
1. this way work in VOPSOP, but it seen don't worl in VOPPOP?
I tried to find parent's color but “Find Attr Value” always output “elemid:-1”???
in VOPSOP all is fine.

Attachments:
importattr_by_id_VOPPOP.hipnc (91.1 KB)
Noname.jpg (369.0 KB)

User Avatar
Member
8833 posts
Joined: July 2007
Offline
it doesn't work with POPs for the same reason as pointcloud lookups or other VEX functions that need to sample geometry from outside using op: syntax

there are ways to do that by using POPs in DOP context and therefore having access to geometry from previous frame you can sample with op: context either in pops directly from outside or in SOP solver which operates on the same geometry as POP solver

some posts that may be helpful
http://forums.odforce.net/index.php?/topic/8637-point-cloud-in-pop/#entry67421 [forums.odforce.net]
http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&p=124741#124741 [sidefx.com]
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
102 posts
Joined: March 2013
Offline
thanks! let me try it
  • Quick Links