Specific rotation for particle instances

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
Old 11 November 2013   #1
Specific rotation for particle instances


I am in the process of creating a city with the particle instancer. Now I wish to wish each particle to be rotated either 0,90,180 or 270 degrees. How can I do that?
Thanks in advance for your help.
Old 11 November 2013   #2
Canīt be so hard right?
I type an expression for random rotation:
rotationPP = <<rand(0), rand(360), rand(0)>>;
and then I will have to tell it that if the rotation value is between 1 and 89, 91 and 179, 181 and 269 then lifespanPP = 0. Would that work?
I simply do not know how to write an expression for it. Can somebody help me with that?
Old 11 November 2013   #3
create an expression for rotationPP:

float $rand = rand(360);
if ($rand < 90)
    nParticleShape1.rotationPP = 0;
else if ($rand < 180)
    nParticleShape1.rotationPP = 90;
else if ($rand < 270)
    nParticleShape1.rotationPP = 180;
else if ($rand < 360)
    nParticleShape1.rotationPP = 270;

Obviosly, replace "nParticleShape1" with you particle object name. Should work
Old 11 November 2013   #4
Great! Thank you so much.
Old 11 November 2013   #5
this works too

create an float PP attribute (numChoose)


numChoose = int(rand(-.49,3.49));

if (numChoose == 0)
rotationPP = 0;
else if (numChoose == 1)
rotationPP = 90;
else if (numChoose ==2)
rotationPP = 180;
rotationPP = 270;
Old 11 November 2013   #6
Thread automatically closed

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.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright Đ2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 11:04 PM.

Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.