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跑半个小时。显然不完美,蒙人没问题。
Hey! I’m at work browsing your blog from my new iphone!
Just wanted to say I love reading through your blog and look forward to all your posts!
Keep up the superb work!
https://teletype.in/@code124/B2naAeaOWSB
купить магнитный домофон
https://camp-fire.jp/profile/how-to-use-promo-code-1xbet
https://www.pinterest.com/pin/1105844883530019334
https://www.thebostoncalendar.com/events/best-888starz-promo-code-bangladesh-exclusive-sign-up-bonuses
https://clipjournal.site/item/1x200mix-1xbet-2026
Thanks for this insightful article! I’ve
been looking for natural ways to support my overall wellness and this gave
me some useful ideas. Alpha Tonic is something I’ve been reading about lately.
Appreciate the info. https://alphtonic.com/
https://www.pennygaff.com.au/forums/users/youngwinstead4/
Иногда найти нужный сервис сложнее, чем кажется. Именно поэтому пользователи вводят запрос ••Глаз Бога официальный бот••, чтобы не попасть на фейковые версии.
[url=https://t.me/GlazaBogazSearch]глаз бога официальный сайт[/url]
This is a very informative post about online casinos and betting
platforms. I especially liked how it explains the importance of choosing a secure site
before signing up.
Many players often ask where they can find reliable gaming platforms with fair odds and smooth payouts.
From what I’ve seen, checking platforms like vn22vip helps
users compare features, bonuses, and overall experience.
Thanks for sharing these insights — they’re helpful for both
beginners and experienced bettors.
不過其實1080P 的畫質本身就已經相當不錯了,你可以看你的需求到哪,來選擇你要的 Youtube 影片畫質。
좋은 글이네요. 찾고 있던 부분인데 많이 배웠습니다.
앞으로 올릴 글도 기대할게요. 잘 보고 갑니다 🙂
Hey there, I think your website might be having browser compatibility issues.
When I look at your blog site in Ie, it looks fine but when opening in Internet Explorer, it has some
overlapping. I just wanted to give you a quick heads
up! Other then that, awesome blog!
Normally I do not learn post on blogs, however I wish to say that this write-up
very forced me to take a look at and do so! Your writing taste has
been amazed me. Thanks, very nice post.
https://www.twitch.tv/starz88efx/about
https://casinochain.edu.pl/kesalahan-umum-dalam-romance-yang-membuat-pasangan-merasa-diabaikan/#comment-172
https://sundaynews.info/user/mcbridevincent13/
https://www.sunemall.com/board/board_topic/8431232/8719128.htm
https://www.rmbbk.com/?2233058
https://www.bandlab.com/atrsshdzv1n
https://etextpad.com/tr9m0kdzbi
https://myreadinglists.com/News/BONUSY-POSTOYANNYM-IGROKAM-VIDY-PROGRAMM-LOYALNOSTI-USLOVIYA-I-SPOSOBY-POLUCHENIYA/
Hey there, You have performed a great job. I will certainly digg it and for my part recommend to my friends. I’m confident they’ll be benefited from this site.
https://www.fetishjob.net/forums/users/mcbridegertsen45/
https://rentry.co/dks4bb7q
https://kwork.ru/user/irinamoskow
Популярность запроса ••Глаз Бога поиск людей•• продолжает расти. Пользователей интересуют возможности сервиса, однако использовать подобные инструменты следует только в рамках закона.
[url=https://t.me/GlazaBogazSearch]глаз бога поиск по фото[/url]
https://editor.telescope.ac/blogs/xbet-promo-code/y0hroch2sxwd2uuk995p6k
Wow, this post is fastidious, my younger sister is
analyzing these kinds of things, so I am going to inform
her.
https://writefreely.ethibox.fr/teosr5wj7s
Excellent post. I was checking constantly this blog and
I’m impressed! Very helpful information specifically the last part 🙂 I care for such information a lot.
I was looking for this particular information for a long time.
Thank you and good luck.
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.
Hello, Neat post. There’s an issue along with your web site in internet explorer, might test this?
IE still is the marketplace chief and a good section of folks will miss your fantastic
writing due to this problem.
Kasyno Compensation bez Depozytu za Rejestracje to jedna z najbardziej popularnych
bod promocji oferowanych przez legalne platformy hazardowe online.
Tego typu compensation pozwala nowym uzytkownikom rozpoczac gre bez koniecznosci wplacania wlasnych srodkow na konto.
Wystarczy zazwyczaj zalozenie konta oraz spelnienie okreslonych warunkow
regulaminowych, aby otrzymac darmowe srodki lub darmowe obroty
na wybranych automatach. Dla wielu graczy jest to atrakcyjna
mozliwosc sprawdzenia funkcji kasyna bez ponoszenia dodatkowych kosztow.
From my experience, I’ve observed how these current platforms really focus heavily regarding player loyalty lately.
A single observation I discovered proves to be how the
play jonny bonus code frequently presents itself with far better honest conditions
compared to those older platforms us players used for deal alongside.
It’s really great for one to witness operators honestly providing for
long-term fun more than just fast deposits. Although looking
regarding a best play jonny no deposit bonus perks, I
tripped across that useful source inside play jonny casino no deposit bonus one
that showed its wagering specifics perfectly.
A further point stands how the playjonny no deposit bonus codes market stays turning far highly competitive, that just benefits
smart gamblers within this end. Sometimes I wonder if such top deposit ratios are sustainable regarding this operator inside that current market.
Do anyone out there believe how member points stay honestly truly important than the initial playjonny casino bonus at the end of the day?
What remains your favorite tactic to beating the
hard playthrough rules the days?
https://gifyu.com/xewati7549
https://galgame.dev/user/linebet074
Kasyno Recompense bez Depozytu za Rejestracje to
jedna z najbardziej popularnych form promocji oferowanych przez legalne platformy hazardowe online.
Tego typu perk pozwala nowym uzytkownikom rozpoczac gre
bez koniecznosci wplacania wlasnych srodkow na konto.
Wystarczy zazwyczaj zalozenie konta oraz spelnienie okreslonych
warunkow regulaminowych, aby otrzymac darmowe srodki lub darmowe obroty na wybranych automatach.
Dla wielu graczy jest to atrakcyjna mozliwosc sprawdzenia funkcji kasyna bez ponoszenia dodatkowych kosztow.
Wartościowy materiał. Mnóstwo konkretnych porad.
Dziękuję za ten materiał. Czekam na więcej.
Dokładnie – kwestia doboru mebli bywa wymagająca.
Przydatne podejście.
Bardzo przydatne. Szukałam czegoś takiego
od dawna. Super robota!
My web-site; http://Www.Parikmaher-Ekb.Ru
This is a very informative post about online casinos and betting platforms.
I especially liked how it explains the importance of choosing a
trusted site before signing up.
Many players often ask where they can find reliable gaming platforms with fair odds and
smooth payouts. From what I’ve seen, checking platforms like vn22vip helps users compare features, bonuses, and overall experience.
Thanks for sharing these insights — they’re helpful
for both beginners and experienced bettors.
https://kwork.ru/user/irinamoskow
https://www.blurb.com/user/starz88efx?profile_preview=true
This is a very informative post about online casinos and betting platforms.
I especially liked how it explains the importance of choosing a licensed site before signing up.
Many players often ask where they can find reliable gaming platforms with fair odds and smooth payouts.
From what I’ve seen, checking platforms like vn22vip helps users compare features, bonuses, and overall experience.
Thanks for sharing these insights — they’re helpful
for both beginners and experienced bettors.
https://www.telefoniy.ru/forum/index.php?id=1171172
Wow that was strange. I just wrote an extremely long comment but after I clicked submit my comment didn’t show up. Grrrr… well I’m not writing all that over again. Anyways, just wanted to say wonderful blog!
Toller Beitrag. Eine Menge wertvolle Anregungen. Vielen Dank für die Mühe.
Ich werde öfter reinschauen.
Genau – die Sache des Wohnstils wird oft anspruchsvoll.
Endlich mal Klartext.
Aufrichtig praxisnah. Ich habe schon nach ähnlichen Tipps seit Wochen gesucht.
Viele Grüße!
My homepage :: Marcia
It’s going to be ending of mine day, but before end I am reading this enormous article to improve my knowledge.
These are really great ideas in about blogging. You have touched some nice factors here.
Any way keep up wrinting.
Sachlicher Post. Viele nützliche Anregungen. Danke dass du dein Wissen teilst.
Ab jetzt lese ich hier öfter mit.
Sehe ich genauso – das Thema der Wohnungsgestaltung kann anspruchsvoll.
Gut, dass es jemand erklärt.
Sehr hilfreich. Ich war schon nach solchen Informationen seit Wochen gesucht.
Super Arbeit!
Also visit my homepage … Josie