All Projects → nailuj05 → FusionWater

nailuj05 / FusionWater

Licence: MIT, Unknown licenses found Licenses found MIT LICENSE Unknown LICENSE.meta
A simple way to add buoyancy / water physics in Unity, built on the existing physics engine

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to FusionWater

harmonica
A simple, physics-based animation library 🎼
Stars: ✭ 571 (+179.9%)
Mutual labels:  physics
pylj
Teaching Utility for Classical Atomistic Simulation.
Stars: ✭ 23 (-88.73%)
Mutual labels:  physics
lumin
LUMIN - a deep learning and data science ecosystem for high-energy physics.
Stars: ✭ 45 (-77.94%)
Mutual labels:  physics
vankampen-stochastic
Exercises and notes for N.G. Van Kampen's Stochastic Processes in Physics and Chemistry
Stars: ✭ 19 (-90.69%)
Mutual labels:  physics
Torque
2d 纯计算高性能刚体物理引擎
Stars: ✭ 62 (-69.61%)
Mutual labels:  physics
Raymarched-GPU-Particles-with-Screenspace-Physics
Using Grab Passes for VRChat
Stars: ✭ 44 (-78.43%)
Mutual labels:  physics
03-Unstable-Rotation
The code for my Game Physics course: https://www.udemy.com/gamephysics
Stars: ✭ 21 (-89.71%)
Mutual labels:  physics
mujoco
Multi-Joint dynamics with Contact. A general purpose physics simulator.
Stars: ✭ 4,685 (+2196.57%)
Mutual labels:  physics
jitternator
Lessons learnt from hunting jitter issues
Stars: ✭ 59 (-71.08%)
Mutual labels:  physics
GooFit
Code repository for the massively-parallel framework for maximum-likelihood fits, implemented in CUDA/OpenMP
Stars: ✭ 112 (-45.1%)
Mutual labels:  physics
diffractsim
✨ A diffraction simulator for exploring and visualizing physical optics.
Stars: ✭ 239 (+17.16%)
Mutual labels:  physics
lab-dotphy
The Virtual Lab for Physics
Stars: ✭ 14 (-93.14%)
Mutual labels:  physics
My NoteBook
サイエンス、テクノロジー、エンジニアリング関連の情報を記載したノート(忘備録)です。
Stars: ✭ 104 (-49.02%)
Mutual labels:  physics
physics-learning-path
This is my physics learning path. Best courses I've found to learn physics online.
Stars: ✭ 37 (-81.86%)
Mutual labels:  physics
unity-water-shader2d
A 2D water shader for Unity
Stars: ✭ 91 (-55.39%)
Mutual labels:  water
MachineLearning Physics
This is to facilitate the “Machine Learning in Physics” course that I am teaching at Sharif University of Technology for winter-19 semester. For more information, see the course page at
Stars: ✭ 26 (-87.25%)
Mutual labels:  physics
kosm
Kosm for Android source code
Stars: ✭ 33 (-83.82%)
Mutual labels:  physics
physics-module-ammonext
Physics module for Whitestorm.js [Beta]
Stars: ✭ 38 (-81.37%)
Mutual labels:  physics
Physics
experimenting with physics simulation
Stars: ✭ 53 (-74.02%)
Mutual labels:  physics
LocalSimulation
This plugin allows you to essentially create PxScene or Physic Scenes by placing an Actor, and adding other Static Mesh Components and soon Skeletal Mesh components within this space. Adding Constraints, and Forces will work as expected, but now with the additional layer of abstraction so that simulation can be anchored to a transform.
Stars: ✭ 42 (-79.41%)
Mutual labels:  physics

FusionWater

A simple way to add buoyancy / water physics in Unity, built on the existing physics engine. This package can be downloaded from the releases section and dragged into any Unity Project to install. There are Shaders/Materials provided for both URP and Standard RP.

BoatDemo_repeat

Setup Guide

Add the Fluid.cs to your water (or any fluids) plane, be sure to have a collider for the volume setup, add a FluidInteractor to all your objects, that you want to be affected.

The Base Fluid Interactor

This class can and should NOT be used as a component, as it has no actual code, that gets executed and is only internal. BaseFluidInteractor.cs, not to be confused with BasicFluidInteractor.cs, is the base class all FluidInteractors should derive from the BaseFluidInteractor, as it handles entering/exiting a fluid and calls the FluidUpdate() function. Global Functions, that are needed on all FluidInteractors, like the Turbulence Functions, are also defined here.

The BaseFluidInteractor also defines the basic settings all Interactors inherit. Those are

- Custom Volume: Used to set a custom volume. 0 means the volume will be calculated using the colliders
- Dampening Factor: The dampening applied to the object
- Simulate Water Turbulence: Adds random disturbence forces generated from perlin noise
- Turbulence Strength: The strength of the applied forces
- Float Strength: Use this for changing the buoyant force without changing the mass

The Basic Fluid Interactor

BasicFluidInteractor.cs this is the simplest and easiest FluidInteractor. It calculates everything from the center of the objects, this can cause weird behaviours with more streched out objects, like a wooden plank for example. There for it is great for smaller objects, backgroud props, cuboids and spheres. Using the simulated turbulence you can easily add some slight movement, so your objects float, rotate and move a bit and aren't just staying "frozen" after a while.

The Complex Fluid Interactor

ComplexFluidInteractor.cs this a more complex FluidInteractor to get a more realistic/belivable result, especially with larger, more complex objects. This is great for boats, ships, large debris or long wooden planks ;). Instead of calulating the buoyant forces for the center of an object, the ComplexFluidInteractor calculates it for multiple points, that can be placed on your object. Those "floaters" calculate their buoyant forces based on their own submergance and then apply it on the main objects rigidbody at the according position. This allows one to place floaters on the edges of a longer object or along the hull of a ship to better model its submerged volume and buoyancy.
In the Unity Editor the floaters can be automatically placed at the corners of the colliders bounding box or placed manually. A floater is nothing more than an empty gameobject, that is added to the ComplexFluidInteractors Floaters List. The floaters are drawn as spheres in the scene view, green if in air, red if submerged.

BoatFloaters_repeat

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].