nParticles as capsule shapes?

193 views
Skip to first unread message

stephenkmann

unread,
Jun 18, 2012, 5:24:16 PM6/18/12
to maya...@googlegroups.com
I'm looking for a simple way to fill a bottle with asprin, and then shake it around.

 i was hoping to use nCloth, but I can't get the pills to not collapse on themselves, even with rigid pumped to 500 ,

then I got to thinking if I could make my nParticles capsule shaped, or close enough to match, that would be perfect.

anyone got any ideas?

thanks
-=s



--
stephe...@gmail.com
http://smannimation.blogspot.com/
http://nymayausersgroup.blogspot.com/
http://smann3d.blogspot.com/

Steve Davy

unread,
Jun 18, 2012, 5:31:13 PM6/18/12
to Maya Group
Why not just use instanced geo?


Date: Mon, 18 Jun 2012 17:24:16 -0400
Subject: [maya_he3d] nParticles as capsule shapes?
From: stephe...@gmail.com
To: maya...@googlegroups.com

stephenkmann

unread,
Jun 18, 2012, 6:10:05 PM6/18/12
to maya...@googlegroups.com
cause I want them to interact with each other as the capsules, like rigid bodies

Steve Davy

unread,
Jun 18, 2012, 6:45:16 PM6/18/12
to Maya Group
I think if you just bumped up the collision scale on the nParticles to the size of the long end of the capsule (I'm assuming you mean lozenge shaped?) you'd probably get decent results.

Does depend on how close you're gonna be and how accurate your collisions must be, of course.


Date: Mon, 18 Jun 2012 18:10:05 -0400
Subject: Re: [maya_he3d] nParticles as capsule shapes?

Ryan O'Phelan

unread,
Jun 27, 2012, 8:33:47 AM6/27/12
to maya...@googlegroups.com

What did you end up doing? Nparticles would be great, but inaccurate. I'm guessing you did a rigid bodies sim? Super hard cloth?

stephenkmann

unread,
Jun 27, 2012, 9:49:39 AM6/27/12
to maya...@googlegroups.com
I actually started with super hard nCloth sim, but at some point, no matter how high i put everything, it still would compress and break. I thought I would then just find center and replace the CLoth with my real objects, but once the sim would break., it just went down hill and I ended up with flat pancakes everywhere.
 
the second step was rigidBodies. amazingly filling the bottle and tossing them around worked to a point, but that damn "intersection warning" would stop the whole thing.  besides it was running at about 15 to 10 min a frame , so ,  i gave up on that

next I tried DMM , which would have been great, except I only have access to the freebie one, and its too limited poly count made it useless

next I tried Bullet/ dynamica but It fell apart as well, mostly due to my lack of knowledge. and limited time to get this shot done, I only had about a day and a 1/2 to do it.  I got super close with bullet, but some basic things were killing me. for one Stepping. apparently you can only change the step size of the bullet solver, if you are using dynamica, hence I switch to dynamica. which got me closer, but i ran into issues where the bottle would move too fast and the pills would just fall out, so i slowed the whole animation down, with the intent of speeding up the baked animation, but then the pills just fell out before the bottle even moved.   Things that drive me crazy about bullet.. ( and this is probably mostly due to my noob trying to learn bullet in one hour issues)
          Couldn't find how to reverse a surface. so I had to start with an open bottle, or the pills would spring out on frame one, and then go crazy.
          for some reason, bullet would move the pivot of my object to 0 0 0 when making a dynamic object . So if i had a bunch of pills in a set position in the bottle, ( simmed using rigid bodies) I couldn't seem to turn them into bullet objects without the pivots all being at zero.
         along those same lines. using "box" instead of mesh would be faster, but the box seemed always way off compared the object.  if i did the aforementioned pre filled bottle, the box surrounding the pills would go from 0 0 0 to wherever my objects were.

so in the end? and I'm really not happy with it. i filled the bottle with nParticles ( balls )  that were roughly the size of the pills, emailed the group to see if there was a way to change the shape, then simmed a bunch of different nParticle dynamics.  chose a sim, baked out the instances ( no thanks to un-instancer no longer working) , but I found a mel un-instancer that takes rotations into account on H3D. and then hand key fixed all the pills for about 3 hours.

  on that note. I found that animation layers were super helpful. Since I just wanted to offset the pills a little bit, I found the under and over grouping them baked animation, didn't really work, but the animation layers I was able to key the pills offset animation and get the desired result.  The only sticky bit on that, is that I wanted to bake the animation offset layer down to the base layer. You can merge, but then you still have to keep that layer, you can't delete it.  What I wanted my end result to be, was to have NO animation layers, and the merged animation layer, actually a part of the base anm layer.  I was about to just bake new geo to world space, when I said, F- it  its late, I'm leaving the merged layer in there.   and that seemed to work.

 in the back of my mind I kept thinking I should look up ODE, I think that allowed you to make capsule like rigid bodies. next down time I get, I'm looking it up, as well as investigate more into DMM and Bullet.

 when the job ships, I'll see if I can post a vimeo.. ( its not all that exciting however ) :)

-=s

jon parker

unread,
Jun 27, 2012, 3:58:41 PM6/27/12
to maya...@googlegroups.com
I haven't actually used nParticles yet (and since you already finished
it anyways, forget it)... can you not group the particles into, say
rows of three nParticles spaced enough to approximate a pill shape and
have these three in each group not affect each other? Or is this
outside of the scope of Maya's particle system?

-jon

Sandy Sutherland

unread,
Jun 27, 2012, 4:02:59 PM6/27/12
to maya...@googlegroups.com
I thought something similar actually, where maybe you could create a tight spring constraint between pairs of particles. I think though you would probably need something like the soup plugins to be able to control the creation of the constraints. Not pretty, but maybe possible.

All in all though you a rigid body sim would be your best bet, either with bullet or ODE. Bullet is part of Maya 2013 for future reference..

stephenkmann

unread,
Jun 27, 2012, 4:19:17 PM6/27/12
to maya...@googlegroups.com
yeah I jumped into 2013 to test it out (bullet)
 but found that dynamic was still neccessary.. Sub Steps on the bullet solver especially

I spose you could do an nParticle  fill object ( the pill) and then crosslink them with constraints based on distance... hmm, i like the sound of that.


-=s

Ryan O'Phelan

unread,
Jul 2, 2012, 9:22:26 AM7/2/12
to maya...@googlegroups.com

You do? That sounds like another headache.
The full version of dmm is pretty nice. We just used it recently. One thing that I might do is to do small Sims using only part of the bottle, so they can be separated, and also fit in the poly count of the free version.
I've also found that cracking dmm sims , work great with alembics, which can be brought back in as collision Geo.

No doubt that you are done with the project though.

R

stephenkmann

unread,
Jul 2, 2012, 9:37:49 AM7/2/12
to maya...@googlegroups.com
hahahah , yeah I finished by the night I sent out the first e-mail

 I do think DMM is the way to go for RBD's and shattering objects.

the only issue I had with doing in parts, is I wasn't filling the bottle, but shaking it, so they all had to scatter collectively.
had I done it in parts I think the first batch would have had to been restricted to a 1/8 of the bottle, and I'm not really sure that would have looked right ...

 -=s
Reply all
Reply to author
Forward
0 new messages