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跑半个小时。显然不完美,蒙人没问题。
I love your blog.. very nice colors & theme.
Did you design this website yourself or did
you hire someone to do it for you? Plz respond as I’m looking to
design my own blog and would like to know where u got this from.
kudos
Thanks for this post. It reflects what I value when browsing quality 18+ video platforms
my webpage … https://xlilith.com/videos/22698/two-black-bbw-lesbians-suck-each-others-massive-tits/
Всем здравствуйте. Муж не встаёт с кровати. Жена на грани нервного срыва. Скорая реагирует только на угрозу жизни. Итог, только эти врачи смогли помочь — вывод из запоя цены ниже рынка. Бригада подъехала через 35 минут. В общем, контакты и стоимость тут — вывод из запоя капельница екатеринбург [url=https://vyvod-iz-zapoya-na-domu-ekaterinburg-vqx.ru]https://vyvod-iz-zapoya-na-domu-ekaterinburg-vqx.ru[/url] Промедление может стоить здоровья. Скиньте тем, кто в отчаянной ситуации.
This was helpful. It explains why certain adult sites feel easier to use
Also visit my website … https://thetranny.com/videos/53045/sissy-clitty-hypno/
Thanks very nice blog!
If you wish for to obtain a good deal from this paragraph then you
have to apply these methods to your won webpage.
Приветствую народ. Отец не выходит из штопора уже третьи сутки. Дети перепуганы. В диспансер тащить — позор на всю жизнь. Короче говоря, реально спасли эти врачи — вывод из запоя цены доступные. К утру человек пришёл в себя. В общем, не потеряйте вкладку — вывод из запоя цена [url=https://vyvod-iz-zapoya-na-domu-ekaterinburg-nws.ru]вывод из запоя цена[/url] Звоните сейчас. Отправьте тем кто в беде.
مرحبًا بكم في ssyoutube.com (“نحن” أو “الخاص بنا”
أو “نا”).
Hello there! I just would like to offer you a big thumbs
up for your great info you have here on this post.
I am returning to your web site for more soon.
Świetny tekst. Dużo konkretnych porad. Super za ten materiał.
Zapisuję do ulubionych.
Masz rację – sprawa aranżacji bywa trudna. Dobrze,
że ktoś to wyjaśnia.
Bardzo pomocne. Szukałam takich informacji od dawna. Super robota!
Review my homepage :: Deneen
Hey there! I could have sworn I’ve been to this website before but
after reading through some of the post I realized it’s new
to me. Anyways, I’m definitely delighted I found it and I’ll be book-marking and checking back frequently!
Dzień dobry, przeglądałem forum i chcę powiedzieć, że dużo się dowiedziałem. Sama ostatnio urządzam mieszkanie i każda wskazówka jest na wagę złota. Pozdrawiam forumowiczów.
Dobry temat. Moim zdaniem wybór kolorystyki to podstawa. Warto poświęcić temu czas.
Greetings from Ohio! I’m bored to tears at work
so I decided to browse your site on my iphone during
lunch break. I really like the info you provide here and
can’t wait to take a look when I get home.
I’m shocked at how fast your blog loaded on my mobile ..
I’m not even using WIFI, just 3G .. Anyways, excellent site!
Hello, after reading this awesome piece of writing i am too happy to share my knowledge here
with mates.
Pozdravljeni vsi skupaj. Rad bi delil nekaj z vami. Dolga leta sem se boril s to odvisnostjo. Potem pa sem po priporocilu prijatelja nasel odvajanje od alkohola pri metodi, ki resnicno deluje. Bil sem poln dvomov. Ampak sem vseeno poskusil. In zdaj, po koncanem programu, lahko recem, da je bilo to prelomnica v mojem zivljenju. Vse uradne informacije in podrobnosti sem preveril na spletni strani, posodobljene podatke pa si lahko ogledate tukaj: Dr Vorobjev center [url=https://www.alkoholizmazdravljenje.com]https://www.alkoholizmazdravljenje.com[/url]. Odvisnost od alkohola ni sramota.
Ce iscete resitev za to tezavo — vzemite si cas in raziscite. Nikoli ni prepozno za nov zacetek.
Dolga leta sem se boril sam. Potem pa sem po nakljucju nasel nekaj, kar je bilo prelomnica. Govorim o odvajanju od alkohola pri metodi, ki resnicno deluje. Veste, alkoholizem je bolezen. In mnogi ne vedo, kam se obrniti. Zato vam zelim pokazati vse tehnicne podrobnosti in uradne informacije, ki so na voljo na tej povezavi: odvisnost od alkohol [url=http://alkoholizma-zdravljenje.com]odvisnost od alkohol[/url]. Vec o tem si preberite na spodnji povezavi.
Meni je ta pristop pomagal. Vsak dan je bil izziv, ampak zdaj sem ponosen nase. Ce nekdo v vasi okolici potrebuje pomoc – ne odlasajte. Drzim pesti za vsakega, ki se bori
Klasse Text. Eine Menge hilfreiche Inspirationen. Grüße für
diesen Inhalt. Ich warte auf mehr.
Genau – die Sache des Wohnstils ist nicht einfach.
Endlich mal Klartext.
Aufrichtig hilfreich. Ich suche schon nach so etwas lange gesucht.
Viele Grüße!
Stop by my blog :: https://openstudy.marble.oci.Softex.uz/user/chantebrookfield/
Witam, trafiłem tu przypadkiem i stwierdzam, że dużo się dowiedziałem. Sam ostatnio remontuję dom i szukam inspiracji. Miłego dnia wszystkim.
Wartościowy wątek. Dorzucę od siebie, że wybór kolorystyki naprawdę robi różnicę. Polecam się nie spieszyć.
Witam, trafiłem tu przypadkiem i chcę powiedzieć, że dużo się dowiedziałem. Sam właśnie teraz zmieniam wystrój i każda wskazówka jest na wagę złota. Pozdrawiam serdecznie.
Wartościowy wątek. Dorzucę od siebie, że aranżacja wnętrza naprawdę robi różnicę. Warto poświęcić temu czas.
Also visit my web page; https://Wiki.colindevries.nl/wiki/HolliebrNormanmx
Hello there! Do you know if they make any plugins to assist with SEO?
I’m trying to get my blog to rank for some targeted keywords but I’m not
seeing very good success. If you know of any
please share. Kudos!
Thanks very nice blog!
Pozdravljeni, dragi moji. Rad bi delil svojo zgodbo. Bil sem ujetnik odvisnosti. Potem pa sem na spletu naletel na resitev. Govorim o ambulantnem zdravljenju alkoholizma pri Dr Vorobjevu. Bil sem preprican, da je zame prepozno. Ampak sem se odlocil за ta korak in zdaj sem clovek na novo rojen. Vse uradne informacije in podrobnosti sem preveril na spletni strani, posodobljene podatke pa si lahko ogledate tukaj: odvajanje od alkohola [url=https://www.odvajanje-od-alkoho.com]odvajanje od alkohola[/url] Alkoholizem je bolezen in se zdravi.
Ce vas partner potrebuje pomoc — prosim, ne odlasajte. Srecno na vasi poti!
I visited several web pages however the audio quality for audio songs current at this site is truly fabulous.
If you are going for best contents like myself, just
pay a quick visit this site everyday because it gives feature contents, thanks
займ на на карту онлайн https://zaym-nakartu.ru
이런 포스팅 오랜만에 봤네요.
용인출장안마에 대해 이렇게 쉽게 정리해 주신 분은 처음이에요.
제일 용인1인샵의 간편한 예약 시스템이 좋았어요.
용인힐링마사지 고민하시는 분들께 이 정보를 꼭 알려드리고 싶네요.
my web page: 용인마사지
Всем салют. Отец не выходит из штопора. Родственники не знают куда бежать. В диспансер отвозить — позор на район. Короче, единственные кто приехал без предоплаты — анонимное выведение из запоя с капельницей. Через час человек начал говорить. В общем, все контакты по ссылке — выведение из запоя [url=https://vyvod-iz-zapoya-na-domu-ekaterinburg-dyz.ru]выведение из запоя[/url] Не откладывайте. Может, кому-то она спасёт близкого.
Доброго дня. Брат совсем потерял себя. Родственники не спят ночами. В диспансер сдавать — ужас. В общем, только эти врачи смогли помочь — срочное выведение из запоя капельницей. Купировали абстинентный синдром. В общем, нажмите, чтобы сохранить — вывод из запоя цена [url=https://vyvod-iz-zapoya-na-domu-ekaterinburg-vqx.ru]вывод из запоя цена[/url] Промедление может стоить здоровья. Вдруг это спасёт кого-то.
Hi there, just became alert to your blog through Google, and found that it is truly informative.
I am going to watch out for brussels. I’ll appreciate if you continue
this in future. A lot of people will be benefited from your
writing. Cheers!
Операционная система GNU https://www.gnu.org свободная программная платформа с открытым исходным кодом, лежащая в основе многих современных дистрибутивов. Узнайте об истории проекта, компонентах системы, лицензии GNU GPL, возможностях и преимуществах свободного ПО
The Stake betting app stake fb lets you bet and play games anytime on your phone.
Aw, this was an extremely good post. Taking a few minutes
and actual effort to generate a very good article…
but what can I say… I put things off a lot and never manage to
get anything done.
Grüße euch, ich habe nach Informationen zum Einrichten gesucht und ich muss zugeben, dass man hier echt was mitnimmt. Ich selbst renoviere seit kurzem die Einrichtung neu zu und solche Tipps sind echt hilfreich. Danke und viele Grüße.
Wertvoller Beitrag. Ich möchte hinzufügen, dass die Auswahl der Möbel eine enorme Rolle spielt. Ich empfehle, sich nicht zu hetzen.
https://bmlpro.ru/
Really loads of fantastic material.
My blog … https://Shapedinmexico.com/
It’s very trouble-free to find out any topic on web as compared to textbooks, as I found this
article at this web page.
Excellent info, Cheers.
Do you mind if I quote a few of your articles as long as I provide credit and sources back to your blog?
My website is in the exact same area of interest as yours and my users would definitely benefit from some of the
information you present here. Please let me know if this okay with you.
Thank you!
Hi, ich bin hier durch Zufall gelandet und ich möchte sagen, dass man hier echt was mitnimmt. Ich selbst renoviere seit kurzem die Einrichtung neu zu und jeder Ratschlag hilft mir weiter. Grüße an die Forengemeinde.
Gutes Thema. Ich kann aus eigener Erfahrung sagen, dass die Farbwahl nicht zu unterschätzen ist. Es lohnt sich, dafür Zeit zu nehmen.
Hello, I check your blog daily. Your story-telling style is awesome, keep doing what you’re
doing!
Sehr guter Post. Eine Menge konkrete Anregungen.
Super für den Beitrag. Ich komme bestimmt wieder vorbei.
Genau – der Bereich der Einrichtung ist nicht einfach.
Endlich mal Klartext.
Sehr inspirierend. Ich habe schon nach so etwas seit einiger Zeit gesucht.
Super Arbeit!
Feel free to visit my page :: Rosalind
Do you have a spam problem on this website; I also am a
blogger, and I was wanting to know your situation;
many of us have created some nice methods and we are looking to swap strategies with other folks, please
shoot me an email if interested.
Useful comment. A software development partner should not just accept requirements blindly. They should challenge weak assumptions and help shape a better product. http://42gooddental.com/bbs/board.php?bo_table=free&wr_id=1910318
This info is invaluable. Where can I find out more?
Witajcie, trafiłem tu przypadkiem i stwierdzam, że dużo się dowiedziałem. Sama od jakiegoś czasu urządzam mieszkanie i każda wskazówka jest na wagę złota. Pozdrawiam serdecznie.
Wartościowy wątek. Moim zdaniem wybór kolorystyki to podstawa. Warto poświęcić temu czas.
Review my blog; http://Ingeekswetrust.de/index.php?title=Aran%C5%BCacja_poddasza:_jak_zmieni%C4%87_skosy_w_przytulne_wn%C4%99trze
Browse 18,930 save from danger photos and images available,
or search for rescue to find more great photos and pictures.
I am curious to find out what blog system you happen to be using?
I’m experiencing some small security issues with my latest site and I would like to find something more safe.
Do you have any recommendations?
Доброго дня. Муж не встаёт с кровати. Жена на грани нервного срыва. В диспансер сдавать — ужас. Итог, выручила эта служба — анонимный вывод из запоя на дому. Купировали абстинентный синдром. В общем, нажмите, чтобы сохранить — капельница от запоя на дому цена [url=https://vyvod-iz-zapoya-na-domu-ekaterinburg-vqx.ru]капельница от запоя на дому цена[/url] Промедление может стоить здоровья. Вдруг это спасёт кого-то.
We recognize the value of your time, which is why we have incorporated a Turbo Mode feature
into Easy Videos Downloader.
Zivjo vsem skupaj. Rad bi delil svojo zgodbo. Bil sem ujetnik odvisnosti. Potem pa sem od prijatelja izvedel za to moznost. Govorim o odvajanju od alkohola pri Dr Vorobjevu. Sprva nisem verjel. Ampak sem dal tej metodi priloznost in koncno sem spet jaz. Vec o tem in o celotnem postopku si lahko preberete neposredno na uradnem viru: odvajanje od alkohola [url=http://www.odvajanje-od-alkoho.com]odvajanje od alkohola[/url] Ni sramota prositi za pomoc.
Ce vi sami potrebuje pomoc — prosim, ne odlasajte. Nikoli ni prepozno za nov zacetek.