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跑半个小时。显然不完美,蒙人没问题。
Sachlicher Artikel. Reichlich praktische Informationen. Vielen Dank für diesen Inhalt.
Ich speichere mir die Seite ab.
Volle Zustimmung – das Thema der Einrichtung wird oft schwierig.
Endlich mal Klartext.
Wirklich hilfreich. Ich habe schon nach so etwas seit einiger Zeit gesucht.
Viele Grüße!
Here is my site Kris
I must thank you for the efforts you have put in penning this website.
I am hoping to see the same high-grade content by you later on as well.
In fact, your creative writing abilities has inspired me to get my own website now 😉
Great to see this service! uvprintone.com offers top-tier UV
printing solutions that provide long-lasting,
vibrant results for any project.
My homepage; UV printing for architectural glass
I’m curious to find out what blog system you’re using?
I’m experiencing some small security issues with
my latest website and I would like to find something more risk-free.
Do you have any suggestions?
Artikel yang sangat informatif dan bermanfaat. Banyak orang di Indonesia mencari informasi terpercaya tentang viagra indonesia dan kesehatan pria.
Penting untuk memahami penggunaan yang aman dan memilih sumber yang tepat.
Terima kasih atas informasi ini. Topik viagra
indonesia memang sering dicari oleh banyak pengguna saat ini.
Edukasi yang benar sangat penting agar penggunaan tetap
aman dan efektif.
Konten yang bagus dan mudah dipahami. Informasi tentang viagra indonesia dapat membantu banyak
orang yang membutuhkan solusi kesehatan pria dengan cara yang aman dan terpercaya.
Postingan yang sangat membantu. Banyak pengguna mencari informasi seputar viagra indonesia dan panduan penggunaan yang tepat.
Artikel seperti ini sangat berguna bagi pembaca.
Artikel berkualitas dan penuh informasi. Pembahasan mengenai viagra
indonesia sangat menarik dan relevan bagi mereka yang ingin mengetahui lebih banyak tentang kesehatan pria.
Have you ever thought about adding a little bit more than just
your articles? I mean, what you say is important and all. 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 definitely be one of the very best in its field.
Wonderful blog!
It’s awesome for me to have a web page, which is beneficial in support of my knowledge.
thanks admin
Wow! This blog looks exactly like my old one! It’s on a completely different
topic but it has pretty much the same layout and design. Excellent choice of colors!
Дубликаты государственных номеров на авто в Москве доступны для заказа
в кратчайшие сроки дубликат номера автомобиля купить обращайтесь к нам для получения надежной помощи и гарантии результата!
There’s certainly a great deal to learn about this issue.
I love all the points you have made.
Cabinet IQ
8305 Ѕtate Hwy 71 #110, Austin,
TX 78735, United States
254-275-5536
Kitchenmakeover
J.Fox,人形 エロ
I really liie youur blog.. very niice colors & theme. Diid you
maake tthis webssite youjrself orr did youu hire someobe too ddo iit ffor you?
Plzz nswer back ass I’m lookinng too create mmy own blg
annd woould likoe tto kno where u ggot thbis from.
thans a lot
my blog … xmxxtube.com
I know this web site gives quality based articles and additional information, is there any other web site
which offers these data in quality?
May I simply say what a comfort to uncover someone
that truly knows what they are talking about on the internet.
You certainly understand how to bring an issue to light and make it important.
More people should check this out and understand this side of the story.
I was surprised that you’re not more popular given that you certainly
possess the gift.
Have you ever thought about publishing an ebook or guest authoring
on other sites? I have a blog centered on the same information you discuss and would love to have
you share some stories/information. I know my viewers would appreciate your work.
If you are even remotely interested, feel
free to shoot me an e mail.
UU88 ⭐️ Trang Chủ UU88.Com TOP 1 Việt Nam | ĐK UU 88 +88K
My developer is trying to convince me to move to .net from PHP.
I have always disliked the idea because of the costs. But he’s
tryiong none the less. I’ve been using Movable-type on several
websites for about a year and am anxious about switching to another platform.
I have heard fantastic things about blogengine.net.
Is there a way I can transfer all my wordpress posts into it?
Any kind of help would be greatly appreciated!
References:
Pai gow poker online katrinaawzy974826.vblogetin.com
I’ve learn some excellent stuff here. Certainly value bookmarking for revisiting.
I surprise how so much attempt you put to make this kind of great informative
web site.
References:
Winpalace https://fayzvbx955638.collectblogs.com/86213986/casino-of-gold-dein-ultimativer-guide
Hilfreicher Inhalt. Zahlreiche praktische Hinweise.
Großes Lob für diesen Inhalt. Ich warte auf mehr.
Treffend formuliert – das Thema der Raumgestaltung kann nicht
einfach. Danke für die klare Erklärung.
Sehr hilfreich. Ich habe schon nach solchen Informationen lange gesucht.
Danke!
my blog post Elvera
Valuable information. Fortunate me I found your site
by chance, and I am surprised why this twist of fate didn’t happened in advance!
I bookmarked it.
Its not my first time to visit this website,
i am browsing this website dailly and obtain fastidious facts from
here everyday.
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 could do with some pics to drive the message home a bit, but other than that, this is fantastic blog.
A fantastic read. I’ll certainly be back.
Then the mother signed to Vasya to follow her quietly andcautiously into the next room.女性 用 ラブドールIt must be admitted that she treatedLizanka rather unfairly: she behaved treacherously to her daughter,
در کل ماجرا
برای افرادی که قصد دارن
بازی انفجار آنلاین
در حال بررسی هستن
این پلتفرم شرطی
به نظر گزینه باشه
جزو بهترینها باشه
یه نکته مهم اینه که
برندهایی مثل
enfеjaronline آنلاین
و
ѕib-bet
شناخته شده هستن
در پایان
برام جالب بود
و
باز هم
میام سراغش
My webpage :: مطالعه موردی: داستانهای عبرتآموز برندگان بختآزمایی
Why users still use to read news papers when in this technological
globe everything is accessible on net?
but Ispare you.激安 ラブドールAnd it is good for a man not to touch a woman.
TR88 – Link Đăng Ký Nhà Cái Chính Thức Nhận Thưởng Lớn
This piece of writing will assist the internet people for creating new website or even a weblog
from start to end.
Woah! I’m really loving the template/theme of this website.
It’s simple, yet effective. A lot of times it’s difficult to get that “perfect balance” between user friendliness
and appearance. I must say you’ve done a superb job with this.
In addition, the blog loads very quick for me on Opera.
Outstanding Blog!
Toller Inhalt. Jede Menge praktische Anregungen. Großes Lob für den Beitrag.
Ich werde öfter reinschauen.
Sehe ich genauso – das Thema der Einrichtung
kann schwierig. Danke für die klare Erklärung.
Aufrichtig nützlich. Ich habe schon nach ähnlichen Tipps seit Wochen gesucht.
Klasse gemacht!
Look at my homepage :: Karabast.com
Tham gia H3BET và trải nghiệm một thế giới game trực tuyến hoàn toàn mới.
Nền tảng được cấp phép, thanh toán nhanh chóng
và hỗ trợ 24/7.
Inspiring quest there. What happened after? Take care!
Hi there, I enjoy reading all of your article. I like to write a little
comment to support you.
Very shortly this web page will be famous among all blogging viewers, due to it’s fastidious
posts
I do consider all of the ideas you have introduced on your
post. They’re really convincing and can certainly work.
Nonetheless, the posts are too short for beginners. May you please extend
them a little from next time? Thank you for the post.
Sachlicher Beitrag. Viele praktische Anregungen. Super für diesen Inhalt.
Ab jetzt lese ich hier öfter mit.
Sehe ich genauso – das Thema der Möbelauswahl
ist herausfordernd. Gut, dass es jemand erklärt.
Wirklich praxisnah. Ich habe schon nach genau so einem Beitrag lange gesucht.
Super Arbeit!
Take a look at my web page: Susie
Hey there! This is my first visit to your blog! We are a team of
volunteers and starting a new initiative in a community in the same niche.
Your blog provided us useful information to work on. You have done
a marvellous job!
Hi, i read your blog from time to time and i own a similar one and i was just wondering if you
get a lot of spam comments? If so how do you stop it, any plugin or anything you can recommend?
I get so much lately it’s driving me mad so any support is very much appreciated.
unblocked games
I am now not sure the place you’re getting your info, however
great topic. I needs to spend some time learning much more or working out more.
Thank you for great information I used to be looking for this info for my
mission.
This is very interesting, You’re a very skilled blogger.
I’ve joined your rss feed and look forward to seeking more of your wonderful post.
Also, I’ve shared your website in my social networks!
Hi, its good post on the topic of media print, we
all know media is a impressive source of facts.
https://jm-cougar.net/
Hmm is anyone else encountering problems with the images on this blog loading?
I’m trying to figure out if its a problem on my end or if it’s the blog.
Any suggestions would be greatly appreciated.
Very great post. I just stumbled upon your weblog and wished to say that I’ve truly loved surfing
around your blog posts. After all I’ll be subscribing for your feed and I hope you write again soon!
Pretty! This has been an incredibly wonderful post.
Many thanks for supplying these details.
What’s up, after reading this awesome article i am too cheerful to share my experience here with colleagues.
Download PipeFlare App for Android apk file https://www.apkfiles.com/apk-621134/download-pipeflare-app-for-android
Saved as a favorite, I love your web site!