View Full Version : Particle instanced geo: Unique id for each object

10 October 2009, 11:56 AM

I've got an particle instance of objects, and i'm trying shade them differntly (renderman for maya).

The problem is, no particle data is transfered to the geo instance, and each geo instance doesnt have a unique id passed to the rib.

I've read somewhere that every object in maya has a unique ID, how do i access this? If i could get a random number for each object, i could use that to adjust shader values.



11 November 2009, 06:26 AM
Particles have their own unique ID which can be queried using
getParticleAttr -at particleId[$x];

11 November 2009, 12:51 PM
Cheers for the reply.

I'm instancing geo onto particles using the instancer. The particle ID isn't passed to the instanced object, so this isnt much use unfortunately.

Ive got a hack work around, but I was wondering if anyone had worked out a way of accessing either a unique object ID per instanced geo, or passing the particle ID to the object.

11 November 2009, 06:19 PM
Have a look in the command help for instancer or particle instancer, you may be able to query some sort of object index. There looks like an instance ID there but I think it may be object scope only not per particle.

CGTalk Moderation
11 November 2009, 06:19 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.