fluids and Physics: Very Rough Test

Technical questions, etc..
froo
Captain
Posts: 2554
Joined: 22 May 2009, 12:13

fluids and Physics: Very Rough Test

Post by froo »

Although the Physics.CollisionResponse() function does not work,
I did try a simple test, using the Physics.StartSimulation(), pause activity,
and Physics.StopSimulation().

Please note, this is Extremely rough. I did not put any effort into getting it
to look good at all. I just wanted to test the concept, to see if it would work.

It does.

So that's a good thing.

This is a simple short video of a cube with physics attributes applied.
The fluid interacts with the cube.
Attachments
fluidPhysTest1.zip
(1019.54 KiB) Downloaded 347 times
User avatar
Finis
Captain
Posts: 5410
Joined: 21 May 2009, 18:26
Type the number ten into the box: 0
Location: America!

Re: fluids and Physics: Very Rough Test

Post by Finis »

Someone should do a fire hose scene with this.
I prefer dangerous freedom over peaceful servitude. -- Thomas Jefferson/Jean Jacques Rousseau
froo
Captain
Posts: 2554
Joined: 22 May 2009, 12:13

Re: fluids and Physics: Very Rough Test

Post by froo »

well, for some reason, the Physics Init takes longer and longer, as the frame number is incremented.
But, if I put the Physics.StartSimulation() inside a basic activity loop, I don't have that problem.
So that tells me I may need to rebuild the basic fluid sim node setup from scratch, for 7.61.
Just seems odd.

EDIT:

OR, it could be the fluid mesh is just very complex and it takes a long time to perform the collision tests,
since the cube is 'inside' the fluid mesh's 'sphere', so to speak.
Attachments
brewscene_physisc.zip
(218.84 KiB) Downloaded 329 times
Benji
Senior Chief Petty Officer
Posts: 280
Joined: 22 May 2009, 01:23

Re: fluids and Physics: Very Rough Test

Post by Benji »

This looks really cool, I hope you can work out the wrinkles without too much hassle.......
froo
Captain
Posts: 2554
Joined: 22 May 2009, 12:13

Re: fluids and Physics: Very Rough Test

Post by froo »

Muwahahahaha
Got it Cat Daddy!

This is a video.
Need to upload to youtube I guess; need to learn how. :D

This is another very simple test, but Yo! I Got Yer Fire Hydrant Right HEeerre!
Attachments
Firehose2.zip
(184.16 KiB) Downloaded 332 times
froo
Captain
Posts: 2554
Joined: 22 May 2009, 12:13

Re: fluids and Physics: Very Rough Test

Post by froo »

Here is the scene if you want to take a look, at the script.
It needs work, and will ultimately need tweaking for each scene you do.

The script of interest is located in this node:

Scene Fluid Controller/Render Fluids/PhysStart

For some reason, if I add the object to the scene, then scale it, and start the fluid playback, the object
immediately starts moving. So that needs fixing. Anyway, at least this is a very good start.

As long as we don't try using the Physics.CollisionResponse() function we're ok.
Attachments
firehose1scene.zip
(175.84 KiB) Downloaded 342 times
froo
Captain
Posts: 2554
Joined: 22 May 2009, 12:13

Re: fluids and Physics: Very Rough Test

Post by froo »

just the zip containing the domain.bin file, and the fluid sim datasets.
Attachments
datmp.zip
(645.54 KiB) Downloaded 313 times
froo
Captain
Posts: 2554
Joined: 22 May 2009, 12:13

Re: fluids and Physics: Very Rough Test

Post by froo »

hehe I solved the problem with the object moving automatically when scaling.
I was using: Physics.SceneCollision(). This meant, when I scaled the object, the object was penetrating
the ground. Hence, the object started moving.

I replaced the Physics.SceneCollision() with: Physics.PeerCollision(), supplying the two peers
as parameters to the function. Peer 1 is a cube, and Peer 2 is the fluid sim object. Sweet.
froo
Captain
Posts: 2554
Joined: 22 May 2009, 12:13

Re: fluids and Physics: Very Rough Test

Post by froo »

Here's the scene file, and a video showing the results of using the Physics.PeerCollision() function
instead of the Physics.SceneCollision() function.
Note that the cube stops moving, once collision with the fluid ends.

We can still have the cube continue moving, when using the PeerCollision() function, using some additional
scripting. I'll get to that later.

These simple demonstration videos are not aesthetically pleasing I know.
Bear in mind, the fluid you see here is NoTHING compared to what you can generate
with blender. I was not concerned with the appearance. Rather, I was interested in the
functionality. I just needed something there to work with.

I will get some much better fluids going tonight, with physics collisions.
Attachments
firehose3.zip
bobo
(211.54 KiB) Downloaded 308 times
firehose2_PeerCollision.zip
dodo
(177.35 KiB) Downloaded 315 times
froo
Captain
Posts: 2554
Joined: 22 May 2009, 12:13

Re: fluids and Physics: Very Rough Test

Post by froo »

another simple test.
In truespace, I rotated the fluid sim node 90 degrees about the y axis, to let it flow upward.
I did not need to rerun it in blender.

The idea here is, the cube is being pushed up by the water fountain.
I will get a finer looking movie this evening, demonstrating the idea.
Attachments
FluidPhys_PeerCollision.zip
(171.69 KiB) Downloaded 338 times
fountain2.zip
(168.84 KiB) Downloaded 338 times
froo
Captain
Posts: 2554
Joined: 22 May 2009, 12:13

Re: fluids and Physics: Very Rough Test

Post by froo »

This is a bit better.
Man I need to get a faster computer. hehe
Still, the fluid is too chunky. I can fix that.
I am still experimenting with physics settings.
Attachments
fountain28ccf.zip
(637.65 KiB) Downloaded 254 times

Return to “TechForum”