PDA

View Full Version : Particles - Instanced Starfield


mverta
12-20-2004, 05:28 AM
Hello -

I want to make a starfield by instancing simple planes to particles. I do not want to use sprites or raw particles for a few various reasons.

Making a sphere of particles is easy, and I am able to instance the planes to the particles.

What I need to do is have it so the planes are always facing the camera, like sprites do.

How do I do this? What expression do sprites use to accomplish it? I notice that with sprites, it doesn't matter which camera you're looking through, the sprites always face the right direction, so it's not like you have to set up a special constraint...

_Mike

mverta
12-26-2004, 06:08 PM
...anybody...?


_Mike

m.d.
12-26-2004, 08:39 PM
very easy....

make your plane so the side that you want to face toward the center is pointing down the +X axis, and it's sitting right at 0,0,0 ,make sure the rotation for the plane reads 0 at this point... if not ... modify: freeze transformations.so your plane is facing the positixe X axis and all it's attributes read 0 (scale should be 1) then on the PARTICLESHAPE node on the instancer tab set AimDirections dropdown menu to worldPosition. that way they will point at the origin.

if you want it to face a certain camera...i would make a vector attribute on the particle shape node called "cam" make it a per particle attribute (make sure it's a vector attr), then right a expression
particleShape1.cam = <<persp.translateX,persp.translateY,persp.translateZ>> (or whatever you call your camera)
copy it into both creation and runtime and then in your aim direction dropdown you should see your custom option "cam" and set it to that.
:thumbsup:

CGTalk Moderation
01-20-2006, 05:00 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.