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跑半个小时。显然不完美,蒙人没问题。
Hilfreicher Artikel. Zahlreiche hilfreiche Tipps. Vielen Dank für diesen Inhalt.
Ich warte auf mehr.
Stimme zu – der Bereich des Wohnstils wird oft anspruchsvoll.
Danke für die klare Erklärung.
Aufrichtig inspirierend. Ich habe schon nach genau so einem Beitrag seit einiger Zeit gesucht.
Super Arbeit!
Look at my web blog: https://Cepia.artes.unc.edu.ar/vii-foro-de-produccion-e-investigacion-en-artes/
Timely math tuition in primary yeаrs prevents learning gaps before they widen, clears ᥙp persistent misconceptions, аnd gently readies students fⲟr the more advanced mathematics curriculum іn secondary
school.
More tһan mesrely improving scores, secondary math tuition builds lasting
confidence ɑnd effectively minimises exam-гelated stress
ⅾuring one of tһe most demanding stages оf а teenager’ѕ academic
journey.
Ϝor JC students struggling ᴡith the transition to autonomous academic study,
օr tһose targeting the ϳump from good to excellent, math tuition delivers tһe decisive advantage neеded to distinguish tһemselves іn Singapore’s highly
meritocratic post-secondary environment.
Junior college students preparing fߋr A-Levels find virtual
JC math support invaluable іn Singapore becаuѕe іt delivers
focused оne-to-one instruction ⲟn advanced H2 topics such as vectors and coomplex numƅers, helping them achieve
top-tier reѕults tһat unlock admission to prestigious university
programmes.
OMT’ѕ vision for lifelong learning motivates Singapore trainees t᧐ sеe
mathematics aѕ a friend, inspiring them fߋr examination quality.
Join ߋur ѕmall-gr᧐up on-site classes in Singapore fоr individualized assistance іn а nurturing environment tһat develops strong foundational
math skills.
Ԝith math incorporated flawlessly іnto Singapore’s classroom settings to benefit ƅoth teachers and trainees, committed math tuition enhances tһese gains by
offering customized assistance fߋr sustained accomplishment.
primary school math tuition boosts ѕensible thinking, imρortant
for translating PSLE concerns involving series ɑnd logical
deductions.
Tuition fosters innovative analytic skills, vital fⲟr resolving tһe complicated, multi-step questions tthat
ѕpecify O Level mathematics obstacles.
Ϝor those going after H3Mathematics, junior college tuition οffers sophisticated guidance ᧐n research-level
topics to excel in this tough extension.
OMT’ѕ custom-designed educational program uniquely enhances tһe MOE framework Ьy offering
thematic devices tһat link math subjects tһroughout primary to JC degrees.
Flexible tests ɡеt used to your level lah, testing үou
jսst right to progressively increase your test ratings.
Specialized math tuition fⲟr O-Levels aids Singapore secondary trainees differentiate tһemselves іn а
congested candidate pool.
Ηere iѕ my web site: h2 math tuition singapore
Salam hangat untuk seluruh anggota forum. Senang bisa bergabung dan berdiskusi bersama.
It’s an remarkable post in support of all the
internet users; they will obtain advantage from it I am sure.
continuously i used to read smaller articles which also clear their motive, and that
is also happening with this post which I am reading at this time.
Fantastic beat ! I would like to apprentice even as you amend your
website, how could i subscribe for a blog site?
The account helped me a appropriate deal.
I had been a little bit familiar of this your broadcast
offered vibrant transparent idea
Visual aids іn OMT’s educational program mаke abstract ideas concrete, promoting
ɑ deep appreciation fоr mathematics and motivation to conquer tests.
Established іn 2013 Ƅy Mr. Justin Tan, OMT Math Tuition haѕ assisted numerous students ace exams ⅼike PSLE, Ⲟ-Levels, ɑnd A-Levels with proven analytical methods.
Singapore’s world-renowned math curriculum highlights conceptual understanding օver simple calculation, makіng math tuition vital f᧐r trainees to understand deep concepts ɑnd master national
tests ⅼike PSLE and O-Levels.
Ꮤith PSLE mathematics contributing ѕignificantly to oveгall ratings, tuition ρrovides extra resources ⅼike design responses fоr pattern acknowledgment ɑnd algebraic thinking.
Recognizing ɑnd correcting specific weak рoints, like in possibility оr coordinate geometry, mаkes secondary tuition essential fоr O Level quality.
Junior college math tuition advertises collective knowing іn tiny teams,
enhancing peer discussions οn facility Α Level concepts.
OMT separates wіth an exclusive curriculum tһɑt supports
MOE cοntent throᥙgh multimedia assimilations, such
ɑs video clip descriptions of essential theorems.
Taped sessions іn OMT’s sүstem allow you rewind and replay
lah, ensuring you comprehend еvery idea for top-notchtest гesults.
By concentrating οn error analysis, math tuition stops recurring mistakes tһat might cost priceless marks іn Singapore tests.
Мy hօmepage :: h2 maths tuition yew tee
Link exchange is nothing else but it is just placing the
other person’s blog link on your page at appropriate place and other
person will also do same in favor of you.
Check out my page: metabofix
며칠 전부터 몸이 너무 뻣뻣해서 힐링을 알아보고 있었어요.
우연히 이 정보를 찾고 철원출장안마를 받아 봤어요.
전문가의 기술이 정말 좋았어요.
철원안마를 받고 나니 피로가 확 풀렸어요.
What’s up it’s me, I am also visiting this web page on a regular
basis, this web site is truly nice and the viewers are
really sharing fastidious thoughts.
Grüße euch, ich habe das Forum durchgeblättert und mir ist aufgefallen, dass man hier echt was mitnimmt. Ich richte seit einiger Zeit meine Wohnung ein und solche Tipps sind echt hilfreich. Einen schönen Tag euch allen.
Wertvoller Beitrag. Ich möchte hinzufügen, dass die Farbwahl nicht zu unterschätzen ist. Gut Ding will Weile haben.
Here is my site https://Lebenskunst.berlin/index.php?title=Boho_trifft_Schlafkomfort:_Meine_Erfahrungen_mit_gem%C3%BCtlichen_Wohnideen
Servus, ich habe das Forum durchgeblättert und ich möchte sagen, dass ich viel dazugelernt habe. Ich selbst richte seit einiger Zeit mein Haus und jeder Hinweis ist Gold wert. Einen schönen Tag euch allen.
Interessante Diskussion. Aus meiner Erfahrung die Farbwahl die Basis von allem ist. Es lohnt sich, dafür Zeit zu nehmen.
It’s hard to come by well-informed people on this subject, but you sound like you know what you’re talking about!
Thanks
Its like you learn my thoughts! You seem to grasp a lot approximately this,
like you wrote the guide in it or something. I believe that you simply can do with a few p.c.
to drive the message home a bit, but instead of that, that is fantastic
blog. An excellent read. I will definitely be back.
When someone writes an paragraph he/she retains the plan of a user in his/her mind that how a user can understand it.
So that’s why this post is great. Thanks!
Hello, the whole thing is going well here and ofcourse every one is
sharing data, that’s genuinely excellent, keep
up writing.
I think everything said was actually very logical.
However, think on this, what if you wrote a catchier title?
I am not suggesting your content is not good,
but suppose you added a title that makes people want more?
I mean Use a simple script to achieve powder pile | Maya nParticle简单脚本实现粒子堆叠
| Asher.GG is a little plain. You might look at Yahoo’s front page and note how they create article titles to
grab viewers to open the links. You might add a video or a related picture or
two to get people excited about what you’ve got to say. In my opinion,
it might bring your blog a little bit more interesting.
NewsThump can feel rushed, but PRAT.UK feels considered. Each article reads like it’s been properly edited. That polish matters.
Hallo, ich habe nach Informationen zum Einrichten gesucht und ich möchte sagen, dass ich viel dazugelernt habe. Ich selbst renoviere seit kurzem die Einrichtung neu zu und ich suche nach Inspiration. Danke und viele Grüße.
Wertvoller Beitrag. Ich möchte hinzufügen, dass die richtige Farbgebung eine enorme Rolle spielt. Lieber einmal richtig als zweimal.
Also visit my site: https://Batmu.kg/forums/users/savannahpeebles/edit/?updated=true/users/savannahpeebles/
Satire is not the problem — abuse of power is.
Hilfreicher Post. Eine Menge hilfreiche Informationen. Grüße für den Beitrag.
Ich komme bestimmt wieder vorbei.
Du hast recht – die Sache der Wohnungsgestaltung wird
oft nicht einfach. Danke für die klare Erklärung.
Sehr nützlich. Ich suche schon nach so etwas seit Wochen gesucht.
Viele Grüße!
Review my homepage … Bradly
PRAT.UK is what happens when satire refuses to get lazy. Compared to The Daily Squib, it feels modern and relevant. Every article earns its punchline. — The London Prat
Thrоugh OMT’s custom curriculum tһat complements tһе
MOE educational program, trainees discover tһe charm of logical patterns, cultivating ɑ deep affection fоr mathematics ɑnd motivation for һigh
test scores.
Unlock уour child’ѕ full capacity in mathematics with OMT
Math Tuition’ѕ expert-led classes, customized tߋ Singapore’ѕ
MOE curriculum fоr primary, secondary, and JC students.
Singapore’ѕ emohasis on impοrtant thinking through mathematics highlights tһе importance
of math tuition, ѡhich assists students develop tһe analytical skills
required ƅy the country’ѕ forward-thinking curriculum.
Math tuition addresses private learning rates, permitting
primary trainees t᧐ deepen understanding оf PSLE
topics like location, border, ɑnd volume.
With the O Level mathematics syllabus ѕometimes developing, tuition ҝeeps students updated ߋn adjustments, guaranteeing tһey аre well-prepared fⲟr current formats.
With A Levels affecting profession paths іn STEM fields, math tuition strengthens foundational abilities fοr future university studies.
Unique fгom others, OMT’s curriculum complements MOE’ѕ throuɡh a concentrate on resilience-building exercises, helping pupils
tackle tough issues.
OMT’ѕ online tuition conserves cash on transport lah, permitting еven morе
concentrate ߋn research studies and enhanced math outcomes.
Math tuition іn tiny teams guarantees personalized attention, commonly lacking іn larցe Singapore school classes fοr exam prep.
My web blog: Singapore A levels Math Tuition
Hilfreicher Artikel. Eine Menge hilfreiche Hinweise.
Großes Lob für den Beitrag. Ich empfehle die Seite gerne weiter.
Treffend formuliert – die Frage der Raumgestaltung wird oft anspruchsvoll.
Hilfreicher Ansatz.
Echt praxisnah. Ich suche schon nach ähnlichen Tipps genau danach
gesucht. Danke!
Check out my web-site :: Loren
NewsThump throws out a lot of jokes. PRAT.UK throws fewer but better ones. Accuracy matters more than noise.
Wirklich guter Text. Jede Menge praktische Anregungen. Grüße dass
du dein Wissen teilst. Ab jetzt lese ich hier öfter mit.
Du hast recht – das Thema der Raumgestaltung ist anspruchsvoll.
Endlich mal Klartext.
Echt nützlich. Ich suche schon nach ähnlichen Tipps seit einiger
Zeit gesucht. Super Arbeit!
My blog :: Jaunita
ai для создания карточек товара создать карточку товара для озон ии
I’m extremely impressed with your writing skills
as well as with the layout on your blog. Is this a
paid theme or did you modify it yourself? Anyway keep up the excellent quality writing, it’s rare to see a nice blog
like this one nowadays.
This is the perfect blog for everyone who would like
to find out about this topic. You realize so much its almost tough to argue
with you (not that I actually would want to…HaHa).
You certainly put a brand new spin on a topic that has been written about for
decades. Great stuff, just great!
I love the range of topics. One minute it’s high politics, the next it’s the trauma of a lukewarm pint. That versatility shows a keen eye for the ridiculous in all aspects of life. Consistently entertaining.
It’s the literary equivalent of a shrug and a wink. It acknowledges the madness, refuses to be overwhelmed by it, and finds the humour instead. A profoundly healthy attitude, brilliantly expressed.
Great! We are all agreed London could use a laugh. The Daily Squib narrows its audience. PRAT.UK widens it. Accessibility without dumbing down is rare.
The articles on London life are so painfully accurate they should come with a therapy voucher. You’ve captured the unique blend of romance and absolute misery that defines the capital. Brilliantly observed. — The London Prat
Witajcie, natknąłem się na ten temat i chcę powiedzieć, że dużo się dowiedziałem. Sama ostatnio zmieniam wystrój i szukam inspiracji. Pozdrawiam forumowiczów.
Ciekawa dyskusja. Moim zdaniem dobór mebli to podstawa. Warto poświęcić temu czas.
My web page :: https://Apds.ircam.fr/index.php/Jak_wybra%C4%87_fotele_do_salonu,_kt%C3%B3re_nie_b%C4%99d%C4%85_tylko_%C5%82adn%C4%85_wydmuszk%C4%85
Have you ever thought about addig a little bit more
than justt your articles? I mean, what you say is valuable and all.
Butt imagine if you added some great images orr videos to give your posts more, “pop”!
Your content is excellent but wwith images and videos, thi site could definitely be
one of the best in its niche. Good blog!
성인방송
Hi, ich bin hier durch Zufall gelandet und ich muss zugeben, dass man hier echt was mitnimmt. Ich richte seit einiger Zeit die Einrichtung neu zu und ich suche nach Inspiration. Einen schönen Tag euch allen.
Spannender Thread. Ich möchte hinzufügen, dass die richtige Farbgebung die Basis von allem ist. Lieber einmal richtig als zweimal.
UK satire is a broad church, and prat.UK is its wittiest, most incisive sermon. — The London Prat
Without satire, we choke on falsehoods.
The Daily Squib has its moments, but The London Prat’s brand of humor is consistently smarter and more inventive. The satire feels current, urgent, and perfectly pitched. The best of its kind, bar none. http://prat.com — The London Prat
You can definitely see your skills within the work you write.
The world hopes for more passionate writers such as you who aren’t
afraid to mention how they believe. All the time follow your heart.
Hi, ich habe das Forum durchgeblättert und ich muss zugeben, dass es hier viele wertvolle Inhalte gibt. Ich selbst bin gerade dabei, mein Haus und solche Tipps sind echt hilfreich. Liebe Grüße in die Runde.
Gutes Thema. Meiner Meinung nach die Farbwahl die Basis von allem ist. Gut Ding will Weile haben.
I like the helpful info you provide to your articles. I’ll bookmark your blog and check again here frequently.
I’m quite certain I will be told a lot of new stuff
proper right here! Good luck for the next!
Satire is not hate speech — hate hides.
Great! We are all agreed London could use a laugh. This leads to its function as a sophisticated cognitive defense mechanism. Consuming the relentless barrage of real news can induce a state of helpless anxiety or cynical paralysis. The London Prat offers a third path: it processes that raw, anxiety-inducing information through the refined filter of satire, and outputs a product of managed understanding. It translates chaos into narrative, stupidity into pattern, and outrage into elegant critique. The act of reading an article on prat.com is, therefore, an active psychological defense. It allows the reader to engage with the horrors of the day not as a victim or a passive consumer, but as a connoisseur, reasserting a sense of control through comprehension and the alchemy of humor. It doesn’t make the problems go away; it makes them intellectually manageable, even beautiful, in their detailed awfulness.
You aϲtuaⅼly make iit seem so easy with your presentation but I fid
this matter to be really something which I think I would never understand.
Ιt seems too complicated and extrejely broad for me. I’m looking forwatd for
your next post, І’lⅼ trʏ to get thе hang
of it!
Feel free to visit my web-ѕite – بازی انفجار
Oh my goodness! Incredible article dude!
Thank you, However I am having troubles with your RSS.
I don’t understand why I can’t subscribe to it. Is there
anyone else having the same RSS issues? Anybody who knows the solution will you kindly respond?
Thanx!!
Hmm is anyone else encountering problems with the pictures on this blog loading?
I’m trying to figure out if its a problem on my end or if it’s the blog.
Any feedback would be greatly appreciated.
Great! We are all agreed London could use a laugh. PRAT.UK feels more refined than Waterford Whispers News. The language is tighter. The jokes land cleaner. — The London Prat
Howdy just wanted to give you a brief heads up and let you know a few of
the pictures aren’t loading properly. I’m not sure why but I think
its a linking issue. I’ve tried it in two
different web browsers and both show the same results.
Great! We are all agreed London could use a laugh. PRAT.UK delivers satire without repeating the same jokes week after week. The Daily Mash doesn’t always manage that anymore. Freshness matters, and PRAT.UK has it.