independent realflow forum

It is currently Fri Oct 24, 2014 9:18 pm

All times are UTC




Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: Thu Jan 10, 2013 2:40 am 
Offline
User avatar

Joined: Thu Nov 03, 2011 11:28 pm
Posts: 581
Hi Everybody,

Just wanted to know if there is a script out there that will make particles stick to the surface of a polygon and stay there, kind of like mud being thrown at and sticking to a wall?

I know Wet Works has plugin that would do the job, but I don't have $500 dollars US to spend on something like that.

Thanks in advance,

Cheers!

_________________
"My sword and my service are yours."

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


Top
 Profile  
 
PostPosted: Thu Jan 10, 2013 4:08 am 
Offline
User avatar

Joined: Fri Apr 02, 2010 12:56 am
Posts: 1154
Location: Swansea
Code:
emitter = scene.getEmitter("Circle01")

collision = emitter.getParticlesColliding()

for particle in collision:

   particle.freeze()


It should be something like that.

However, for this sim ( http://vimeo.com/44053138 ) I had the object's sticky at 1000 and it's roughness as 1.0. For the emitter I had a res of 15, viscosity of 80 & surface tension of 60. These values were based on a default scene scale & circle emitter size.

_________________
Otuama - Vimeo
'Strength does not come from physical capacity. It comes from an indomitable will.' - Gandhi
'Realism is in the eye of the beholder' - Me ;)


Top
 Profile  
 
PostPosted: Thu Jan 10, 2013 4:24 am 
Offline
User avatar

Joined: Thu Nov 03, 2011 11:28 pm
Posts: 581
Hey Otuama,

Thanks so much!!!! That movie was awesome. That's just what I want to do. Now, the embarrassing part... :oops:

I've never used a script before so I have no idea how to install or use it.

So, do I take the code you've provided and put it into a text file?

Circle01 is the name of whatever emitter produced the particles?

Is there somewhere in the code where I put the name of the object I want the particles to stick to?

Thanks in advance. :mrgreen:

_________________
"My sword and my service are yours."

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


Top
 Profile  
 
PostPosted: Thu Jan 10, 2013 8:12 pm 
Offline
User avatar

Joined: Fri Apr 02, 2010 12:56 am
Posts: 1154
Location: Swansea
The code I posted was only a quick example. For the mud gun video I didn't use any script for the sticking on the wall. I just used the values I posted earlier. The only script I used with that sim was an emitter tracking a null ( https://vimeo.com/39926708 ).

It worked very well without scripting and can just be used with a stream of particles from an emitter.

_________________
Otuama - Vimeo
'Strength does not come from physical capacity. It comes from an indomitable will.' - Gandhi
'Realism is in the eye of the beholder' - Me ;)


Last edited by Otuama on Thu Jan 10, 2013 8:56 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Thu Jan 10, 2013 8:56 pm 
Offline
User avatar

Joined: Thu Nov 03, 2011 11:28 pm
Posts: 581
Very cool!

What I'm trying to do is have an object dunked in a fluid about half way, like a car being stuck in the mud, and when the car is pulled, the wheels and other parts of the car have the mud particles stuck to the car's polygons.

Do you think these settings would work for something like that?

Thanks in advance,

_________________
"My sword and my service are yours."

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


Top
 Profile  
 
PostPosted: Thu Jan 10, 2013 9:01 pm 
Offline
User avatar

Joined: Fri Apr 02, 2010 12:56 am
Posts: 1154
Location: Swansea
I don't see why not. Actually, using a script to do it may not be as good as the mud gun version because only the particles touching the object will freeze.

Give it a try.

For the mud gun one I think I used a substeps of 300/400.

_________________
Otuama - Vimeo
'Strength does not come from physical capacity. It comes from an indomitable will.' - Gandhi
'Realism is in the eye of the beholder' - Me ;)


Top
 Profile  
 
PostPosted: Fri Jan 11, 2013 12:16 am 
Offline
User avatar

Joined: Thu Nov 03, 2011 11:28 pm
Posts: 581
Thank you! I'll try that and let you know what happens.

_________________
"My sword and my service are yours."

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


Top
 Profile  
 
PostPosted: Fri Jan 11, 2013 1:12 pm 
Offline
User avatar

Joined: Fri Apr 02, 2010 12:56 am
Posts: 1154
Location: Swansea
I just did a test with 4 cylinders (wheels?) going half way into a container of particles.

I used the exact values I told you earlier.

But, it didn't work. The wheels went in but when they came up the particles stuck to them but the particles then detached from the wheels. This it probably due to the viscosity; the particles are trying to stick to the wheels but they are trying harder to stick with the rest of the particles. Of course, the surface tension also is to blame.

I've upped the wheels stickiness to 50k to see what happens.

It just goes to show the amount of tweaking fluid stuff takes, even with setting which work.

_________________
Otuama - Vimeo
'Strength does not come from physical capacity. It comes from an indomitable will.' - Gandhi
'Realism is in the eye of the beholder' - Me ;)


Top
 Profile  
 
PostPosted: Fri Jan 11, 2013 1:30 pm 
Offline
User avatar

Joined: Thu Nov 03, 2011 11:28 pm
Posts: 581
Thanks Otuama,

I'm running a test as we speak and mine is not working either. I think the problem is if the object in the fluid is moving, the particles sticking to the object tend to migrate their way up the surface of the object in an unrealistic way.

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 the effect I'm looking for.

_________________
"My sword and my service are yours."

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


Top
 Profile  
 
PostPosted: Fri Jan 11, 2013 1:49 pm 
Offline
User avatar

Joined: Fri Apr 02, 2010 12:56 am
Posts: 1154
Location: Swansea
I've just realised something which may be the cause of my problem. I had a plane at the top of the container to block particles coming out. Ummm, I forgot to turn it off. No wonder the particles are leaving the wheels because the plane is pushing them down. Doh!!

_________________
Otuama - Vimeo
'Strength does not come from physical capacity. It comes from an indomitable will.' - Gandhi
'Realism is in the eye of the beholder' - Me ;)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group