Fluid Sim Importer Plugin: Interface Snapshot

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

Fluid Sim Importer Plugin: Interface Snapshot // SDK, Plug-in & 3rd Party Area

1  2  |  

Post by ProfessorKhaos // Dec 14, 2008, 8:09am

ProfessorKhaos
Total Posts: 622
pic
Wow! I was just thinking about fluid simulation for use in a scene where a moving boat would disturb a wind-blown water's surface. This is way more capable than what I had in mind since I'd have concerned myself with displacing a 2D surface grid.


Very cool!

Post by robert // Dec 14, 2008, 8:13am

robert
Total Posts: 609
pic
Wow! I was just thinking about fluid simulation for use in a scene where a moving boat would disturb a wind-blown water's surface. This is way more capable than what I had in mind since I'd have concerned myself with displacing a 2D surface grid.


Very cool!


Actually I'm afraid not. At least according to Asem:


...Even blender technically can't do what I'm asking which is to interact with the actual physics sim while the fluid sim is running ie. fluid sim calculations are dependant on the physics engine rather than it's own solver....

Post by frootee // Dec 14, 2008, 8:32am

frootee
Total Posts: 2667
pic
well, I have seen some videos recently which seem to imply otherwise. I may be misinterpreting Asem's request though.


There was one video of a sphere shooting through a fluid blob; the blob basically explodes.


Also in the blender fluid examples, the character 'CandyMan' interacts with a fluid pool, pushing his hands into the water, splashing, etc.


So I think animating a boat which creates a wake in the fluid sim should be possible. This, too, in on my to do list, for investigation. At this point I am not sure if animating a boat in truespace, and exporting that to blender, would work. That, too, is on my list of things to check.

Post by robert // Dec 14, 2008, 8:55am

robert
Total Posts: 609
pic
I think what Asem might be getting at is that the sphere can't be pushed around by the fluid and otherwise go through a non-prerecorded simulation. e.g. the water falls down into a trough and there are objects in there which get picked up and moved by the water "downstream". I think that's what he claims can't be done.

Post by frootee // Dec 14, 2008, 9:11am

frootee
Total Posts: 2667
pic
ok;


so it sounds like an obstacle can affect the fluid, but the fluid cannot affect the obstacle.


yes, this addition can be done with truespace scripting. I experimented with it during beta testing for 7.6. But getting it to 'look right', and establishing a process for repeating a decent look for various situations may take some practice.

Post by hultek43 // Dec 14, 2008, 9:20am

hultek43
Total Posts: 234
I'd like to contribute this link (http://wiki.blender.org/index.php/Manual/Fluid_Simulation) to relevant blender docs. :)

Post by Asem // Dec 14, 2008, 9:45am

Asem
Total Posts: 255
Thanks robert that's exactly what I meant and that's cool frootee that in a way it can do it. The candy man video was done by animating candyman first then turning him into an obstacle same with the object plowing into the blob of water. Things may get tricky with having characters interacting with the fluid (characters becoming an obstacle) as it kind of requires you to have the rigged mesh in blender (basically to let you do something like candy man) to get the fluid interaction made by the character because blender has to export the character animation in a way to write it to the .bobj files or something like that.

It's like having a hallway with water gushing down it. There are obstacles in the way but they will not move according to the fluid's interaction with them. All they can do is displace the water at that location (where the objects are and according to their volumes). So to make it look like the objects are being swept away you would manually have to animate that.


Frootee:
At this point I am not sure if animating a boat in truespace, and exporting that to blender, would work. That, too, is on my list of things to check.
There is a problem importing into blender for rigged characters or characters with animation. I found that importing into blender is almost no better than ts. I was hoping the .x vertex animation would be good enough but ts .x format version and blenders don't match (ts = new(dx9+, blender = old(dx8)). Not blaming ts of course since there doesn't seem to be a consistent spec for .x format.


As for the boat thing: As long as the boat doesn't rely on bones it should be possible to animate the boat with ts (even if using the physics engine) and import it into blender. Exporting the object as collada from ts and importing the object as collada from blender would be good enough for that.

Post by frootee // Dec 14, 2008, 11:38am

frootee
Total Posts: 2667
pic
Thanks Asem. That's what I was planning on doing. I have run some tests exporting static objects in Collada format from truespace, and importing into blender. That does seem to work fine.


Thanks for the link hultek! :)

Post by Délé // Dec 14, 2008, 4:31pm

Délé
Total Posts: 1374
pic
Looking great Froo! Can't wait to use it. :D :banana:

In anticipation of this plug-in I did experiment a little with Blenders fluid simulation. Although the interface sucks, there was a decent video on YouTube explaining how to use it. It wasn't all that hard. Certainly not at all intuitive, but once you see how it's not too bad.

Using tS and Blender should be a good match in regards to fluid sim. Blender can make objects effect the fluids, and tS should be able to have other objects effected by the fluids. If not with just simple physics, then via script for sure.

This will be a lot of fun to play with when you get it out Froo. You da man! :)

Post by ProfessorKhaos // Dec 14, 2008, 4:41pm

