Community
Maya Dynamics
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya dynamics topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Referenced particle expression issues

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
1533 Views, 4 Replies

Referenced particle expression issues

We have encountered an issue when attempting to reference Maya scenes that have per particle expressions.

 

The problem is when the scene is referenced Maya performs a replacement on the expression to append the namespace to imported objects. This used to work fine in 2012 but does not in future releases (2013, 2013.5 2014). It now breaks the expression by appending the namespace where it shouldn’t be.

 

The steps to reproduce this are fairly simple:

1.  create a particle emitter

2.  assign a gravityField to the particle system (or any field)

3.  Add a per particle attribute to particle system with a long name of the field name with an underscore separating the field name and it’s attribute. (e.g. gravityField1_magnitude)

4.  Add a creation expression on the particle system attribute like(e.g. gravityField1_magnitude = rand(-9, 9); )

5.  Save the file

6.  Create a new file and load file saved previously as a deferred reference and change the namespace string (e.g. fx_particles)

7.  When the reference is loaded it alters the existing expression and it no longer evaluates properly. (e.g. fx_particles:particleShape1.:fx_particles:gravityField1_magnitude = rand(-9,9); )

 

Please advise.

 

4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: Anonymous

I think I have this problem too, I use the expression particleShape1.random_rotation=<<rand(45),rand(360),rand(45)>>; set for some new vector attribute random_rotation. I use this particle to instance on my polygon cylinder. Initially it appeared under World Velocity attribute instead of Random Rotation or random_rotation... Weird... Even weirder, my animation works fine from frame 0 to 240 in playback or playblast. However, between frame 80 and 81 it reinitializes all particles when in batch render. Render the current frame (81) works perfectly, with all particles in the position of 80 as meant to... Now my only option seems to manually render all frames between 81 and 240, so that is NOT an option, ARGH! Man Frustrated

 

Can someone please help me fix this, is there an expression to freeze all particles from frame 7 onward (now my emitter rate is set to zero in that frame and all following)?

 

Or what is wrong with the batch renderer, it is not dependent on render 'engine'..

Tags (3)
Message 3 of 5
keyner.chavarria
in reply to: Anonymous

Hi  license,

 

This is a namespace function problem, don't use "_" in attribute name and it will work.

 

Thank you.

Keyner Chavarria
Autodesk Maya Specialist
Message 4 of 5

Hi Kenyer Chavarria,

 

Unfortunately that does not fix the core issue. We need to use that exact per-particle attribute name with the underscore because it's required in order to be able to manipulate field attributes on a per-particle level. The Maya documentation covers this in the section "Work with per-particle field attributes"

 

For example, we have a gravityfield with a magnitude of 9.8 So all particles are then affected with a value of 9.8 In order to get it so each particle has a random magnitude on a per particle basis we have to add a per-particle attribute use the naming context of gravityfield_magnitude (exact name and attribute) and using gravityfieldmagnitude will not work. There appears to be no other way (as far as I'm aware) of driving field attributes on a per particle basis.

 

This was working in Maya 2012 but stopped working since we upgraded to Maya 2013 (and beyond)

 

Thank you for your time in this matter.

 

James Deschenes

Lead Technical Director

Arc Productions

Message 5 of 5
tony.su
in reply to: JamesDeschenes

This issue fixed in Maya 2016 already.



Tony Su
Product Support

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report