Q: Assigning A Particle Per Primativegroup

   3635   5   0
User Avatar
Member
349 posts
Joined: 8月 2006
Offline
Hi guys,

Ive been trying to assign a particle to a group of primatives without much success.
Ive got pre-fractured geometry grouped at sop level as they need to be. So I want to assign a particle to each group inside a POPnetwork.

Something similar to the…

Impulse Activation: $FF == 1
Impulse Birthrate: nprims(“../../enterSopHere”)

….I would imagine.
Im sure ive done it before, I cant for the life in me remember what it was I did.

TIA
User Avatar
Member
2624 posts
Joined: 8月 2006
Offline
Hi ,
Maybe something like the the attached file

Rob

Attachments:
rse_NprimsonParticles.hip (76.6 KB)

Gone fishing
User Avatar
Member
349 posts
Joined: 8月 2006
Offline
Hi Rob,

Thanks for the .hip file. But no thats not quite what im after. That is particles assigned to all primatives.
I want 1 particle assinged to a primative group. There might be 20 primatives in that group, there might be 4.

Think of it like this. Basically think of a wall created from an extruded grid. Now that has been fractured by using cookies. Those cookies have been grouped and re-merged toegther again.
Now I have a something like 10 groups (depending on how many cookies you have used). Now I want 1 particle assigned to those paticular groups, so that I can manipulate those particles with forces to tear the geometry apart. So if there is 10 groups, there will be 10 particles.

I can use DOPS, but I would rather use particles purley for speed purposes when it comes to calculations.

Thanks for the help though, much appreciated.
User Avatar
Member
1906 posts
Joined: 11月 2006
Offline
In the attached file, I've taken you N groups generated by the cookies, created a new prim group based on all those and use those to emit the particles. This make it easiest because it can be used as the source group and we can emit from Prim centers. Then, for the number of particles we can use
'argc(primlist(opinputpath(“..”, 0), groupname))

The alternative of doing it without creating a new group that drives it would require doing some sort of loop that uses primgrouplist() to grab the names of all your piece groups, then use primlist() to iterate over all those group names to get the number of prims in each group. You would then have to come up with some system that would position the particles at the proper position as well.

Attachments:
particles_from_prim_group.hip (50.2 KB)

Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
2624 posts
Joined: 8月 2006
Offline
Great file Graham !

Rob
Gone fishing
User Avatar
Member
349 posts
Joined: 8月 2006
Offline
Thank you Graham,

This is most definatly a workable soloution. Thats a nice way of doing it.

Thanks again
  • Quick Links