Fluid bouyancy
by Kien T Nguyen · in Torque 3D Professional · 06/10/2012 (11:57 am) · 8 replies
Hello everyone,
In Physics section of the T3D, it states to support "Fluid bouyancy". But it is hard for me to locate the document for that. Could anybody guide me how to make a boat floating and sailing in T3D?
Thank you.
In Physics section of the T3D, it states to support "Fluid bouyancy". But it is hard for me to locate the document for that. Could anybody guide me how to make a boat floating and sailing in T3D?
Thank you.
#2
Nvidia's old forums - if you check the third post there are some links to more information, though these actually seem to dump you in the new forums....
06/13/2012 (12:53 pm)
On Nvidia's site in the older forums I found a post related to this - Nvidia's old forums - if you check the third post there are some links to more information, though these actually seem to dump you in the new forums....
#3
@Scott: How did you simulate the water surface? I saw that the source of Pacific demo is not provided in Torque3D 1.2. Do you know how to open it in the Torque Toolbox or or open as a project in VC++ 2010?
06/14/2012 (10:28 pm)
Thank you for your reply. It is quite difficult to work on fluid based simulation.@Scott: How did you simulate the water surface? I saw that the source of Pacific demo is not provided in Torque3D 1.2. Do you know how to open it in the Torque Toolbox or or open as a project in VC++ 2010?
#4
06/15/2012 (10:36 am)
Hey Kien, currently I believe the RigidShape and PhysicsShape objects both support the simplistic buoyancy. Just make sure the density is less than the density of the water.As far as I know there's no way to open the demo in the editor. Though i've only been at this for a few weeks now.
#5
06/15/2012 (12:04 pm)
Ok, if you go to your download section for Torque 3D 1.2 and pull down the Previous Versions rollout you should see the 1.1 downloads. The Pacific Demo is in Torque 3D Pro 1.1 (2 of 2) - Win and includes the source scripts. It has not been updated to 1.2 though, so your mileage may vary.
#6
06/15/2012 (4:27 pm)
Too bad the simulation can't just calculate the volume of displacement[of mesh] Vs. the mass of the object....LOL. Like in real, 'bouyancy'....if your displacement of water is heavier than your weight; you float! if not; you sink...hee hee hee.
#7
Thanks to [GG]Mich for pointing me in the right direction for drawing stuff in code for debugging purposes. Helped me get my world/object spaces sorted out.
06/21/2012 (11:42 pm)
Well, I've decided I'll probably just fake it using "floats" like someone else did for a sail boat that I found on the internet. The boats I'm trying to model are hydroplanes so they're pretty flat, plus when they're at speed they ride on top of the water, rather than in the water. The buoyancy forces still need to be tweaked and I need to sort out how to set the "float" positions through datablocks, right now its just hard coded.Thanks to [GG]Mich for pointing me in the right direction for drawing stuff in code for debugging purposes. Helped me get my world/object spaces sorted out.
#8
06/22/2012 (4:02 am)
Very cool stuff, Scott! It does look a little too springy, as if the boat weighs nothing, but that's just a matter of tweaking numbers.
Torque Owner Scott Przybylski
HydroSim
I'm currently fighting with this situation right now as well. The end goal is to make a hydroplane. There really isn't fluid buoyancy that works correctly. It's just an extremely simplified algorithm that only applies the force to the center of mass of the shape, so there is no rotational force and the object will only go straight up and down.
I'm trying to implement a better buoyancy calculation for bullet, but I'm having issues with the physics shapes just spinning out of control. So far no ones been able to help me. It seems like there's a bug in applyImpulse, as I was sort of able to get it working in physX, but I'm a bit lost.