RE: Particle C++ operator

Date : Fri, 31 Mar 2006 09:47:25 -0500
To : <XSI(at)Softimage.COM>
From : "Mathieu Leclaire" <mleclair(at)hybride.com>
Subject : RE: Particle C++ operator
Yes I did... and it still lives a frame too many since it is being called on
the frame it's supposed to disappear but waits for the next frame evaluation
to actually get removed... I just put the Size to 0, that way it's not
visible for that frame and then disappears on the next one. It's not the
most elegant way to do it but it works.

-----Original Message-----
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM]On Behalf Of
francois.painchaud(at)sympatico.ca
Sent: Thursday, March 30, 2006 8:37 PM
To: XSI(at)Softimage.COM
Subject: RE: Particle C++ operator

Salut Mathieu,

Have you tried to set the particle age limit to ( age - 1 ) ?

François

> De: "Mathieu Leclaire" <mleclair(at)hybride.com>
> Date: 2006/03/30 jeu. PM 02:50:26 GMT-05:00
> À: <XSI(at)Softimage.COM>
> Objet: RE: Particle C++ operator
>
> I found a solution... it's not the most elegant but it works... I just
copy
> the particle age in its age limit. That makes it live one frame too much
but
> if I also put its size to 0, it works fine:
>
> var VBppositions = new VBArray( inParticleCloud.Particles.PositionArray);
> var ppositions = VBppositions.toArray();
>
> for (var i=0; i<ppositions.length; i+=3){
>    if (ppositions[i+1] < 0) {
>       inParticleCloud.Particles(i/3).AgeLimit =
inParticleCloud.Particles(i/3).Age;
>       inParticleCloud.Particles(i/3).Size = 0;
>    }
> }
>
> -----Original Message-----
> From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM]On Behalf Of
kim aldis
> Sent: Thursday, March 30, 2006 1:21 PM
> To: XSI(at)Softimage.COM
> Subject: RE: Particle C++ operator
>
> I couldn't be sure about deleting particles but creating them doesn't work
> so there's a pretty goocd chance that killing them won't either.
>
> Particle SDK is a mess.
>
> > -----Original Message-----
> > From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf
Of Mathieu Leclaire
> > Sent: 30-March-2006 18:39
> > To: XSI(at)Softimage.COM
> > Subject: RE: Particle C++ operator
> >
> > OK... finally I decided to try the particle scripted event.
> > I've tried this simple script in the event but when I call
> > inParticleCloud.RemoveParticles(killedArray); it does
> > nothing. Here's the script:
> >
> > var VBppositions = new VBArray(inParticleCloud.Particles.PositionArray);
> > var ppositions = VBppositions.toArray();
> >
> > var killedArray = new Array();
> > for (var i=0; i<ppositions.length; i+=3){
> >    if (ppositions[i+1] < 0) killedArray.push(i/3); }
> > LogMessage(killedArray); inParticleCloud.RemoveParticles(killedArray);
> >
> > How do I remove unwanted particles? What Am I doing wrong?
> >
> > Mathieu Leclaire
> > R&D Programmer
> > Hybride Technologies
> >
> > -----Original Message-----
> > From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM]On Behalf
Of Mathieu Leclaire
> > Sent: Wednesday, March 29, 2006 9:40 AM
> > To: XSI(at)Softimage.COM
> > Subject: RE: Particle C++ operator
> >
> > OK, thanks guys... I guess I'll just rewrite the forces from
> > within the operator... at least this way, I can reuse the
> > same code next time I have to do something similar so it's
> > more work this time around but I'll be able to recycle it
> > later on. Thanks for the info!
> >
> > Math
> >
> > -----Original Message-----
> > From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM]On Behalf
Of Raffaele Fragapane
> > Sent: Tuesday, March 28, 2006 7:15 PM
> > To: XSI(at)Softimage.COM
> > Subject: Re: Particle C++ operator
> >
> > don't forget doubling up the cloud and looking up the
> > simulated one to add on top of it.
> > not pretty, fugly infact, but will spare you from a few
> > headaches in some cases.
> >
> > Aloys Baillet wrote:
> >
> > > Hi Mathieu,
> > > The sad reality is that any C++ operator will kill all XSI simulation.
> > > The only way to add custom stuffs to the simulation is to use a
> > > particle scripted event, where you can call a custom C++ command that
> > > would do the work... It's not the most efficient way but at least you
> > > don't need to re-implement everything!
> > >
> > > Cheers,
> > >
> > > Aloys
> > >
> > > On 3/28/06, *Mathieu Leclaire* <mleclair(at)hybride.com
<mailto:mleclair(at)hybride.com>> wrote:
> > >
> > >     Hey everyone,
> > >     I'm doing some particles custom operators but there's one thing I
> > >     just don't quite understand. If I create and apply an operator on
> > >     particles, the operator will overwrite all other XSI forces and
> > >     emissions... it's as if the cloud was frozen when I apply the
> > >     operator which kind of makes sense since you might want full
> > >     control over your particles but that also means I need to code my
> > >     own forces and emissions to give the desired effect. I basically
> > >     feel like I'm redoing work that's already been done. Is there a
> > >     way to just like code a new force and apply it so that the
> > >     particles keep using other XSI forces already in the scene or do I
> > >     have no other choice but to recode all the basic forces I need and
> > >     add parameters to my operator to control them?


---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi




---
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.