adjusting goal so nParticles don't overlap

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 11 November 2012   #1
adjusting goal so nParticles don't overlap

hey all. I have a bunch of particles that are using a nurbs surface as a goal. every particle has a particle overlapping directly on top of it. What I am trying to do is keep the same amount of particles but essentially offset the goalU and goalV values so that there is no overlapping. I would ideally like to keep one particle where it is and just adjust the overlapping one.

this was my attempt though it shifts all particles the same amount(keeping the overlapping) instead of shifting only the top particles:

is there a better way to do this?


int $size = `particle -q -ct nParticle1`;
float $val = nParticleShape1.goalV;
for($i = 0; $i < $size; $i++){
if(nParticleShape1.goalV == $val){
nParticleShape1.goalV -=.1;
}
else{
nParticleShape1.goalV += 0;
}
}

i hope that makes sense. Thanks so much!




*****EDIT****
looks like just assigning a random number to every particles goal does a decent enough job. I would love to know how to do the original idea but I think I have figured it out for now.

Last edited by Gemini : 11 November 2012 at 01:25 PM.
 
Old 11 November 2012   #2
Is the nurbs surface goal object also the emitter? if it is then setting the emitter to 'need parent uv' and then setting goalU = parentU and goalV - parentV makes the particles stick to their emission point on the surface.

THEN you can use the emission pruning with a really high emit rate so that there are no overlapping particles (you specify a world distance that you dont want particles to emit in next to other particles).
__________________
www.danielelliott.co.uk
 
Old 11 November 2012   #3
danmarell, Thanks for the reply. I initially tried that but was unable to create exactly what I wanted. I ended up, essentially, hand placing follicles and then using their U and V positions to create the particles. It's certainly a bit more convoluted but allowed me to be more specific. Unfortunately, all that control is somewhat lost when I add a random number to every particles goal.
 
Old 11 November 2012   #4
That seems like a lot of work. Maybe you could enable self collisions on the nparticle object. the particles will then push each other and reach an equilibrium. This also respects the particle size and hopefully gaps will be filled in.
__________________
www.danielelliott.co.uk
 
Old 11 November 2012   #5
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 12:50 PM.


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