PDA

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


ndeboar
10-30-2009, 11:56 AM
Hey,

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.

Cheers!

Nick

Aikiman
11-02-2009, 05:26 AM
Particles have their own unique ID which can be queried using
getParticleAttr -at particleId particleShape1.pt[$x];

ndeboar
11-02-2009, 11:51 AM
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.

Aikiman
11-02-2009, 05: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-02-2009, 05: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.