Maya nParticle only calculates friction/stickness between particles and rigid bodies, not friction is encountered between particles. My guess is the algorithm complexity is too high. Anyway there is two relative easy ways to fake the effect, according to my searching.
想要用一个一包糖粒堆在物体(对又是它..)上的片段,发现Maya的nParticle只计算粒子和Rigid body的摩擦力不计算粒子和粒子间的摩擦力(想来是算法复杂度太高了),所以不管怎么搞最终都会摊成大烧饼,并且还会不停的抽搐.. 查了下大概有两个相对简单的方法
1. hold particles with a invisible rigid body. 2. Use RealFlow, which seems to have much more handy control over particles
I’m not happy with either. 1 is lame. 2 too much trouble, have to get hang of another environment. If I must do scripting, I choose to learn mel.

So the algorithm is:
It’s unlikely to mess with friction as I guessed above. I tried to modify per particle mass to let them stuck in the space. Yea that works but they tend to be headbutted by other particles and flying around.. for science. Later I googled out it’s possible to control force field per particle, with attribute named “Field name”_”option name”. That is to say adding attribute “gravityField1_magnitude” to nParticle2 will grant you control over per particle gravity from the field.
On creation:
[php]
global int $freezeCap=5; //be completely frozen after the cap rounds
global int $gravityPP=500;
global float $dragPP=100;
global float $accelerationTrigger=15; //the speed parameter to trigger ‘I’m free again!", which leads to free droping.
global int $n[100000]; //how many times have the particle been locked
global int $preVel[100000]; //velocity of last frame
global int $locked[100000];
nParticleShape4.dragField1_magnitude=0;
nParticleShape4.gravityField1_magnitude=$gravityPP;
global int $init=1;
if($init==1) {
int $i;
for($i=0;$i<100000;$i++) {
$n[$i]=0;
$locked[$i]=0;
}
$init=0;
}
[/php]
Before dynamics:
[php]
int $id=nParticleShape4.particleId;
float $vel=abs(nParticleShape4.velocity);
//print("nParticleShape2.velocity "+$nParticleShape2.velocity+"\n");
if($vel>$preVel[$id]+$accelerationTrigger) {
$n[$id]=0;
nParticleShape4.dragField1_magnitude=0; //If it’s free again, unlock and erase record
}
else {
$freezeFact=$n[$id]/$freezeCap; //progress bar of locking
if($freezeFact>1)
$freezeFact=1;
$n[$id]+=1;
nParticleShape4.dragField1_magnitude=$freezeFact*$dragPP; //increase drag force depending on locking level
nParticleShape4.gravityField1_magnitude=$gravityPP*(1-$freezeFact)*(1-$freezeFact); //parabola is better according to experiment
nParticleShape4.velocity=<<0,0,0>>;
}
$preVel[$id]=nParticleShape4.velocity;
[/php]
The script is not bad to me.. adjustable parameters are handy. Time efficiency is acceptable (as a former ACMer, I can confirm this is O(n), can’t be better). 20 million particles * 100 frames cost my i7 half an hour. Not perfect but enough for bragging.
1. 弄个透明的动画的rigid body来把粒子圈起来。 2. 用RealFlow,我只用RealFlow模拟水,但是显然那它对粒子的控制比Maya厉害得多。
两个方法我都不高兴,1太不屌爆,2太麻烦,要做很多熟悉另一个环境的工作,且要写脚本,所以不如来学下mel。下了本书叫Maya Python — for Games and Film,翻了一百页发现Python在Maya上基本是庞大的workflow中工程师为了其他人方便写的maya程序,并且也要有mel基础,不是我要的。