ProfessorKhaos
Total Posts: 622
pic
Been looking around at a few other interesting sources for "CFD" (computational fluid dynamics). One that looks interesting but is unfortunately not windows based is "Gerris Flow Solver". Source code is available but relies on some pretty heavy duty scientific function libraries.


http://gfs.sourceforge.net/wiki/index.php/Main_Page


Downloaded and installed a version on my linux box at home. Definitely NOT a realtime solution. Here's an example of a cargo ship moving through water (top pic in link is also a link to a mpeg file). As beautiful as it looks I'm sure it took countless hours to compute a solution.


http://gfs.sourceforge.net/examples/examples/ship.html


Some possibility exists to export the rendered results such that it might have use as a displacement map for a water surface but iterations of tweaking would mean countless eons of time and make final rendering a short part of the process.


Froo's solution is sounding more and more friendly all the time compared to other workarounds! :)

Post by frootee // Dec 15, 2008, 3:32am

frootee
Total Posts: 2667
pic
Thanks PK.

That looks like an interesting engineering solution. :)


Hm that code may warrant review.

Post by Wigand // Dec 15, 2008, 6:18am

Wigand
Total Posts: 462
pic
I just had an idea. Maybe it is possible.

If we could have something like friction between two objects.

A ship and a cloth? Maybe we could get waves.

Post by frootee // Dec 15, 2008, 6:21am

frootee
Total Posts: 2667
pic
That sounds like an interesting possibility Wigand.

It's worth checking out!


Froo

Post by frootee // Dec 16, 2008, 12:22pm

frootee
Total Posts: 2667
pic
Just the beginning visuals of an idea I have...

Post by prodigy // Dec 16, 2008, 1:14pm

prodigy
Total Posts: 3029
pic
looking good froo.. :)

Post by frootee // Dec 16, 2008, 1:30pm

frootee
Total Posts: 2667
pic
Thanks prodigy.

It looks small scale because I don't have the correct, updated version of the plugin here at work; I was just doing a doodle. The plugin here, does not have the ability to import the Domain scaling. And, I have Visual Studio 2005 here, but 2008 at home. The latest build was created with 2008. I tried porting backwards but figured, I'm so close to finishing, there's no point in toying with it.


Anyways.


I am thinking, something involving the fluid sim, crazy bob, scripted physics, and a fire hose. Oh, and maybe


El Bano Del Diablo... :D

Post by frootee // Dec 20, 2008, 4:33am

frootee
Total Posts: 2667
pic
I have pretty much finished the documentation and fixed a couple bugs.


Here is a snapshot of the near-final version.


This is NOT the way to treat a Brewsky!

Post by prodigy // Dec 20, 2008, 4:38am

prodigy
Total Posts: 3029
pic
Froo you can share with me a mesh of that kind of fluid??

Just a liquid mesh.. not an animation.. just a mesh .. i like to see how works with sds :D

Post by robert // Dec 20, 2008, 6:23am

robert
Total Posts: 609
pic
Coolio, very nice and easy to use UI you have.


If I'm not on vacation when you release this I'll be one of the first to download it. :D

Post by frootee // Dec 20, 2008, 7:25am

frootee
Total Posts: 2667
pic
Thanks Robert.


Here you go Prodigy. I have to zip it up though. I am including the last mesh in the sequence, and the 17th in the sequence (it looks kinda interesting) :)


The fluid mesh can be smoothed for a better look in blender, before running the simulation.


I will probably rework this example for the package because the domain is Way too small. I can enlarge it so the fluid does not hit the walls.


Ooh just noticed the created node is still called: Example Topology Node.


Gotta fix that.

Post by prodigy // Dec 20, 2008, 7:32am

prodigy
Total Posts: 3029
pic
ThanksFroo :)

Perfect.. :banana:

Post by frootee // Dec 20, 2008, 7:34am

frootee
Total Posts: 2667
pic
You're welcome Amigo! :)

Post by prodigy // Dec 20, 2008, 7:46am

prodigy
Total Posts: 3029
pic
Hey Froo, que te parece? :) (what you think)

17038

Post by frootee // Dec 20, 2008, 8:08am

frootee
Total Posts: 2667
pic
Ohhhh Yeeeeahhhh! VERY NICE!


Say.... can you post that material please? Is it Vray or DirectX?

Post by prodigy // Dec 20, 2008, 9:14am

prodigy
Total Posts: 3029
pic
Vray.. give me a minute

Post by prodigy // Dec 20, 2008, 9:20am

prodigy
Total Posts: 3029
pic
Yeap 7.61b, but use this settings..
17039

Post by frootee // Dec 20, 2008, 9:58am

frootee
Total Posts: 2667
pic
Very nice.. Thank You Prodigy! :banana:

Post by frootee // Dec 23, 2008, 6:20pm

frootee
Total Posts: 2667
pic
Well some folks are testing the plugin and based on their feedback I've made some revisions; as well as changes to the documentation.


There is one item which may take a little time since it's the first time I've done it, but it should simplify the installation process. Not really a biggie; rather, reading up on How to do it will take a little time. :)


Well, Merry Christmas everyone,

and

Be Safe!


Froo
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn