lxhtin
For my project, I need to produce a crowd of balls. They are moving together in certain shape (like there is a bounding box) while have their own randomness. (a little bit of flocking)  As the animation goes, new balls keep joining this crowd. so it's not the fixed number of balls all the time. Later they are going to move around a cylinder shape like object. (so i need to avoid balls interacting with the cylinder) 
 
Therefore, my tasks include creating this volume to contain the balls; have the balls move with the volume mesh while each having their own random motion; new individual ball join the team and move just like the others within the volume (maybe hand animate the individual ones first then add the field if possible?); make the volume shape deformable to keep balls from interacting with the cylinder object.
 
I think except for the part of new balls joining the team, what I need is a deformable volume mesh with bounding field on its surface so that all the balls inside will be influenced by the field and the changing shape. 
 
I've spent a lot of time searching for methods, trying new scripts, plug-ins. But still cannot find the one close to my wanted result. So far the closest one I can get is from SOuP scatter node, in which particles move with the animated shape. However, the particles inside are also changing their own visibility when the volume deforms (new particles appear and some disappear). My project would be these visible balls that will always be in the volume.
 
I really cannot find new ways to try. If anybody have an idea please help me. Sorry about the long post!!!
animatedfox
You could get most of the way there for the main mass using particle goals on your bounding mesh. If you want it to be a volume, you could  create a "volume" by duplicating and offsetting the duplicates to create the center levels of the object. Then just combine the meshes and do an auto UV on it to get some nice random no-overlapping uvs. Delete history and start deforming. You can use this as your emitter and goal surface. Tweak the goal weights and smoothness to taste. I think you will want to tweak goal weight on a PP basis with a runtime expression to get some randomization.
Maybe you will need to add a turbulence field or something...but if you tweak the goalU/goalV/goalWeightPP values you can get lots of nice flocking movement.
As for having random extra guys fly in, you can just emit more of the same particles from anywhere and they will fly to the main volume.
Just create another surface emitter and emit the flocking particles from it. (Delete the new particles that Maya creates by default when you create an emitter)

As for locking down the scatter points, my understanding is that you can use the "bake pointCloud to nurbsCurve" option to get a "locked" volume of points that you can deform and get all crazy with.
Good luck
~Ben


Reply 0 0
lxhtin
animatedfox wrote:
You could get most of the way there for the main mass using particle goals on your bounding mesh. If you want it to be a volume, you could  create a "volume" by duplicating and offsetting the duplicates to create the center levels of the object. Then just combine the meshes and do an auto UV on it to get some nice random no-overlapping uvs. Delete history and start deforming. You can use this as your emitter and goal surface. Tweak the goal weights and smoothness to taste. I think you will want to tweak goal weight on a PP basis with a runtime expression to get some randomization.
Maybe you will need to add a turbulence field or something...but if you tweak the goalU/goalV/goalWeightPP values you can get lots of nice flocking movement.
As for having random extra guys fly in, you can just emit more of the same particles from anywhere and they will fly to the main volume.
Just create another surface emitter and emit the flocking particles from it. (Delete the new particles that Maya creates by default when you create an emitter)

As for locking down the scatter points, my understanding is that you can use the "bake pointCloud to nurbsCurve" option to get a "locked" volume of points that you can deform and get all crazy with.
Good luck
~Ben




Thank you Ben! Thanks for taking the time. Really helpful ways of controlling the volume. But I still have some questions.

After I combine the meshes into one volume mesh, I make it the goal of particles emitted from itself. But the particles always stay attached to the vertices. I tried to tweak the goal weights and smoothness, but the particles still get attached to the mesh very soon. Do you think it's because this needs a runtime expression? This is my first experience with controlling the particles, I definitely need to learn more about PP-based control or using simple expressions.

For the new particles joining in, can you explain more about "emit more of the same particles from anywhere and they will fly to the main volume." ? What I tried was to create another emitter somewhere, key the emission rate, and make that volume mesh the goal. Every time I add a new emitter emitting one particle, I make this volume the goal of the particle. Is that what you mean? 


THANKS AGAIN!!

Reply 0 0
animatedfox
Sorry for the delayed response.
Glad you are making some progress.
One way that I use for getting particles to not just go the the verts of a goal mesh is to add the following dynamic attributes to your particle.
(Find under Add Dynamic Attributes > General > on the particle shape node in the attribute editor. Then click the "particle" tab in the add attribute window that comes up and select:
goalU
goalV
parentU
parentV

Once you have those attributes added you just need to add the following lines as a creation expression for you particle:
.goalU = .parentU;
.goalV = .parentV;

This will get then to cover the whole surface.
As for the additional particles, the idea is to create other emitters, but delete the new particles that are created when you create the emitters. Then use the dynamic relationship editor to select the particle and all the emitters you want to use to emit the one main particle.
Does that make sense?
Hope so.
Reply 0 0
lxhtin
animatedfox wrote:
Sorry for the delayed response.
Glad you are making some progress.
One way that I use for getting particles to not just go the the verts of a goal mesh is to add the following dynamic attributes to your particle.
(Find under Add Dynamic Attributes > General > on the particle shape node in the attribute editor. Then click the "particle" tab in the add attribute window that comes up and select:
goalU
goalV
parentU
parentV

Once you have those attributes added you just need to add the following lines as a creation expression for you particle:
.goalU = .parentU;
.goalV = .parentV;

This will get then to cover the whole surface.
As for the additional particles, the idea is to create other emitters, but delete the new particles that are created when you create the emitters. Then use the dynamic relationship editor to select the particle and all the emitters you want to use to emit the one main particle.
Does that make sense?
Hope so.


Thanks Ben!

I followed what you said. For making particles moving within a volume mesh, I found that the particles would all move to one point (vertex) after add the goal, unless the volume mesh has a similar amount of verts as particles. In other words, if I create a volume mesh that has more verts than the number of particles, the goaled particles would have some crazy attachment to certain vertex position (mostly the bottom) of the mesh (even if I add the goalU/V & parentU/V attributes). Does this mean I should count create/edit the mesh verts according to how many particles I wanna have within the volume? Cause I will deform the mesh so it would be better if I have more divisions for the geometry.

For making new particle moving into the crowd, I experimented with the dynamic relationship editor. It is a powerful tool, thanks for the tip! But when I connect the emitter and the main crowd, it is hard to control the speed of the new emitted particle even if I tweak the settings. The new particle always travels rapidly past the crowd first then vibrates a lot around the main crowd. Do you think I missed some steps?
Right now I find a doob way to mimic the effect which is to keep adding new particle system (single particle for each system) and keyframe animating each translation as well as goal weight (goal to the main crowd). But this causes interplay of the new particle and particles in crowd. I think different particle systems won't be calculating others at all.

Sorry for bothering you with the same question again.


Reply 0 0
animatedfox
Okay, here are some thoughts:
- First, when working with particles you should use the numeric display to problem solve issues. To use it, select 'numeric' under under the shading tab on the particle shape. Then just type the name of the attribute you want to display. Try ".parentU" or ".goalU" in this case.
It sounds like all your particles have the same value.

- Now, to help this possible problem...do your emission/goal surfaces have UVs? This is essential to do things this way. If they don't I recommend creating the UVs then delete that history out and recreating the emitters...just to be safe. On the emitters, also check that "Need Parent UV" is checked.

- In terms of tweaking the speed and movement of you joining particles, it sounds like you need to do some serious per-particle expressionizing. Which could make you break out into a cold sweat.
You can slow them down by enabling weightPP under the goals tab and doing some maths around age/emitter/stuff. Or just slow them down by tweaking velocityPP or stuff like that. So many options...none of them are as easy as you might hope.

Did I say anything useful?
Hope so.
~Ben



Reply 0 0
lxhtin
animatedfox wrote:
Okay, here are some thoughts:
- First, when working with particles you should use the numeric display to problem solve issues. To use it, select 'numeric' under under the shading tab on the particle shape. Then just type the name of the attribute you want to display. Try ".parentU" or ".goalU" in this case.
It sounds like all your particles have the same value.

- Now, to help this possible problem...do your emission/goal surfaces have UVs? This is essential to do things this way. If they don't I recommend creating the UVs then delete that history out and recreating the emitters...just to be safe. On the emitters, also check that "Need Parent UV" is checked.

- In terms of tweaking the speed and movement of you joining particles, it sounds like you need to do some serious per-particle expressionizing. Which could make you break out into a cold sweat.
You can slow them down by enabling weightPP under the goals tab and doing some maths around age/emitter/stuff. Or just slow them down by tweaking velocityPP or stuff like that. So many options...none of them are as easy as you might hope.

Did I say anything useful?
Hope so.
~Ben




I will need to learn a lot more than I thought! As a beginner of particle effects, I definitely have to know expression stuff. But you've been super helpful for my progress making! Thank you so much Ben!

I just found that the "need parent UV" was never checked! Thanks for the tip. For the numeric particle display, I read about some ways to control particle behavior in the manual such as writing expressions with "if particlId>X, ..." or "if particleId%2==0, ..." things like that. But we won't be able to assign attributes to each particle with their Id#. So when you said "Then just type the name of the attribute you want to display", do you mean we can just type the Id# for particleshape attributes? Or it's still like particleShape1. goalU = particleShape1. parentU; ?

Reply 0 0
Reply