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跑半个小时。显然不完美,蒙人没问题。
بطور خلاصه
برای اون دسته علاقهمندها
فضای شرطبندی آنلاین
پیگیر هستن
این سیستم آنلاین
میتونه
کاربردی دربیاد
جالبتراینکه
پروژههایی مثل
enfејaronline شناخته شده
و
sibƅet شناخته شده
هم در این حوزه فعال هستن
در یک نگاه
دلنشین بود
و
حتما
باز هم سر میزنم
my web site: ✅ Final Disclaimer
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.
Cabinet IQ
8305 Statre Hwy 71 #110, Austin,
TX 78735, Unitedd Ⴝtates
254-275-5536
3Ddesign
Excellent site. Plenty of helpful information here. I’m sending it to a
few friends ans also sharing in delicious. And obviously, thanks to your sweat!
What’s up it’s me, I am also visiting this site on a regular basis, this web page
is actually pleasant and the viewers are really sharing nice thoughts.
Hello There. I found your blog using msn. This is a very well written article.
I will be sure to bookmark it and return to read more of your useful info.
Thanks for the post. I’ll definitely return.
This is really interesting, You’re an overly skilled
blogger. I have joined your rss feed and stay up for in the
hunt for extra of your great post. Also, I have shared your site in my social networks
Its such as you read my thoughts! You appear to know a lot approximately this, like you wrote
the e book in it or something. I believe that you could do with some % to force the message house a little bit, but instead of that,
this is wonderful blog. A fantastic read. I’ll definitely be back.
What’s up, just wanted to mention, I liked this post.
It was inspiring. Keep on posting!
We’re a group of volunteers and starting a new scheme
in our community. Your website provided us with valuable information to work on. You’ve
done a formidable job and our entire community will be thankful to you.
If you are going for finest contents like myself, just pay a quick visit
this web site every day as it offers quality contents, thanks
What’s up everyone, it’s my first visit at this web page, and article is truly fruitful in favor
of me, keep up posting these articles or reviews.
Its like you learn my thoughts! You seem to know
a lot about this, like you wrote the book in it or something.
I feel that you simply could do with some percent
to pressure the message house a little bit, however instead of
that, that is great blog. A great read. I will
certainly be back.
Genuinely no matter if someone doesn’t be aware of afterward its up to other people that they will
assist, so here it occurs.
Do you mind if I quote a few of your posts as long as I provide credit
and sources back to your website? My blog is
in the very same niche as yours and my users would certainly benefit from a lot of the information you present here.
Please let me know if this okay with you. Thanks!
Hey there, You have done an incredible job.
I will definitely digg it and personally suggest to my
friends. I’m confident they will be benefited from this site.
Your style is really unique compared to other people I’ve read stuff from.
I appreciate you for posting when you’ve got the opportunity, Guess I’ll just
book mark this blog.
Awesome issues here. I am very satisfied to peer your article.
Thank you so much and I am taking a look ahead to touch you.
Will you kindly drop me a mail?
What a stuff of un-ambiguity and preserveness of valuable familiarity concerning unexpected feelings.
I have to thank you for the efforts you have put in penning this website.
I am hoping to see the same high-grade blog posts by you in the future as well.
In fact, your creative writing abilities has
encouraged me to get my own website now 😉
It’s in fact very complex in this full of activity life to listen news on TV, therefore
I simply use the web for that reason, and get the hottest
news.
First of all I would like to say superb blog!
I had a quick question that I’d like to ask if you don’t mind.
I was interested to find out how you center yourself and clear your thoughts
before writing. I’ve had trouble clearing my thoughts in getting my ideas out there.
I truly do take pleasure in writing but it just seems like the first
10 to 15 minutes are generally lost simply
just trying to figure out how to begin. Any ideas or
hints? Appreciate it!
bookmarked!!, I really like your website!
https://jm-rencontre.net/
Very shortly this web page will be famous among all
blogging people, due to it’s nice posts
Howdy I am so glad I found your blog page, I really found you by accident,
while I was searching on Bing for something else, Anyways I am here now and
would just like to say cheers for a incredible post and a all
round interesting blog (I also love the theme/design), I don’t
have time to go through it all at the moment but I have bookmarked it and also added your RSS feeds, so when I have time I
will be back to read more, Please do keep up the fantastic work.
Undeniably believe that which you said. Your favorite justification appeared to be on the web the simplest factor to take into account of.
I say to you, I certainly get irked at the same time as other folks think about issues that they plainly do not understand about.
You controlled to hit the nail upon the top and also defined out the entire thing without having side effect , folks could take a signal.
Will likely be again to get more. Thank you
I loved as much as you’ll receive carried out right here.
The sketch is tasteful, your authored material stylish.
nonetheless, you command get bought an shakiness over that you wish be delivering the following.
unwell unquestionably come further formerly again as exactly the same nearly a lot often inside case you shield this increase.
به طور کلی
برای افرادی که قصد دارن
بازیهای شرطی
فعال هستن
این مجموعه آنلاین
کاملاً میتونه
جزو بهترینها باشه
همچنین
سایتهایی مثل
enfejaronline جدید
و
sib-Ьet
کاربرای زیادی دارن
در پایان
ارزش داشت
و
بازم
استفاده دوباره میکنم
Also visit my sitе … الگوریتم ضرایب و شفافیت در رابت: آیا واقعاً منصفانه است؟
Way cool! Some extremely valid points! I appreciate you
penning this write-up and also the rest of the site is also very good.
Hi! Do you know if they make any plugins to help with
SEO? I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good results.
If you know of any please share. Kudos!
Igualmente es importantísimo repartir ese fondo en partes más reducidas.
Si tenés $10,000 ARS para la semana, no los uses todos en una sola noche.
Estirá en sesiones de $1,500-$2,000 para maximizar la entretenimiento.
I am regular reader, how are you everybody? This paragraph posted at this web site is in fact pleasant.
It’s very trouble-free to find out any topic on net
as compared to books, as I found this article at this site.
Wow, incredible weblog format! How long have
you ever been running a blog for? you made blogging
look easy. The entire glance of your web site is magnificent, as well as
the content!
Unquestionably consider that that you stated. Your favorite justification seemed
to be on the net the easiest thing to take into accout of.
I say to you, I certainly get annoyed while folks consider issues that they plainly do not recognize about.
You managed to hit the nail upon the top and outlined out the
entire thing with no need side effect , folks could
take a signal. Will probably be back to get more.
Thank you
Paragraph writing is also a excitement, if you be familiar with then you can write otherwise it is difficult to write.
Have you ever thought about adding a little bit more than just
your articles? I mean, what you say is fundamental and everything.
However think of if you added some great photos or videos to give your posts more, “pop”!
Your content is excellent but with pics and clips, this website
could undeniably be one of the very best in its field.
Good blog!
Hello! This is kind of off topic but I need some advice from an established blog.
Is it very hard to set up your own blog? I’m not
very techincal but I can figure things out pretty fast.
I’m thinking about making my own but I’m not sure where to begin. Do you have any ideas or suggestions?
Thank you
Hi! This is kind of off topic but I need some guidance from an established blog.
Is it very difficult to set up your own blog? I’m not very techincal but I
can figure things out pretty quick. I’m thinking about making my own but
I’m not sure where to start. Do you have any tips or suggestions?
Appreciate it
Marvelous, what a blog it is! This webpage gives useful facts
to us, keep it up.
Then I minutely examined my clothes and thought thateverything looked old,worn and threadbare.フィギュア 無 修正
Hi, I desire to subscribe for this website to obtain hottest updates, so where can i do it please assist.
Thanks on your marvelous posting! I quite enjoyed reading it, you could be a great author.I will always bookmark your blog
and will often come back later in life.
I want to encourage you to definitely continue your great job, have a nice afternoon!
Hello very cool blog!! Guy .. Excellent .. Amazing .. I’ll bookmark your
web site and take the feeds also? I’m glad to seek out a lot of helpful info here within the submit, we’d like develop extra strategies on this regard, thanks for
sharing. . . . . .
멋진 제출, 매우 유익합니다. 이 분야의 다른 전문가들이 왜 이것을 눈치채지 못하는지 궁금합니다.
당신은 글쓰기를 계속해야 합니다. 저는, 당신은 이미
훌륭한 독자층을 가지고 있습니다!
If you want to get a great deal from this piece of writing then you have to apply such
techniques to your won webpage.
I loved as much as you will receive carried out right here.
The sketch is tasteful, your authored material
stylish. nonetheless, you command get bought an edginess over that you
wish be delivering the following. unwell unquestionably
come more formerly again as exactly the same nearly very often inside case you shield
this increase.
This post is actually a fastidious one it assists new web
viewers, who are wishing in favor of blogging.
I visited multiple sites but the audio quality for audio songs present at
this website is truly superb.
my site; buffets
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.
Fine way of describing, and pleasant paragraph to take facts about my presentation focus, which
i am going to present in college.