No I think you misunderstood the question... lets say my instance group has
a cube, a sphere and a cylinder. Each particle will instance one of the 3
objects from the group but how can I identify which one of those 3 objects a
specific particle is instantiating? If one particle is instantiating a
sphere and I want that particle to disappear and have another particle on
the second cloud appear that will also instantiate the same sphere, not a
cube nor a cylinder... how can I control that? How can I identify which
object from the group that is being used by a particular particle? I'm doing
all this in C++ using the ParticleCloudPrimitive btw. From that, the SDK
says I can access information like position, velocity, rotation, angular
velocity, UVW, color, size, sprite angle, mass, age, seed, age limit, sprite
index and type ID... but nowhere does it talk about instances!! Anyone ever
had to deal with something like that?
-----Original Message-----
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM]On Behalf Of
Bernard Lebel
Sent: Friday, April 14, 2006 12:41 PM
To: XSI(at)Softimage.COM
Subject: Re: copying particle instance from one cloud to another
Mathieu,
Is there a possibility that the instanced group has a name extremely
close (if not the same) as the PType? This is how I could sort
something like that, as in XSI 4.2 I could not find a way to query the
instanced group from the PType (sorry if I missed it...)
I don't "manually" set the group of particle instances. Instead, I use
a script that allows me to pick the object(s) I want to particle
instantiate, then it will create the group and the PType with a near
same name, and then perform the actual group instantiation.
You could possibly write a tool that when a group is used as instance
group in a PType, either the PType or the group is renamed to make
sure the two conform to a traceable label.
When you want to transfer information, retrieve the group by their
name, based on the PType name, and then visit the group members.
Note I have not tried to do what you're after, these are just suggestions.
Cheers
Bernard
On 4/14/06, Mathieu Leclaire <mleclair(at)hybride.com> wrote:
>
>
>
> First let me give you the context of what I'm doing: I'm creating a
special
> kind of collision system for particles. I'm creating a particle cloud to
> which I attached a scripted event evaluated on every frame that calls a
> custom command to verify which particles collide. If a certain particle(s)
> does collide, the custom command writes information to a second clouds'
> userDataBlob, and puts an ageLimit value to it's current age value to make
> that particle disappear. Then the second cloud has a custom operator that
> reads it's userDataBlob and if theirs information in it, it adds the new
> particle(s) and the clears the userDataBlob to await new information. So
> that's basically copying particles from one cloud to another depending on
> collision calculations.
>
>
>
> But here's my problem: I can copy the ptype from one cloud to the other
> while creating this second cloud before I do the simulation. But I use
> particle instancing and in my instance group there might be more then one
> object so how do I know for each particle, which object it's instantiating
> so I can copy that information through the userDataBlob and make sure that
> the new particle on the second cloud instantiates the right object?
>
>
>
>
>
> Mathieu Leclaire
>
> R&D Programmer
>
> Hybride Technologies
---
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