breaking a dam with realflow

Discussions about rigidbody simulation in Realflow 4
benlink
Posts: 34
Joined: Tue Apr 10, 2007 5:45 pm

breaking a dam with realflow

Postby benlink » Tue Apr 10, 2007 5:49 pm

I just have a little problem with my realflow simulation.....actually, the dam is pre-cut and because of the gravity and certainly another parameter I don't know, it begins falling before the water hits it.....but...the thing is the dam is straight and each part matches exactly with the other....so maybe this is caused by the friction or some tolerance......so if someone knows something about this, it would be cool to help ...thanks


shaun_michael
Posts: 4766
Joined: Sun Sep 10, 2006 8:04 am

breaking a dam with realflow

Postby shaun_michael » Tue Apr 10, 2007 5:58 pm

There's a script called attachator that you can find on the NL scripting site that might help you with this. It'll add fixed constraints between all your pieces which should have the effect of holding them in position. You can then apply a break frame, or break force to break the fixed constraint and allow your fluid to appear to be breaking the dam apart.

What you should really ds is lock the sim for a few frames to allow the pieces of your dam to settle against one another, then once they have save that as an initial state. If your fluid is like a real dam and built up behind it (ie already interacting with it) you'll need the dam active to hold back the water. However, if your fluid flow heads towards the dam for a while before interacting with it, you could always turn the dynamics off for these non-interacting frames to speed up the sim.

The script itself is written by Dynamic_Boy, who does frequent this forum, so should you have any problems he may be able to help you out with the script.

Attachator Script

Shaun

benlink
Posts: 34
Joined: Tue Apr 10, 2007 5:45 pm

breaking a dam with realflow

Postby benlink » Tue Apr 10, 2007 8:23 pm

thank you very much...by the way...I know I'm in the rigid body threads but....in fact I've got two ways of breaking the dam....by making some "violent" water splashing against it and thus having emitters just behind the dam...or having filled with water a mesh and just letting it go.....what do you think would be the best way..?

shaun_michael
Posts: 4766
Joined: Sun Sep 10, 2006 8:04 am

breaking a dam with realflow

Postby shaun_michael » Tue Apr 10, 2007 9:36 pm

I think it depends. If the water is already sitting behind it, I would expect a few cracks to appear, then widen, then all watery hell to break loose as the dam shatters and gradually gets washed away after the first big hole appears.

If the water is rolling down behind the dam and then strikes it, then perhaps it can just blow the dam out of the way.

Ort a combination where the water strikes the dam, the dam seems to hold, then the cracks appear and, well, you get the picture :)

It's really down to how you want the scene to go as a whole I think.

Shaun

dynamic_boy
Posts: 62
Joined: Mon Feb 19, 2007 4:56 pm

breaking a dam with realflow

Postby dynamic_boy » Wed Apr 11, 2007 2:49 pm

Breaking a dam is actually a challenge even with realflow but I think it is possible. You can use the DeactivateUntilFrame script to freeze the objects until the fluid reach there, also attachator script makes cluster of objects that break apart as a whole.

I think the first you have to do is fill a big volume with fluid, after that you can place the prefractured dam just touching the volume, activate it and hope that pressure forces will make the rest.

god luck :)
Carlos Pegar

Thinkinetic-Product Manager
http://www.pulldownit.com

shaun_michael
Posts: 4766
Joined: Sun Sep 10, 2006 8:04 am

breaking a dam with realflow

Postby shaun_michael » Wed Apr 11, 2007 3:54 pm

Good idea. Also, you can place a couple of objects within the fluid, but only exclusively linked to the dam as rigid bodies. Then simply animate them to push against the first parts of the dam that you want to move and let "nature" do the rest.

Shaun

benlink
Posts: 34
Joined: Tue Apr 10, 2007 5:45 pm

breaking a dam with realflow

Postby benlink » Fri Apr 13, 2007 7:20 am

thanks for your advises.
by the way , I've tested the desactivate until frame script.. some parts of the dam begin to move (yet desactivated) but, just before the water hits them, they return at their original place...quite weird.....perhaps it's my simulation that had a sort of bug...

benlink
Posts: 34
Joined: Tue Apr 10, 2007 5:45 pm

breaking a dam with realflow

Postby benlink » Wed Apr 25, 2007 3:39 pm

so....did someone on this forum have such a problem?
should I use the attachator script instead of theis desactivate until frame script?

shaun_michael
Posts: 4766
Joined: Sun Sep 10, 2006 8:04 am

breaking a dam with realflow

Postby shaun_michael » Wed Apr 25, 2007 4:44 pm

I dont know if this is a practical idea for your particular sim, but when you transfer the RBD data to your 3D application, could you not copy the keyframes from the block in it's correct position to the block in it's incorrect position? If its not interacting with the water, and there aren't tens or hundreds of them, perhaps this would be one way to go that would avoid searching for another scripted solution.

Shaun

shaun_michael
Posts: 4766
Joined: Sun Sep 10, 2006 8:04 am

breaking a dam with realflow

Postby shaun_michael » Wed Apr 25, 2007 4:45 pm

Oh, and yes, of course you could try the attachator script, but it would still rely on having an anchor somewhere, so assuming you know which parts of your dam wont move, in theory it should work. All you have to do is either enter a frame at which the constraint breaks, or a force which will break it.

Shaun


Return to “RF4: Rigidbody simulation”

Who is online

Users browsing this forum: No registered users and 2 guests