PDA

View Full Version : Sprite rendering/evaluation bug?


mans83
07-13-2009, 02:46 PM
I'm having problems with sprites.
When I render sprites with Hardware Rendering I don't get the same results as in my viewport.

It seems that the expressions I use in -Creation- "mode" are evaluated in -Runtime before Dynamics- "mode" while rendering.
This is what I have under Creation:

nParticleShape1.spriteScaleXPP = rand(.1,1);
nParticleShape1.spriteScaleYPP = nParticleShape1.spriteScaleXPP;

This should give the sprites a random scale at birth, but they get a random scale every frame


The same happens with twisting the particle.

I use nParticles and a spritesequence of 5 images.
I run Autodesk Maya 2009 Service Pack 1a x64 on XP.

I have attached the project file.

Any help greatly appreciated.

hhy060416
11-04-2009, 11:25 AM
I'm also having this problem ! anyone can help ?

rxgeez
11-04-2009, 08:37 PM
I haven't this problem yet...but a quick fix could be to seed your rand() function so each particle will always use the same random number each time....something like this:


seed(nParticleShape1.particleId);
nParticleShape1.spriteScaleXPP = rand(.1,1);
nParticleShape1.spriteScaleYPP = nParticleShape1.spriteScaleXPP;

hhy060416
11-08-2009, 08:48 AM
Sorry i'm late to reply !
but thanks rxgeez ! It works for me !

CGTalk Moderation
11-08-2009, 08:48 AM
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.