Stick and stay put script?

Discussion about scripting with Python
User avatar
Otuama
Posts: 1155
Joined: Fri Apr 02, 2010 12:56 am
Location: Swansea
Contact:

Re: Stick and stay put script?

Postby Otuama » Fri Jan 11, 2013 1:57 pm

For example, if you stick your arm into a vat full of mud, when you pull the arm out, it should be coated with mud, but the mud should not crawl its way up your arm


That's to do with the strength of the stickiness I think. What value are you using? This happened to me when I used a value of 50k. The particles started to surround the wheel
iCreate Ltd
'Strength does not come from physical capacity. It comes from an indomitable will.' - Gandhi
'What Does Success Look Like?' - iCreate Ltd


User avatar
Oldcode
Posts: 779
Joined: Thu Nov 03, 2011 11:28 pm

Re: Stick and stay put script?

Postby Oldcode » Fri Jan 11, 2013 4:01 pm

Right now, I'm using sticky of 1000, as per your suggestion, but I've seen it happen with settings a small as 50.

That's why I initially asked for the script. I was hoping for a particle to touch the polygon of my model an get frozen there.
"My sword and my service are yours."

"Then forever remind him of his vow, Knight of the Old Code."

User avatar
Otuama
Posts: 1155
Joined: Fri Apr 02, 2010 12:56 am
Location: Swansea
Contact:

Re: Stick and stay put script?

Postby Otuama » Fri Jan 11, 2013 4:14 pm

Thing is, each particle which is frozen will get frozen in space, it won't travel with the object.

So, when the wheels come back up, there won't be particles attached. They'd just be frozen in the position where they touched the object.
iCreate Ltd
'Strength does not come from physical capacity. It comes from an indomitable will.' - Gandhi
'What Does Success Look Like?' - iCreate Ltd

User avatar
Oldcode
Posts: 779
Joined: Thu Nov 03, 2011 11:28 pm

Re: Stick and stay put script?

Postby Oldcode » Fri Jan 11, 2013 5:30 pm

Drat! :x Okay, I'll keep looking for other ways. Thanks for your help.
"My sword and my service are yours."

"Then forever remind him of his vow, Knight of the Old Code."

User avatar
Otuama
Posts: 1155
Joined: Fri Apr 02, 2010 12:56 am
Location: Swansea
Contact:

Re: Stick and stay put script?

Postby Otuama » Sat Jan 12, 2013 12:51 pm

I did a quick test overnight and it worked ok-ish ( https://vimeo.com/57266773 ). I didn't bother solving the particles creeping up the wheels but there are a few things you can do for that. For example:

Have bounded gravity daemons with a strong value at the top of the wheels
Remove those faces completely and change the collision normal so if particles go in the wheel they'll come out the other side.
Have a plane at the top of the wheels to stop the particles.

I think it might look too watery.
iCreate Ltd
'Strength does not come from physical capacity. It comes from an indomitable will.' - Gandhi
'What Does Success Look Like?' - iCreate Ltd

User avatar
Oldcode
Posts: 779
Joined: Thu Nov 03, 2011 11:28 pm

Re: Stick and stay put script?

Postby Oldcode » Sat Jan 12, 2013 5:47 pm

Wow!!! That video looks amazing! That's exactly what I wanted, except for the creeping.

Here's another possibility. Somebody pointed me to a script on Real Flow resources section called "Glue"

http://resources.realflow.com/news_scripts.php?t=1#page=3&mode=0&id=106

Now I just have to figure out how to run and install it.

I'll look at your other ideas too. Thanks! :D
"My sword and my service are yours."

"Then forever remind him of his vow, Knight of the Old Code."

User avatar
Otuama
Posts: 1155
Joined: Fri Apr 02, 2010 12:56 am
Location: Swansea
Contact:

Re: Stick and stay put script?

Postby Otuama » Sat Jan 12, 2013 7:26 pm

I'll look at the script later and get back to you.
iCreate Ltd
'Strength does not come from physical capacity. It comes from an indomitable will.' - Gandhi
'What Does Success Look Like?' - iCreate Ltd

User avatar
Oldcode
Posts: 779
Joined: Thu Nov 03, 2011 11:28 pm

Re: Stick and stay put script?

Postby Oldcode » Sun Jan 13, 2013 7:27 am

Thanks! :D Can't thank you enough, but I'll keep trying. :lol:
"My sword and my service are yours."

"Then forever remind him of his vow, Knight of the Old Code."

User avatar
Oldcode
Posts: 779
Joined: Thu Nov 03, 2011 11:28 pm

Re: Stick and stay put script?

Postby Oldcode » Mon Jan 14, 2013 9:27 pm

Hey Otuama,

I just emailed Luis Migel who gave me a few tips. Here's the script he gave me and said to replace the "sphere01" with the name of the object you want the particles to stick to.

I tried doing that, ran the script, and re-ran the simulation, but it does not seem to be working.
Attachments
Glue Script.jpg
Particles being reflected off, not sticking to ball.
Glue Script.jpg (220.31 KiB) Viewed 3335 times
"My sword and my service are yours."

"Then forever remind him of his vow, Knight of the Old Code."

User avatar
Otuama
Posts: 1155
Joined: Fri Apr 02, 2010 12:56 am
Location: Swansea
Contact:

Re: Stick and stay put script?

Postby Otuama » Mon Jan 14, 2013 10:27 pm

Ah, forgot about you, sorry :o .

Will have a look at it tomorrow.
iCreate Ltd
'Strength does not come from physical capacity. It comes from an indomitable will.' - Gandhi
'What Does Success Look Like?' - iCreate Ltd


Return to “Python-Scripting”

Who is online

Users browsing this forum: No registered users and 1 guest