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 am sure this article has touched all the internet visitors, its really really pleasant piece of writing
on building up new weblog.
Howdy! This post couldn’t be written any better! Reading this post reminds me of my previous room mate!
He always kept chatting about this. I will forward this write-up to him.
Pretty sure he will have a good read. Thanks for sharing!
Hi, all the time i used to check web site posts here in the
early hours in the break of day, for the reason that i love
to gain knowledge of more and more.
Hello There. I discovered your blog the use of
msn. This is a really smartly written article. I will make sure to bookmark it and return to read more of your helpful info.
Thanks for the post. I will certainly return. http://seosecretservice.top
Wartościowy materiał. Wiele przydatnych wskazówek.
Dzięki za podzielenie się. Będę zaglądać częściej.
Zgadzam się – temat urządzania wnętrz jest niełatwa.
Przydatne podejście.
Naprawdę przydatne. Szukałem takich informacji już jakiś czas.
Pozdrawiam!
Also visit my web-site :: https://Staging.wplug.org/mediawiki/index.php/User:KristinaPollack
Hilfreicher Text. Viele wertvolle Informationen. Super dass du
dein Wissen teilst. Ich empfehle die Seite gerne weiter.
Stimme zu – die Frage der Raumgestaltung ist nicht einfach.
Danke für die klare Erklärung.
Sehr inspirierend. Ich war schon nach ähnlichen Tipps seit
Wochen gesucht. Danke!
Feel free to visit my website; Tam
Just want to say your article is as surprising. The
clearness in your post is just nice and i could assume you’re an expert
on this subject. Fine with your permission let me to grab
your feed to keep updated with forthcoming post. Thanks a million and please continue the rewarding work.
Toller Inhalt. Viele nützliche Tipps. Danke für diesen Inhalt.
Ich speichere mir die Seite ab.
Stimme zu – das Thema der Einrichtung ist nicht einfach.
Danke für die klare Erklärung.
Echt praxisnah. Ich habe schon nach solchen Informationen seit Wochen gesucht.
Super Arbeit!
My web-site :: Bruno
Good article! We are linking to this great article on our website.
Keep up the good writing.
Temizlik hizmetleri alanında kullanıcıların kolay
iletişime ihtiyacı oluyor. Bu rehber bu ihtiyaca cevap verebilir.
Amazing! This blog looks just like my old one! It’s on a entirely
different subject but it has pretty much the same layout and design. Wonderful choice of colors!
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 feed-back would be greatly appreciated.
Undeniably believe that which you stated. Your
favorite reason appeared to be on the net the simplest thing to be aware of.
I say to you, I definitely get annoyed while people consider worries that they plainly do not know about.
You managed to hit the nail upon the top and defined out the whole thing without having side effect , people can take a signal.
Will likely be back to get more. Thanks
When some one searches for his required thing, so he/she desires to be
available that in detail, thus that thing is maintained over here.
I feel this is one of the so much important information for
me. And i’m happy studying your article. However wanna commentary on few common things, The website taste is wonderful, the articles
is really excellent : D. Good job, cheers
Good post! We will be linking to this particularly great article on our site.
Keep up the good writing.
Wonderful blog! I found it while searching on Yahoo News. Do you have any suggestions on how to
get listed in Yahoo News? I’ve been trying for a while but I never
seem to get there! Thanks
Bardzo dobry artykuł. Dużo praktycznych wskazówek. Super że
dzielisz się wiedzą. Czekam na więcej.
Zgadzam się – sprawa wystroju jest niełatwa. Wreszcie konkrety.
Bardzo pomocne. Szukałam czegoś takiego już jakiś czas.
Dziękuję!
Visit my blog … Stacey
The most well-known sizzling sex tubes on the net, Encounter TubePorn.TV!
The horniest and sexiest models who appear in the finest sex
video you’ve ever viewed are the most spooky thumbs up!
Choose from a big selection of inspiring video films in any genre.
website http://gogs.bolineye.com/felipab8426264/felipa1990/wiki/A+new+Key+Tool+For+So+why+Adult+Tube+Adult+Video+Clips+Are+Usually+Widely+Searched
Terrific article! This is the type of information that are meant to be shared across the net.
Disgrace on Google for now not positioning this put up
upper! Come on over and visit my website . Thanks =)
Bardzo dobry materiał. Sporo konkretnych informacji.
Dziękuję za podzielenie się. Zapisuję do ulubionych.
Trafnie napisane – temat doboru mebli potrafi być niełatwa.
Dobrze, że ktoś to wyjaśnia.
Bardzo inspirujące. Szukałam podobnych porad już
jakiś czas. Dziękuję!
Feel free to surf to my blog – Korey
Yes! Finally something about bokep indonesia.
I blog quite often and I really thank you for your content.
Your article has truly peaked my interest. I am going to book mark
your blog and keep checking for new information about once a week.
I opted in for your Feed too.
You actually make it appear so easy together with your presentation but I in finding
this matter to be actually something that I
feel I might by no means understand. It sort of feels too complex and very huge for me.
I’m taking a look ahead for your subsequent submit, I will
try to get the hang of it!
Bardzo dobry materiał. Mnóstwo praktycznych porad.
Dziękuję za ten materiał. Polecam innym.
Dokładnie – kwestia aranżacji potrafi być trudna. Przydatne podejście.
Naprawdę przydatne. Szukałem takich informacji właśnie tego.
Super robota!
Feel free to visit my page – Leonore
Wow, this post is pleasant, my younger sister is analyzing these things, so I am going to let know her.
Witajcie, trafiłem tu przypadkiem i stwierdzam, że dużo się dowiedziałem. Sama od jakiegoś czasu urządzam mieszkanie i szukam inspiracji. Dzięki i pozdrawiam.
Dobry temat. Dorzucę od siebie, że wybór kolorystyki ma ogromne znaczenie. Lepiej raz a dobrze.
купить мед справку спб
Why people still use to read news papers when in this technological globe everything is accessible on web?
Joint on-lіne difficulties аt OMT build teamwork in mathematics, promoting love аnd cumulative motivation foг
tests.
Dive into seⅼf-paced mathematics proficiency ᴡith OMT’ѕ 12-month e-learning courses, total ԝith pactice worksheets аnd taped sessions for extensive modification.
Τhe holistic Singapore Math approach, ԝhich
develops multilayered рroblem-solving capabilities,
underscores ᴡhy math tuition іs essential for mastering tһe
curriculum ɑnd getting ready for future professions.
primary school school math tuition boosts rational reasoning,
crucial fоr analyzing PSLE concerns involving sequences аnd logical deductions.
Tuition aids secondary students develop test methods, ѕuch as time allocation for both O Level
math papers, leading to far Ьetter ⲟverall performance.
Math tuition аt the junior college degree stresses conceptual clarity
ⲟver memorizing memorization, essential fоr taҝing on application-based А
Level concerns.
OMT distinguishes ᴡith a proprietary curriculum tһat supports MOE web
ϲontent Ьy mеans of multimedia integrations, ѕuch as video explanations ⲟf
key theorems.
Assimilation ԝith school гesearch leh, making tuition a smooth extension f᧐r quality improvement.
Witһ global competition climbing, math tuition positions Singapore pupils ɑs tоρ entertainers іn global mathematics analyses.
My website … ѕec2 maths tuition (Charity)
Good post. I learn something new and challenging on blogs I stumbleupon on a
daily basis. It’s always interesting to read through articles from other
writers and use something from other sites.
Check out my site; no kyc casinos
Дубликаты государственных номеров на авто в Москве доступны для заказа в кратчайшие сроки дубликат номера автомобиля в москве обращайтесь к
нам для получения надежной помощи и гарантии результата!
I came across this article earlier today and I
felt it was important to share my thoughts. The clarity in your explanation of complex cricket topics really impressed me.
The most valuable part is that you don’t ignore important details like stats and player form.
You gave me new insights to think about.
I’ll definitely follow your future posts! I’ve already
shared this with a few friends who follow cricket
closely.
Thanks for finally writing about > Use a simple script to achieve powder pile | Maya nParticle简单脚本实现粒子堆叠 | Asher.GG < Loved it!
Hallo, ich habe das Forum durchgeblättert und ich möchte sagen, dass das Thema hervorragend beschrieben ist. Ich selbst bin gerade dabei, meine Wohnung ein und jeder Hinweis ist Gold wert. Danke und viele Grüße.
Spannender Thread. Ich kann aus eigener Erfahrung sagen, dass die richtige Farbgebung eine enorme Rolle spielt. Es lohnt sich, dafür Zeit zu nehmen.
Klasse Inhalt. Eine Menge wertvolle Anregungen. Danke fürs Teilen. Ich warte auf mehr.
Du hast recht – die Sache der Raumgestaltung kann nicht einfach.
Danke für die klare Erklärung.
Sehr praxisnah. Ich habe schon nach genau so einem Beitrag seit einiger Zeit gesucht.
Danke!
My website; Gulioiringa.Com
Hallo, ich bin beim Stöbern hier gelandet und ich möchte sagen, dass das Thema hervorragend beschrieben ist. Ich selbst renoviere seit kurzem mein Zuhause neu zu gestalten und solche Tipps sind echt hilfreich. Grüße an die Forengemeinde.
Gutes Thema. Ich kann aus eigener Erfahrung sagen, dass die Auswahl der Möbel wirklich einen Unterschied macht. Lieber einmal richtig als zweimal.
Also visit my homepage :: https://Www.Ebersbach.org/index.php?title=Jugendzimmer_einrichten_%E2%80%93_Wenn_der_Platz_zum_Leben_erwacht
I was suggested this blog by my cousin. I’m not sure whether this post is
written by him as no one else know such detailed about my trouble.
You’re amazing! Thanks!
Dzień dobry, przeglądałem forum i chcę powiedzieć, że jest tu sporo wartościowych treści. Sama ostatnio remontuję dom i każda wskazówka jest na wagę złota. Pozdrawiam serdecznie.
Ciekawa dyskusja. Z mojego doświadczenia aranżacja wnętrza to podstawa. Warto poświęcić temu czas.
my web page: https://persianmystic.com/index.php/Tapczan_rozk%C5%82adany_%E2%80%93_mebel,_kt%C3%B3ry_ratuje_ma%C5%82e_mieszkania_przed_chaosem
строительство ленточного фундамента – свайно-ленточный для слабых грунтов.
расчет по геологии. гарантия 10 лет
на бетон. акция: лента + стены из блоков
= скидка 15%
монтаж вентиляции Дмитров – для частных домов и квартир.
вентиляторы Soler&Palau. установка за 1 день.
акция «дом + вентиляция» – 10%
строительство кирпичных домов
– с облицовкой клинкером.
армирование сеткой через 4 ряда.
цена от 70 000 ₽/м². покажем объекты в поселках «Яхрома парк», «Медвежьи озера»
An intriguing discussion is definitely worth comment.
I believe that you ought to publish more about this subject, it may not be a taboo matter but usually people do not speak
about these issues. To the next! All the best!!
Cześć, natknąłem się na ten temat i stwierdzam, że jest tu sporo wartościowych treści. Sama ostatnio urządzam mieszkanie i takie porady bardzo się przydają. Pozdrawiam serdecznie.
Wartościowy wątek. Moim zdaniem dobór mebli to podstawa. Polecam się nie spieszyć.
Look into my homepage :: https://Wiki.rettungsdienstblog.eu/index.php?title=Styl_modern_classic_%E2%80%93_jak_go_urz%C4%85dzi%C4%87_w_polskim_mieszkaniu%3F
At this moment I am ready to do my breakfast, later than having my breakfast coming over
again to read further news.
Thank you, I’ve just been looking for info approximately this subject
for ages and yours is the best I’ve found out so far.
However, what in regards to the conclusion? Are you sure about the
source?
Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically tweet my newest twitter updates.
I’ve been looking for a plug-in like this for
quite some time and was hoping maybe you would have some
experience with something like this. Please let me know if
you run into anything. I truly enjoy reading your blog and I look
forward to your new updates.
I believe that is among the such a lot significant info for me.
And i’m satisfied studying your article. However should observation on few normal things,
The web site style is perfect, the articles is in reality
nice : D. Good activity, cheers
We Advise You Charter out Apartments In Dubai Apace And Safely.
Upon The Best Deals, Prime Locations, And Highest Support
From Our Experts.
Naprawdę dobry wpis. Sporo wartościowych porad.
Pozdrawiam że dzielisz się wiedzą. Polecam innym.
Trafnie napisane – sprawa wystroju potrafi być wymagająca.
Dobrze, że ktoś to wyjaśnia.
Szczerze pomocne. Szukałem czegoś takiego od dawna.
Pozdrawiam!
My blog post; Merri
It’s a pity you don’t have a donate button! I’d most certainly donate to this outstanding blog!
I suppose for now i’ll settle for book-marking and adding your RSS
feed to my Google account. I look forward to new updates and will talk about this blog with my
Facebook group. Chat soon!
Guten Tag, ich bin hier durch Zufall gelandet und ich muss zugeben, dass es hier viele wertvolle Inhalte gibt. Ich selbst richte seit einiger Zeit mein Zuhause neu zu gestalten und jeder Ratschlag hilft mir weiter. Danke und viele Grüße.
Gutes Thema. Aus meiner Erfahrung die Farbwahl eine enorme Rolle spielt. Gut Ding will Weile haben.
Feel free to visit my blog – https://Localhomeservicesblog.Co.uk/wiki/index.php?title=Die_perfekte_Farbpalette_f%C3%BCr_die_Wohnung:_So_finden_Sie_Ihre_Wohlf%C3%BChlfarben