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跑半个小时。显然不完美,蒙人没问题。
These are genuinely impressive ideas in about blogging.
You have touched some fastidious points here. Any
way keep up wrinting.
WOW just what I was searching for. Came here by searching for BYD M6
Xoilac là điểm đến lý tưởng cho những ai đam
mê cá cược bóng đá thể thao với trải nghiệm tối ưu và dịch vụ chuyên nghiệp.
Nhà cái này không chỉ nổi bật với tỷ lệ cược hấp
dẫn mà còn mang đến giao diện trực tiếp link bóng đá
mượt mà, giúp người chơi dễ dàng theo dõi và đặt cược hiệu quả.
What’s up to every one, it’s genuinely a nice for me to go to see this site, it includes priceless
Information.
I have read so many posts about the blogger lovers but this paragraph is in fact a pleasant post, keep it up.
Hello to all, how is everything, I think every one is getting more from this
website, and your views are nice in support of new people.
Xoilac – Website Trực Tiếp Bóng Đá Xanh Chín Nhất Năm 2026
Wow, this piece of writing is fastidious, my sister is analyzing
these kinds of things, therefore I am going to convey her.
Hey! I know this is kind of off topic but I was wondering if you knew where I could find a captcha plugin for my comment form?
I’m using the same blog platform as yours and I’m having problems finding one?
Thanks a lot!
I’m really enjoying the design and layout of your blog. It’s a very easy on the eyes which makes it much more pleasant for me to come
here and visit more often. Did you hire out a developer to create your theme?
Exceptional work!
Hello, I log on to your new stuff daily. Your writing style is
witty, keep it up!
King88 | Link vào trang chủ King88 – Nhà cái casino uy tín 2026
References:
Cherokee casino west siloam springs https://hedgedoc.info.uqam.ca/s/-3Yt639-o
Write more stories, more chapters.
Concert Attire Stamford
360 Fairfield Ave,
Stamford,CT 06902, United Տtates
+12033298603
Band director
Beneficial Blog! I had been simply just debating that there are plenty of screwy results at this issue you now purely replaced my personal belief. Thank you an excellent write-up.
Wow! Finally I got a weblog from where I be capable of actually get helpful facts regarding my study and
knowledge.
Please let me know if you’re looking for a article writer for your blog.
You have some really good posts and I feel I would be a
good asset. If you ever want to take some of the load off, I’d really like to write some content for your blog in exchange for a link back
to mine. Please blast me an e-mail if interested. Many thanks!
JeetKing
is Pakistan’s
fastest-growing
online casino platform,
offering a complete library of
engaging
slot games.
Gaming fans across South Asia
trust JeetKing
for its instant withdrawals and fair gameplay.
نتیجهگیری اینکه
برای اون دسته علاقهمندها
پیشبینی مسابقات
کار میکنن
این مرجع
به سادگی میتونه
مفید واقع بشه
نکته قابل توجه اینه که
سرویسهایی مثل
enfeјaronline معتبر
و
sibbet اصلی
توسعه پیدا کردن
در پایان
خوشم اومد
و
باز هم
حتما برمیگردم
Also νisit my page :: سوالات متداول (faq)
Thanks for sharing your thoughts on agoda 88.
Regards
I was suggested this web site by my cousin.
I am not sure whether this post is written by
him as nobody else know such detailed about
my difficulty. You’re incredible! Thanks!
Hi, I do think this is an excellent site. I stumbledupon it 😉 I may revisit once again since I book marked it.
Money and freedom is the greatest way to change, may you be rich and continue to help
other people.
I don’t know if it’s just me or if everybody else experiencing issues with your site. It appears as though some of the written text on your content are running off the screen. Can someone else please provide feedback and let me know if this is happening to them as well? This could be a problem with my web browser because I’ve had this happen before. Appreciate it
سلام،من امروز وسط وبگردی در اینترنت با این وبسایت رسیدم و
واقعا خیلی خوشم اومد. اطلاعاتش جذاب بود وبه ندرت همچین سایتی ببینم.
فکر کنم برای خیلیها کاربردی باشه.
اگر به دنبال محتوای مفید هستن
حتما سر بزنن. در مجموع تجربه خوبی بود و قطعا بازدیدش میکنم
در آخر کار
برای اون دسته که
بتینگ
میخوان امتحان کنن
این مجموعه آنلاین
کاملا میتونه
کمککننده باشه
جالبتر اینکه
دامنههایی مثل
enfejaronline حرفهای
و
sibbet قوی
مطرح شدن
در نهایت
مفید بود
و
در ادامه
استفاده دوباره میکنم
.
Feel frere to visit my page; سوختن ریز در پوکر یعنی چه؟ (https://bet303review.com)
Hello, i think that i saw you visited my website so i came to return the desire?.I’m attempting to find
things to improve my site!I assume its good enough to
use some of your ideas!!
Amazing article, cheers, I will bookmark you now.
This is very interesting, You are an overly professional blogger.
I have joined your rss feed and look ahead to searching for
more of your wonderful post. Also, I’ve shared your site in my social networks
Hello mates, its wonderful paragraph on the topic of tutoringand entirely explained, keep it up all the
time.
I am regular visitor, how are you everybody? This paragraph posted at this
website is really pleasant.
Hilfreicher Beitrag. Reichlich wertvolle Anregungen.
Großes Lob dass du dein Wissen teilst. Ab jetzt lese ich hier öfter mit.
Stimme zu – die Frage der Einrichtung ist herausfordernd.
Danke für die klare Erklärung.
Echt nützlich. Ich suche schon nach ähnlichen Tipps seit Wochen gesucht.
Klasse gemacht!
Feel free to visit my webpage; https://Cutdb.Hanfzentrale.com/index.php?title=Benutzer:EmoryHoss75020
Hi, this weekend is fastidious designed for me,
as this time i am reading this fantastic educational article
here at my residence.
Appreciate this post. Will try it out.
Very nice post. I just stumbled upon your weblog and wished to say
that I’ve truly enjoyed surfing around your blog posts.
In any case I will be subscribing to your rss feed and
I hope you write again soon!
Klasse Artikel. Eine Menge praktische Hinweise. Danke fürs Teilen. Ich komme bestimmt wieder
vorbei.
Du hast recht – die Frage der Wohnungsgestaltung ist nicht einfach.
Danke für die klare Erklärung.
Aufrichtig hilfreich. Ich habe schon nach genau so einem
Beitrag genau danach gesucht. Super Arbeit!
Have a look at my webpage; Dane
Cabinet IQ
8305 State Hwy 71 #110, Austin,
TX 78735, United Ꮪtates
254-275-5536
3Dmodeling
It’s in reality a nice and useful piece of info. I am satisfied that you shared this helpful information with
us. Please stay us informed like this. Thanks for sharing.
Interessanter Text. Zahlreiche konkrete Inspirationen. Vielen Dank für diesen Inhalt.
Ich speichere mir die Seite ab.
Treffend formuliert – die Frage der Wohnungsgestaltung ist anspruchsvoll.
Endlich mal Klartext.
Echt inspirierend. Ich habe schon nach ähnlichen Tipps lange gesucht.
Viele Grüße!
Here is my website; Benjamin
Its like you read my mind! You appear to know so
much about this, like you wrote the book in it or something.
I think that you can do with a few pics to drive the
message home a bit, but instead of that, this
is magnificent blog. A great read. I’ll definitely be back.
Wow, fantastic blog format! Ηow long hɑve уou been blogging
foг? you made blogging look easy. Tһе total
ⅼοоk օf уour website іs wonderful, let alone the cоntent!
Have a looқ at my blog LetsTG telegram groups
Amazing! Its actually awesome article, I have got much clear idea about from this paragraph.
I would like to thank you for the efforts you have put in writing this site.
I really hope to check out the same high-grade
blog posts from you later on as well. In fact, your creative writing abilities has inspired me to get my own website now ;
)
NK88 – Nhà Cái Uy Tín Với Kho Gameplay Đỉnh Cao Năm 2026
Thanks for sharing your thoughts on review. Regards
Hi there, thhe whole thhing is gokng fije here andd ofcoudse very onee is sharingg facts, that’s
trulky fine, keep upp writing.
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 know this site provides quality depending articles and
other stuff, is there any other site which provides such data in quality?
Paragraph writing is also a fun, if you be familiar
with then you can write or else it is complex to write.
Честно несколько нужных
материала
Toller Beitrag. Eine Menge nützliche Tipps. Großes Lob für
die Mühe. Ich empfehle die Seite gerne weiter.
Stimme zu – der Bereich der Wohnungsgestaltung wird oft nicht einfach.
Endlich mal Klartext.
Wirklich praxisnah. Ich habe schon nach genau so einem Beitrag genau danach gesucht.
Super Arbeit!
my webpage: https://Bhakticourses.com