总之,思路是:
想要计算摩擦力显然是不现实的,说过了。我先通过改质量的途径让粒子满足条件时失去质量以停在原地不受重力影响,停是能停住但是会被别的particle撞飞.. 非常科学。后来查到可以使用 <力场名>_<属性名> 的方式控制Per Particle的行为,即,给nParticle2添加名为gravityField1_magnitude的attribute程序就会使用它来控制它受到重力场1的magnitude。然后通过DragField让particle稳定。我在注释里详细说。
粒子生成时脚本:
[php]
global int $freezeCap=5; //be completely frozen after the cap rounds
global int $gravityPP=500;
global float $dragPP=100;
global float $accelerationTrigger=15; //the speed parameter to trigger ‘I’m free again!", which leads to free droping.
global int $n[100000]; //how many times have the particle been locked
global int $preVel[100000]; //velocity of last frame
global int $locked[100000];
nParticleShape4.dragField1_magnitude=0;
nParticleShape4.gravityField1_magnitude=$gravityPP;
global int $init=1;
if($init==1) {
int $i;
for($i=0;$i<100000;$i++) {
$n[$i]=0;
$locked[$i]=0;
}
$init=0;
}
[/php]
动态前的脚本:
[php]
int $id=nParticleShape4.particleId;
float $vel=abs(nParticleShape4.velocity);
//print("nParticleShape2.velocity "+$nParticleShape2.velocity+"\n");
if($vel>$preVel[$id]+$accelerationTrigger) {
$n[$id]=0;
nParticleShape4.dragField1_magnitude=0; //If it’s free again, unlock and erase record
}
else {
$freezeFact=$n[$id]/$freezeCap; //progress bar of locking
if($freezeFact>1)
$freezeFact=1;
$n[$id]+=1;
nParticleShape4.dragField1_magnitude=$freezeFact*$dragPP; //increase drag force depending on locking level
nParticleShape4.gravityField1_magnitude=$gravityPP*(1-$freezeFact)*(1-$freezeFact); //parabola is better according to experiment
nParticleShape4.velocity=<<0,0,0>>;
}
$preVel[$id]=nParticleShape4.velocity;
[/php]
个人感觉这个还不错,有很多参数可以控制,效率也还行(前ACMer表示这个就是O(n)..不能再低了),200万粒子100帧i7跑半个小时。显然不完美,蒙人没问题。
Друзья ситуация жуткая. Жесть случилась полная. Брат пьёт без остановки. Соседи стучат в дверь. Скорая не едет. Короче, единственное что реально помогло — вывести из запоя на дому качественно. Поставили систему. В общем, вся инфа вот здесь — вывод из запоя на дому круглосуточно [url=https://vyvod-iz-zapoya-na-domu-samara-def.ru]https://vyvod-iz-zapoya-na-domu-samara-def.ru[/url] Не тяните. Скиньте другу в беде.
Hello There. I discovered your blog the use of msn. This is a very smartly written article.
I will be sure to bookmark it and come back to learn more of
your useful information. Thank you for the post.
I will certainly comeback.
Друзья ситуация. Попал я в переплёт конкретный. Близкий не выходит из запоя. Соседи стучат в дверь. Платные клиники просят бешеные деньги. Короче, только это и спасло — анонимный вывод из запоя без последствий. Приехали через час. В общем, вся инфа вот здесь — вывод из запоя на дому в самаре [url=https://vyvod-iz-zapoya-na-domu-samara-abc.ru]https://vyvod-iz-zapoya-na-domu-samara-abc.ru[/url] Каждая минута дорога. Скиньте другу в беде.
I always emailed this weblog post page to all
my friends, for the reason that if like to read it afterward my friends will too.
Hi there to every one, it’s genuinely a nice for me to visit this site, it includes priceless Information.
Here is my blog post … bird-safe window film
Hola! I’ve been following your site for a while
now and finally got the bravery to go ahead and give you a shout out from Huffman Tx!
Just wanted to tell you keep up the fantastic work!
This method highlights mediation’s inclusivity and commitment to suiting diverse socioeconomic histories.
Hey there! This is my first visit to your blog!
We are a collection of volunteers and starting a new project in a community in the same niche.
Your blog provided us valuable information to work on. You have done a outstanding job!
I’ll right away take hold of your rss as I can not in finding your email subscription link or e-newsletter service.
Do you have any? Please let me understand in order that I may just subscribe.
Thanks.
my web page: Ventana de Vidrio con clasificación de resistencia al Fuego de 2 horas Rochester
Hi there fantastic website! Does running a blog such as this
require a lot of work? I’ve very little understanding of
coding but I had been hoping to start my own blog soon. Anyways, if you have
any suggestions or tips for new blog owners please share.
I understand this is off topic but I simply needed to ask.
Thanks a lot!
Heya i am for the first time here. I came across this board and I find It truly useful & it helped me
out much. I hope to give something back and help others like you helped me.
I appreciate how this post stays well explained and pleasant to read without trying to overcomplicate the subject, because that kind of well-rounded and easygoing style usually creates much more meaningful and respectful discussions between different readers online.
kinghills casino
Слушайте что расскажу. Жесть просто полная. Брат пьёт без остановки. Соседи стучат в дверь. Скорая не едет на такие вызовы. Короче, нормальные врачи попались — профессиональный вывод из запоя на дому. Откачали за час. В общем, вся информация вот здесь — помощь вывода запоя [url=https://vyvod-iz-zapoya-na-domu-voronezh-fds.ru]https://vyvod-iz-zapoya-na-domu-voronezh-fds.ru[/url] Не надейтесь на авось. Перешлите другу в беде.
Слушайте что расскажу. Жесть случилась полная. Человек уже четвёртые сутки в штопоре. Жена в слезах. Платные клиники просят бешеные деньги. Короче, нормальные врачи нашлись — качественный вывод из запоя на дому. Поставили систему. В общем, там контакты и прайс — откапаться на дому [url=https://vyvod-iz-zapoya-na-domu-voronezh-plk.ru]https://vyvod-iz-zapoya-na-domu-voronezh-plk.ru[/url] Не тяните. Скиньте другу в беде.
Attractive component to content. I simply stumbled upon your blog and in accession capital to claim that
I acquire actually loved account your blog posts.
Any way I will be subscribing for your feeds and even I success you access constantly fast.
hello there and thank you for your information – I’ve definitely picked up something new from right here.
I did however expertise a few technical issues using this site,
since I experienced to reload the site lots of times previous to I could get it to load correctly.
I had been wondering if your web hosting is OK?
Not that I am complaining, but slow loading instances times will sometimes affect your placement in google and could damage your quality score if ads and marketing with Adwords.
Well I am adding this RSS to my email and can look out for
a lot more of your respective exciting content. Make sure you update this
again very soon.
Друзья ситуация. Попал в жесть полную. Отец не выходит из запоя. Соседи стучат в дверь. Скорая не едет на такие вызовы. Короче, нормальные врачи нашлись — профессиональный вывод из запоя на дому. Откачали за час. В общем, там контакты и прайс и условия — выведение из запоя на дому воронеж [url=https://vyvod-iz-zapoya-na-domu-voronezh-eio.ru]https://vyvod-iz-zapoya-na-domu-voronezh-eio.ru[/url] Не тяните. Перешлите тому кому надо.
I am extremely inspired along with your writing talents and also with the format to your blog.
Is this a paid topic or did you customize it your self?
Anyway stay up the excellent quality writing, it is rare to see a nice weblog like this one these days..
Ядовитый дурман разламывают
эндосимбионт а также психику.
Катализаторы (кокаин, мефедрон, эфедрин) сжигают ресурсы тела, возбуждая
инфаркты, неизлечимую гипертермию, гниение контейнеров
равно паранойю. Каннабиноиды (гашиш, спайсы) водят буква
полоумию, отказу почек и психозам.
Опиоиды (героин, физептон) парализуют чухалка, вызывают тление мануфактур и
беспощадную ломку. Итог приложения ПАВ —
отказ органов, фатуизм равным образом смерть.
Друзья ситуация. Столкнулся с такой бедой. Брат пьёт без остановки. Соседи стучат в дверь. Скорая не едет. Короче, только это и спасло — профессиональное выведение из запоя капельницей. Отошёл за полчаса. В общем, сохраняйте на будущее — вывод из запоя с выездом [url=https://vyvod-iz-zapoya-na-domu-samara-ghi.ru]вывод из запоя с выездом[/url] Не тяните. Скиньте другу в беде.
Wow, this post is pleasant, my younger sister is analyzing such things,
so I am going to inform her. http://Cordialminuet.com/incrementensemble/forums/profile.php?id=59996
Слушайте что расскажу. Столкнулся с такой бедой. Брат пьёт без остановки. Жена в слезах. Скорая не едет. Короче, единственное что реально помогло — вывод из запоя дешево и сердито. Приехали через час. В общем, сохраняйте на будущее — вывожу из запоя на дому самара [url=https://vyvod-iz-zapoya-na-domu-samara-abc.ru]https://vyvod-iz-zapoya-na-domu-samara-abc.ru[/url] Каждая минута дорога. Перешлите тому кому надо.
I’m now not sure where you are getting your info, but great topic.
I needs to spend some time learning more or figuring out more.
Thank you for wonderful info I used to be in search of
this info for my mission.
Genuinely when someone doesn’t be aware of afterward its up to
other visitors that they will help, so here it happens.
Hmm is anyone else experiencing problems with the pictures on this blog
loading? I’m trying to figure out if its a problem on my
end or if it’s the blog. Any responses would be greatly
appreciated.
Howdy I am so delighted I found your webpage, I really found you by mistake,
while I was researching on Yahoo for something else, Anyways I am here now and would just like to
say thanks a lot for a fantastic post and a all round exciting blog (I also love the theme/design), I
don’t have time to go through it all at the minute but I have saved it and also added in your RSS
feeds, so when I have time I will be back to read a great deal more, Please do keep up the great jo.
Друзья ситуация жуткая. Столкнулся с такой бедой. Брат пьёт без остановки. Дети не спят ночами. В диспансер везти — учёт на всю жизнь. Короче, единственное что реально помогло — профессиональное выведение из запоя капельницей. Приехали через час. В общем, сохраняйте на будущее — вывод из запоя на дому самара цены [url=https://vyvod-iz-zapoya-na-domu-samara-def.ru]https://vyvod-iz-zapoya-na-domu-samara-def.ru[/url] Не надейтесь на авось. Перешлите тому кому надо.
Wonderful article! This is the kind of info that should
be shared around the internet. Shame on Google for now
not positioning this put up upper! Come on over and seek advice from my web site .
Thanks =)
Excellent website. A lot of helpful info here.
I’m sending it to some friends ans also sharing in delicious.
And of course, thanks on your sweat!
Quality articles is the main to interest the users to pay a quick visit the web
site, that’s what this web page is providing.
Ребята привет. Жесть просто полная. Близкий человек уже шестой день в завязке. Соседи стучат в дверь. В диспансер везти — клеймо на всю жизнь. Короче, только это и вытащило — качественное выведение из запоя капельницей. Приехали быстро. В общем, сохраняйте себе — вывод из запоя цены [url=https://vyvod-iz-zapoya-na-domu-voronezh-fds.ru]вывод из запоя цены[/url] Не тяните. Скиньте кому надо.
Ребята всем привет. Попал я в переплёт. Брат пьёт без остановки. Жена в слезах. В диспансер везти — учёт на всю жизнь. Короче, только это и спасло — срочный вывод из запоя круглосуточно. Приехали через час. В общем, сохраняйте на будущее — срочный вывод из запоя на дому [url=https://vyvod-iz-zapoya-na-domu-voronezh-plk.ru]https://vyvod-iz-zapoya-na-domu-voronezh-plk.ru[/url] Не тяните. Перешлите тому кому надо.
https://plitkar.com.ua/
Ядовитый дурман ломают эндосимбионт равно психику.
Стимуляторы (кокаин, мефедрон, эфедрин) сжигают средства
тела, зажигая инфаркты, неизлечимую
гипертермию, тление кровеносный сосуд равно паранойю.
Каннабиноиды (ямба, спайсы) ведут ко слабоумию, отказу почек а также психозам.
Опиоиды (опиоид, метадон) парализуют дыхание, разгоняют
гниение материалов и жестокосердную ломку.
Итог использования ПАВ — уступка организаций, фатуизм
а также смерть.
Друзья ситуация. Попал в жесть полную. Отец не выходит из запоя. Жена вся в слезах. Скорая не едет на такие вызовы. Короче, единственное что реально помогло — доступный вывод из запоя цены адекватные. Примчались быстро. В общем, там контакты и прайс и условия — снятие запоя на дому [url=https://vyvod-iz-zapoya-na-domu-voronezh-eio.ru]https://vyvod-iz-zapoya-na-domu-voronezh-eio.ru[/url] Не тяните. Перешлите тому кому надо.
Народ выручайте. Столкнулся с такой бедой. Близкий не выходит из запоя. Жена в слезах. В диспансер везти — учёт на всю жизнь. Короче, только это и спасло — вывод из запоя дешево и сердито. Приехали через час. В общем, вся инфа вот здесь — вывод из запоя цена на дому [url=https://vyvod-iz-zapoya-na-domu-samara-abc.ru]https://vyvod-iz-zapoya-na-domu-samara-abc.ru[/url] Не надейтесь на авось. Скиньте другу в беде.
Have you ever considered about including a little bit more than just your articles?
I mean, what you say is fundamental and everything.
However imagine if you added some great images
or video clips to give your posts more, “pop”! Your content is excellent but
with pics and clips, this website could certainly be one of the most beneficial in its
field. Fantastic blog!
Самарцы привет. Жесть случилась полная. Муж просто пропадает. Соседи стучат в дверь. В диспансер везти — учёт на всю жизнь. Короче, нормальные врачи нашлись — профессиональное выведение из запоя капельницей. Поставили систему. В общем, сохраняйте на будущее — вывод из запоя на дому цена [url=https://vyvod-iz-zapoya-na-domu-samara-ghi.ru]вывод из запоя на дому цена[/url] Не тяните. Перешлите тому кому надо.
Had an amazing time at some turner falls cabins and wow, the whole vacation was perfect!
We booked one of those turner falls cabin rentals with a spa and it was absolutely
perfect after hiking around the area. The Oklahoma mountain getaways (https://punbb.skynettechnologies.us/viewtopic.php?id=291467) mountain cabin rentals we found had
everything we needed and the scenery was breathtaking. Definitely suggest these
turner falls cabins with hot tubs for anyone planning a getaway!
Super bericht over kozijnen vervangen! Sinds kort ben ik bezig met het zoeken naar het vervangen van mijn kozijnen en dit is precies wat ik zocht,
want ik wist niet hoeveel impact het vervangen van kozijnen oplevert voor je woning.
Ik sprak recent met een kozijnen vervangen specialist en de kozijnen vervangen offerte was veel
redelijker dan verwacht, dus het is zeker de moeite waard om snel contact op te nemen te bekijken als je slecht geïsoleerde kozijnen hebt, want nieuwe kozijnen bespaart je veel
energie en geld!
My website; duurzame raamkozijnen
You need to be a part of a contest for one of the highest quality websites on the net.
I’m going to highly recommend this blog!
Hi there to every one, it’s in fact a good for me to go to see this web page, it contains
precious Information.
That is very fascinating, You are an overly professional blogger.
I’ve joined your feed and sit up for in quest of more of your wonderful
post. Additionally, I have shared your web site in my social networks
제가 출장이 많아서 서울출장안마를 주로
이용하는데,
이 정보에서 새로운 팁을 알게 됐어요.
서울1인샵 곳마다 서비스가 이렇게 다른 줄 처음 알았어요.
또 서울출장마사지를 찾을 때 이
정보를 활용할게요.
정말 고맙습니다!
강력 추천합니다!
https://bytow24.pl/
Since the admin of this web page is working, no uncertainty very shortly
it will be renowned, due to its quality contents.
Rzeczowy materiał. Wiele przydatnych informacji. Dzięki za ten materiał.
Czekam na więcej.
Dokładnie – sprawa wystroju jest niełatwa. Wreszcie konkrety.
Naprawdę przydatne. Szukałem podobnych porad już jakiś czas.
Dziękuję!
my blog post; https://m1bar.com/user/cherijoris5/
Ребята привет. Попал в переплёт конкретный. Близкий человек уже шестой день в завязке. Жена рыдает. Скорая не едет на такие вызовы. Короче, единственное что реально работает — доступный вывод из запоя цены адекватные. Приехали быстро. В общем, смотрите сами по ссылке — снятие запоя на дому [url=https://vyvod-iz-zapoya-na-domu-voronezh-fds.ru]снятие запоя на дому[/url] Каждый час на счету. Скиньте кому надо.
Народ выручайте. Жесть случилась полная. Брат пьёт без остановки. Дети не спят ночами. Скорая не едет. Короче, единственное что реально помогло — лучшая наркологическая клиника с выездом. Приехали через час. В общем, там контакты и прайс — вывести из запоя на дому [url=https://vyvod-iz-zapoya-na-domu-voronezh-plk.ru]вывести из запоя на дому[/url] Не тяните. Перешлите тому кому надо.
Fantastic goods from you, man. I have understand your stuff
previous to and you’re just too wonderful. I really like what
you have acquired here, really like what you are stating and the way
in which you say it. You make it entertaining and you still take care of to
keep it sensible. I can not wait to read much more from you.
This is actually a terrific site.