Feedback

What's your question?

By: Asked

How do I set per-particle field and emitter arttributes on nodes in namespaces in Maya?

Greetings - I'm wondering if it is possible to use particle systems with namespaces. THe problem arises when using PP attributes that supply data to specific dynamic nodes...

Without namespacing everything works fine - We can specify a PP attribute to supply values to an associated emitter or field, as explained in the docs :
- User Guide > Dynamics and Effects > Dynamics > Fields > Work with fields > Work with per-particle field attributes
- User Guide > Dynamics and Effects > Dynamics > Particles > Work with emitters > Vary emission from different points of point emitters

These techniques require that the PP attr name is formed from a maya emitter/field node name. SHould we wish to change the name of said field/emitter we can do so, also making sure to change the relevant 'nameFieldPP' attr on our particle shape [1]

Finally, the problem: When using namespaces, our field/emitter name will be of the format "namespace:field" - It is not possible to name an attribute like that, so namespaced nodes become inacessible to these techniques :-(

(Furthermore, the fact that the add attibutes window fails when using a namespaced particleshape node indicates that the namespace/particle relationship has not even been considered by the developers. -sigh!- )

Am I missing something obvious here? If its an issue, can anyone suggest a workround?

cheers!
ciaran


[1] - We have to workround even this, as renameAttr doesnt work for particle Attrs.: Create a newly named attrPP, connect it, and delete the old one,

Add comment viewed 552 times Latest activity 10 months ago

or Cancel

1 answer

  • 0

julian [ Admin ]

It looks to me like the namespace part of the name is ignored. There is a connection from the particles (ppFieldData) which is probably used to resolve the correct node. Here's the process I just tried:

Make a particle system and apply a radial field (rad1) and set a PP float attribute called rad1_mag to be 1 or 0.

float $pid = particleId;
rad1_mag = ($pid%2 == 0);

Check it works - half the particles get forced sideways. Save the scene, make a new scene and import with namespace. Now there is:

  • foo:particleShape1
  • foo:rad1

Everything still works

Apply a gravityField (called rad1 - out of laziness) to foo:particleShape1

Now the same particles that are forced sideways also fall downwards.

Make another particle system with a an attribute rad1_mag and apply the same expression as above. Move the emitter over the other side of the radial field so you can see what's going on.

Connect the gravity and radial field. Now you have:

  • foo:particleShape1
  • foo:rad1
  • particleShape1
  • rad1

Both particle systems have half the particles affected by both the fields.

-- That PP system seems to go against what Autodesk recommend to developers. They say make sure all data is passed through connections, and then they break their own rules. I guess there is a connection there (ppFieldData), but the fact that changing a node name can break the scene seems to be a violation of the idea.

BTW - I'm using maya 2011 mac

or Cancel