Re: Is it Possible to Animate The End Key of a Particle Age FCurve During a Sim?

Date : Thu, 26 Apr 2007 15:34:30 +0100
To : XSI(at)Softimage.COM
From : Julian Johnson <julian(at)exch.demon.co.uk>
Subject : Re: Is it Possible to Animate The End Key of a Particle Age FCurve During a Sim?
Vince Fortin wrote:
Hi Julian, here's how I'd do it:

1) Create a new float User Parameter on your PType and call it "/alphaLimit/".

2) Create a pEvent called "BIRTH" (Particle Age % 0, Per Trigger Particle, Jscript)

// Just point to an up-level parameter if you want to animate this value over time.
inParticle.Attributes("alphaLimit").Value = 100;


3) Create a pEvent called "RUNTIME" (Every 1 Frame, Per Particle, Jscript)

var alpha;
var age = inParticle.age;
var alphaLimit = inParticle.Attributes("alphaLimit").Value;
var color = inParticle.color;
// This is the simpliest way to script it, although it's a ll linear.
alpha = 1 - (age / alphaLimit);
color.alpha = alpha;
inParticle.color = color;

Is that what you're looking for?
Hi Vince,

Thanks very much for the help and the sample scene. Your scene works perfectly here and it's really clear how to set it up :-). It seems like a really elegant solution...

In my own scene, I guess I'm screwing something up because although I've input the relevant parameter and events into the PType, I'm currently getting an error: #ERROR : Object required - [line 12]. I just need to dig around for some obvious syntax/transposition error I've made.

Thanks for the pointers, again. Very much appreciated.
Julian


========================================

This e-mail (and any attachments) is confidential and may contain personal views which are not the views of Men-from-Mars unless specifically stated.

If you have received it in error, please delete it from your system. Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi



Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.