nParticle Randomize Initial Rotation

nParticle Randomize Initial Rotation

ms8129
Explorer Explorer
752 Views
3 Replies
Message 1 of 4

nParticle Randomize Initial Rotation

ms8129
Explorer
Explorer

I have instanced nParticle geometry that I want to give an initial rotation to. I do not want to rotate the instanced geometry each frame, but rather just on the initial frame.

 

I have tried many different solutions already online, but none of worked so far. Is there a way to use rotatePP to rotate the particles on just the initial frame.

 

At the moment I have been using this code:

"sampleShape.myRotation = <<rand(0,360),rand(0,360),rand(0,360)>>;"

but it changes the rotation each frame, rather than just on the initial frame.

0 Likes
753 Views
3 Replies
Replies (3)
Message 2 of 4

sepu6
Advisor
Advisor

I do not remember if you can do it with nparticles, but I'm pretty sure you can. But I would highly recommend doing all your FX sim in the Bifrost graph instead of the old particles system, it is pretty straightforward there and is all procedural which is a big plus + much better solvers 

Message 3 of 4

mspeer
Consultant
Consultant

Hi!

 

I am not sure why you have a custom attribute myRotation or if you maybe try to rotate the instanced object instead of the particles.

Please make sure to add a "rotationPP" attribute to the nParticleShape and then create a Creation Expression instead of a Runtime Expression, this will work.

Example for a Creation Expression for a default nParticle object and attribute "rotationPP":

 

nParticleShape1.rotationPP = <<rand(0,360),rand(0,360),rand(0,360)>>;

 

 

0 Likes
Message 4 of 4

ms8129
Explorer
Explorer

I had initially tried using the rotationPP attribute to my nParticleShape with a similar creation expression, but it was not rotating the particles. It did not seem to be impacting the scene at all.

0 Likes