View Single Post
# 3 31-03-2011 , 10:55 AM
LauriePriest's Avatar
Moderator
Join Date: May 2003
Location: London
Posts: 1,001
You can always emit from the camera frustum so particles arn't born too far ahead where you won't seem them, there are a few scripts around that do that. Though something simpler may be better as this will only work if the particles dont re-appear.

Yyou could have the source a reasonable distance from the camera that moves with the camera and put your kill box behind the camera.

Arn't you getting popping as they are culled when close to the camera?

You would need something like this (ignoring terriple syntax):
float $cameraWorld[] = (`xform -q -ws -rp "pSphere1"`); (this just ensures you get the actual position rather than the channel information which is useless if you have frozen transforms at any poin)
vector $cameraPos = <<$cameraWorld[0], $cameraWorld[1], $cameraWorld[2]>>;
float $displacement = mag(position - $cameraPos);
float $fade = linstep(0, 100 , $displacement); ( 0 - 100 can be set to whatever your range is)
$opacityPP =$opacityPP * $fade;

You could always not bother with the fade and use a ramp driven by $displacement instead with a range thats 0 - fade distance. then mult that with opacityPP seperately for more intuative control.


FX supervisor - double negative