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跑半个小时。显然不完美,蒙人没问题。
流媒体成人内容 在安全可靠的平台上进行。寻找
安全的流媒体中心 以获得一流体验。
Here is my web-site anal sex porn videos
This website was… how do I say it? Relevant!! Finally I’ve found something which helped me.
Thanks a lot!
Everything is very open with a clear description of the challenges.
It was truly informative. Your site is very helpful.
Thanks for sharing!
Hey there! This post couldn’t be written any better!
Reading this post reminds me of my good old room mate!
He always kept chatting about this. I will forward this page
to him. Pretty sure he will have a good read. Many thanks for sharing!
Hello, Neatt post. Ther iss a problem along wih yohr websitte in internwt explorer, might ceck this?
IE still iss thhe mareket chief andd a lare componeent to folks wull miss
yohr excelent wriging ddue tto thbis problem.
Feeel freee to surf too mmy wweb blog; coroa safada deu pra novinho
I know this if off topic but I’m looking into starting my own weblog and was curious what
all is needed to get set up? I’m assuming having
a blog like yours would cost a pretty penny? I’m not very web smart so
I’m not 100% sure. Any tips or advice would be greatly appreciated.
Kudos
We Advise You Charter out Apartments In Dubai
Post-haste And Safely. Find The Most artistically Deals, Prime Locations, And
Highest Stand From Our Experts.
We Advise You Hole Apartments In Dubai With all speed And Safely.
See The Most artistically Deals, Prime Locations,
And Enormously Reinforce From Our Experts.
Excellent web site you have got here.. It’s difficult to find excellent writing like yours nowadays.
I truly appreciate individuals like you! Take care!!
Наркотики ломают эндосимбионт и еще психику.
Стимуляторы (снежок, мефедрон, эфедрин)
сжигают ресурсы чиксачка, пробуждая инфаркты, неизлечимую гипертермию, тление лимфатический сосуд а также паранойю.
Каннабиноиды (ямба, спайсы) водят к полоумию, отказу почек и еще психозам.
Опиоиды (опиоид, метадон) парализуют чухалка, давать начало гниение тканей (а) также жестокосердную ломку.
Финал использования ПАВ — уступка организаций, фатуизм а
также смерть.
Hello there! Would you mind if I share your blog with my myspace group?
There’s a lot of people that I think would really enjoy your content.
Please let me know. Cheers
Wow, incredible blog format! How long have you been running a
blog for? you made running a blog look easy.
The overall glance of your web site is magnificent, let alone the content!
Rzeczowy wpis. Wiele wartościowych inspiracji.
Dziękuję za ten materiał. Na pewno tu wrócę.
Zgadzam się – sprawa urządzania wnętrz jest trudna. Dobrze, że ktoś to wyjaśnia.
Naprawdę pomocne. Szukałem czegoś takiego od dawna. Dziękuję!
Have a look at my web-site – Temnikova.ru
Hi would you mind letting me know which webhost you’re
working with? I’ve loaded your blog in 3 completely
different browsers and I must say this blog loads a lot quicker then most.
Can you recommend a good web hosting provider at a reasonable price?
Many thanks, I appreciate it!
check https://zksync-swap.github.io for current pools and routing details.
Hello there! This is my first visit to your blog! We are a group 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 outstanding job!
anyone else use https://hyperliquid-usa.github.io/ for quick announcements and links?
i referenced https://wormholebridge.github.io when debugging guardian signatures yesterday.
This is my first time pay a quick visit at here and
i am genuinely impressed to read all at alone place.
クロアチア ユニフォーム 通販| 大人、女性、キッズの激安ユニフォームをご用意しています。お気に入りのサッカーユニフォームを安心・簡単に購入できます。ご自宅まで迅速にお届けします。
Your means of describing the whole thing in this article is genuinely nice, every one be capable of without difficulty understand
it, Thanks a lot.
Great post! I really enjoyed reading your insights on this topic.
The information was presented in a clear and easy-to-understand way, making it useful for both beginners
and experienced readers. Thanks for taking the time to share
your knowledge and experience. Looking forward to reading more content from you in the future.
Excellent beat ! I wish to apprentice while you amend your site, how can i subscribe for a blog site?
The account aided me a acceptable deal. I had been a little
bit acquainted of this your broadcast provided bright clear concept
Sachlicher Text. Jede Menge hilfreiche Informationen. Grüße für den Beitrag.
Ich empfehle die Seite gerne weiter.
Treffend formuliert – das Thema der Einrichtung ist nicht
einfach. Endlich mal Klartext.
Aufrichtig hilfreich. Ich war schon nach so etwas genau danach gesucht.
Danke!
Take a look at my blog post … https://www.folkdbookmark.Club/
Toller Beitrag. Jede Menge hilfreiche Anregungen. Grüße dass du dein Wissen teilst.
Ich warte auf mehr.
Sehe ich genauso – der Bereich der Raumgestaltung kann herausfordernd.
Danke für die klare Erklärung.
Sehr inspirierend. Ich habe schon nach solchen Informationen genau danach gesucht.
Danke!
Feel free to surf to my web blog … http://www.Webbuzz.In
ยาสอดทำแท้งมีกี่ชนิด
ยาสอดทำแท้งมีหลายชนิดที่ใช้ได้ในกระบวนการทำแท้งเจตนา ตัวอย่างของยาสอดทำแท้งที่ใช้แพร่หลายได้แก่:
1. Mifepristone (RU-486, Mifeprex): เป็นยาที่ใช้ในการยับยั้งฮอร์โมนที่จำเป็นสำหรับการติดต่อตระกูล
มักใช้ร่วมกับยา Misoprostol.
2. Misoprostol: เป็นยาที่ใช้เพื่อกระตุ้นการตกของรังไข่จากมดลูก มักใช้ร่วมกับยา Mifepristone หรืออาจใช้เป็นตัวเดียวก็ได้.
3. Methotrexate: เป็นยาที่ใช้ในกระบวนการทำแท้งเจตนา โดยกระตุ้นการตกของรังไข่ ยานี้มักใช้ในระยะเริ่มต้นของการตั้งครรภ์.
line : @2planned
https://cy2tec.com/blog5.html
Hey, ich habe das Forum durchgeblättert und mir ist aufgefallen, dass das Thema hervorragend beschrieben ist. Ich selbst bin gerade dabei, mein Haus und jeder Ratschlag hilft mir weiter. Einen schönen Tag euch allen.
Spannender Thread. Ich möchte hinzufügen, dass die Auswahl der Möbel wirklich einen Unterschied macht. Es lohnt sich, dafür Zeit zu nehmen.
Appreciating the dedication you put into your website and detailed information you provide.
It’s good to come across a blog every once in a while that isn’t the
same outdated rehashed information. Wonderful read!
I’ve saved your site and I’m adding your RSS feeds to my Google account.
Guten Tag, ich habe nach Informationen zum Einrichten gesucht und ich möchte sagen, dass das Thema hervorragend beschrieben ist. Ich selbst bin gerade dabei, die Einrichtung neu zu und solche Tipps sind echt hilfreich. Grüße an die Forengemeinde.
Interessante Diskussion. Ich möchte hinzufügen, dass die Raumgestaltung eine enorme Rolle spielt. Lieber einmal richtig als zweimal.
Feel free to visit my website https://Ajuda.Cyber8.Com.br/index.php/Vorh%C3%A4nge_und_Gardinen_%E2%80%93_Mehr_als_nur_Dekoration_f%C3%BCr_dein_Zuhause
Grüße euch, ich bin hier durch Zufall gelandet und mir ist aufgefallen, dass man hier echt was mitnimmt. Ich selbst gestalte gerade die Einrichtung neu zu und jeder Hinweis ist Gold wert. Liebe Grüße in die Runde.
Spannender Thread. Meiner Meinung nach die Raumgestaltung nicht zu unterschätzen ist. Gut Ding will Weile haben.
These are genuinely enormous ideas in about blogging.
You have touched some good factors here. Any way
keep up wrinting.
Witajcie, trafiłem tu przypadkiem i stwierdzam, że jest tu sporo wartościowych treści. Sam właśnie teraz urządzam mieszkanie i szukam inspiracji. Pozdrawiam forumowiczów.
Ciekawa dyskusja. Z mojego doświadczenia aranżacja wnętrza naprawdę robi różnicę. Warto poświęcić temu czas.
Feel free to surf to my web page https://Abgodnessmoto.co.uk/index.php?page=user&action=pub_profile&id=303845
Thanks a bunch for sharing this with all folks you really understand what you’re speaking about!
Bookmarked. Please also discuss with my website =). We can have a link exchange agreement between us
Hurrah, that’s what I was exploring for, what a information! existing
here at this web site, thanks admin of this website.
Also visit my blog post; backyard deck company
Many thanks! Good information.
Menurut saya, slots online yang baik bukan hanya masalah jumlahnya game,
tetapi juga bab kestabilan server dan keringanan akses .
Maka kapan saja pengin bermain, seluruhnya berasa lebih lancar serta ringkas.
Appreciate this post. Will try it out.
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 various websites for about
a year and am concerned about switching to another platform.
I have heard good things about blogengine.net. Is there a way I can transfer
all my wordpress posts into it? Any help would be greatly appreciated!
Here is my web-site … buy
I do trust all of the concepts you’ve presented in your post.
They’re really convincing and will definitely work.
Nonetheless, the posts are very short for novices. May you
please lengthen them a little from next time?
Thank you for the post.
Dzień dobry, trafiłem tu przypadkiem i muszę przyznać, że temat jest świetnie opisany. Sam od jakiegoś czasu zmieniam wystrój i każda wskazówka jest na wagę złota. Miłego dnia wszystkim.
Wartościowy wątek. Moim zdaniem dobór mebli naprawdę robi różnicę. Lepiej raz a dobrze.
Baixe vídeos privados não apenas do YouTube, mas também do Facebook, Vimeo,
Bilibili e muitos outros sites.
What’s up, after reading this awesome piece of writing i am as well cheerful to share my familiarity here with colleagues.
ксгорун официальный сайт вход
Definition Audio is a trusted sound system installation company delivering professional commercial audio solutions throughout the
UK. Our experienced team specialises in restaurant
sound system installations, commercial sound system installations, church sound system installations, and outdoor sound system installations tailored to each venue’s
unique requirements. From public address systems and
background music solutions to multi-zone audio and outdoor speaker networks, we provide complete design, supply, and installation services.
Whether you’re operating a restaurant, hotel, school, gym,
sports hall, church, wedding venue, factory, boardroom,
or leisure centre, Definition Audio ensures exceptional sound quality, reliable performance,
and user-friendly audio control systems that enhance communication and customer experiences.
I’m not sure exactly why but this site is loading incredibly slow for me.
Is anyone else having this problem or is it a issue on my end?
I’ll check back later on and see if the problem still exists.
An outstanding share! I have just forwarded this onto a
colleague who has been doing a little research on this.
And he in fact ordered me dinner simply because I discovered it for him…
lol. So allow me to reword this…. Thank YOU for the meal!!
But yeah, thanks for spending the time to talk about this matter here on your web site.
Dzień dobry, przeglądałem forum i stwierdzam, że jest tu sporo wartościowych treści. Sama od jakiegoś czasu urządzam mieszkanie i szukam inspiracji. Pozdrawiam serdecznie.
Ciekawa dyskusja. Z mojego doświadczenia wybór kolorystyki to podstawa. Warto poświęcić temu czas.
Всем привет, я думаю, что это отличный ресурс с взломами.
Случайно попал на него 😉 Я обязательно возвращаться снова, потому что сохранил его.
скачать мега мод на телефон — загляните при случае.
I think the admin of this site is really working hard
in support of his website, for the reason that here every material is quality based material.
Amazin hings here. I aam veryy hasppy too seee your article.
Thqnks sso mujch andd I’m looling forfward too tluch you.
Wiill yoou kindky drp mme a mail? ofvd9wuaptbpd53qtn9c