Idea about cell division scene

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 12 December 2010   #1
Idea about cell division scene

Hi I try to create a cell division scene in which one cell divides into two and four and eight.....
I figure out the logic to do it but I am pretty new with using mel script to control nParticle/particle...So I am wondering if anyone can help, so here is my logic:
1)emit first particle and set a lifespanPP=1 (any small numbers)
2)when particle 1 die, record its position x, y,z
3) at the same position, generate particle 2 and 3 (so it will look like one particle come two particles)
then create a loop to make every particle to go through step 1,2,3.

So that my idea about how to create the cell division scene.....is there anyone can help me to convert this idea to mel script? Thanks a lot!
 
Old 01 January 2011   #2
I can't help you much, I'm no expert on dealing with particles individually and it's going to be pretty complex either way.

A few things I can help you with, and perhaps someone else can help you with the rest.

To get the position of an individual particle:
`getParticleAttr -at worldPosition particleShape.pt[x]`; //where x is the particle ID.

You can call individual particles with a simple if statement:
if(particleShape.particleID == x) { do something here }; //again x is the particle ID.


So for instance you could create a runtime expression (this is going to be pretty dumb, but I don't intend to try it out myself, sorry):

float $lastParticle = 0;
vector $instancePos = `getParticleAttr -at worldPosition particleShape.pt[$lastParticle]`;
if (particleShape.particleID == $lastParticle)
{ particleShape.lifespanPP = 0 };
if ((particleShape.particleID > $lastParticle) && (particleShape.particleID <=$lastParticle+2)
{particleShape.position = $instancePos};

I might just be making a fool out of myself with that rubbish, but hey, I guess it's worth a try

Last edited by dizzyone : 01 January 2011 at 12:10 AM.
 
Old 01 January 2011   #3
you could do this effect with a piece of geo that is driven by a blendshape then use a single nParticle as a goal.
 
Old 01 January 2011   #4
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 03:36 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.