Creating particles with same id's

Post Reply
User avatar
Otuama
Posts: 162
Joined: Sun Jun 27, 2010 2:29 pm

Creating particles with same id's

Post by Otuama » Thu Jun 13, 2013 11:50 pm

There's a method to my madness but is it possible to create a particle with the same id once it has been deleted?

Or, reset the id counter for an emitter to 0?

The only way I can currently think of is to delete the emitter each frame and make a new one with the exact same name and settings.
Otuama - Vimeo
'Strength does not come from physical capacity. It comes from an indomitable will.' - Gandhi

User avatar
Otuama
Posts: 162
Joined: Sun Jun 27, 2010 2:29 pm

Re: Creating particles with same id's

Post by Otuama » Fri Jun 14, 2013 11:03 am

If I delete all the particles from an emitter then recreate them within Batch, the recreated particles seem to have the same id's. If I run the same script with framesPost, the recreated id's are different.

I've tried creating a new emitter each frame so I'd definitely get refreshed id's but I keep getting rf_core x64.dll (or something) crashes.
Otuama - Vimeo
'Strength does not come from physical capacity. It comes from an indomitable will.' - Gandhi

CG_Nema
Posts: 67
Joined: Fri May 31, 2013 5:23 am

Re: Creating particles with same id's

Post by CG_Nema » Fri Jun 14, 2013 10:08 pm

I remember reading in the documentation that IDs are guaranteed to be unique, but I can't seem to find it right now. I don't think RF will let you do it easily without crashing.

User avatar
Otuama
Posts: 162
Joined: Sun Jun 27, 2010 2:29 pm

Re: Creating particles with same id's

Post by Otuama » Sat Jun 15, 2013 9:33 pm

Yeah, the id's from each emitter should be unique but trying to figure a way to work around my problem.

Wrote a quick script which sticks particles from one emitter to particles from another emitter (http://www.youtube.com/watch?v=KXL0S9_dgT4).

Currently, the particles are deleted and recreated onto the blue particles each frame. However, even though they've been previously killed, the new id's aren't made from scratch.

The problem is this can make handling the red particles very difficult in Rf or maya cos I won't know what red ones I'm working with or won't be able to instance object for example to specific id's in maya.

I'll just find another way around this. The joys of scripting ( that's a good oxymoron ), I suppose.
Otuama - Vimeo
'Strength does not come from physical capacity. It comes from an indomitable will.' - Gandhi

CG_Nema
Posts: 67
Joined: Fri May 31, 2013 5:23 am

Re: Creating particles with same id's

Post by CG_Nema » Mon Jun 17, 2013 12:47 am

Can I ask why you need to do this? Maybe creating a custom particle INT attribute would work?

User avatar
Otuama
Posts: 162
Joined: Sun Jun 27, 2010 2:29 pm

Re: Creating particles with same id's

Post by Otuama » Mon Jun 17, 2013 10:19 am

Well, this idea came about from someone on the other forum who wanted bubbles within the mesh. It's a simple idea which gives an ok result.

Image
Image

What I think will give me a problem is if these particles are brought into Maya. The way the script works is to add particles from another emitter to select particles from the main emitter. This currently happens by deleting the 'bubble' particles and recreating them in the main particles new position each frame.

However, this creates new particles with increasing id's.

That's where I think I'll have the problem in Maya. My idea is to have a viscous fluid with little objects inside instanced to the 'bubble' particles. I plan to make a kind of glittery effect (small shiny objects within the fluid)

However, if for example I have a small green glitter object connected to particle id #1..... when it gets to frame 2, what was id #1 will now change to something like id #123.

Maybe I'm wrong but either Maya will get confused and not instance it or it'll instance it with a new object with a different colour.

That's why I'd like to have the same id number follow the main particles

-----------------------

What I suppose I'll have to do is have the 'bubble' particles move to its assigned main fluid id without being deleted. Will think more about that tomorrow.
Otuama - Vimeo
'Strength does not come from physical capacity. It comes from an indomitable will.' - Gandhi

User avatar
LuisMiguel
Posts: 528
Joined: Fri Jun 04, 2010 2:37 pm

Re: Creating particles with same id's

Post by LuisMiguel » Mon Jun 17, 2013 2:30 pm

Hi,

That is weird. I remember there was this problem in Softimage long time ago. Try to pass the particles to a container and export them again. Then, if you import the container particles into Maya, the Id should keep the same namber for all frames.

Let me know.

luisM.

Post Reply