PDA

View Full Version : particle instance scale


avillabon
10-20-2009, 12:22 AM
I have instanced some particles with 1 piece of geometry and given them random rotation but now i need an expression to give them random scale.

I tried the explanation on this other thread but no luck:
http://forums.cgsociety.org/showthread.php?f=86&t=809451&highlight=particle+instance

I created a new attr "scalePP" as vector and per particle. I right click and hit "creation expression", in the expression editor, under creation, i have this line of code:
particleShape1.rotPP = rand (0,360);

What should my next line of code be? Bare in mind i want the instanced geo to be the one affected by the random scale.. Perhaps im approaching this the wrong way? Any help would be greatly appreciated!!

Alex

stooch
10-20-2009, 12:32 AM
why do you have no luck? the thread you linked to has the correct answer... did you actually map the scale in the instancer node?

particleShape1.scalePP = <<rand(.5,1.5),rand(.5,1.5),rand(.5,1.5)>>;

this will make a vector.

particleShape1.scalePP = sphrand();

this too will make a vector.

<<width,height,depth>> is what the vector represents.

but neither one will do anything until you actually set the particle instance scale to "scalePP" (yes you have to create scalePP the same way you created the rotationPP)

to find it, you click on particle shape, then in general options, the dropdown for scale, change it from "none" to scalePP

I have instanced some particles with 1 piece of geometry and given them random rotation but now i need an expression to give them random scale.

I tried the explanation on this other thread but no luck:
http://forums.cgsociety.org/showthread.php?f=86&t=809451&highlight=particle+instance

I created a new attr "scalePP" as vector and per particle. I right click and hit "creation expression", in the expression editor, under creation, i have this line of code:
particleShape1.rotPP = rand (0,360);

What should my next line of code be? Bare in mind i want the instanced geo to be the one affected by the random scale.. Perhaps im approaching this the wrong way? Any help would be greatly appreciated!!

Alex

avillabon
10-20-2009, 03:55 PM
D'oh!

"the dropdown for scale, change it from "none" to scalePP" that was it... cant believe i forgot it.. thanks! :thumbsup:

Alex

CGTalk Moderation
10-20-2009, 03:55 PM
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.