Mopolauta

Elasto Mania board
It is currently 18 Aug 2017, 17:32

All times are UTC [ DST ]




Post new topic Reply to topic  [ 34 posts ] 
Author Message
 Post subject: real-time physics solver
PostPosted: 25 Mar 2017, 18:49 
Offline
Cheatless
User avatar

Joined: 19 May 2002, 17:05
Posts: 4241
i've been lately developing a new way to simulate physics (currently mainly fluids and sand, some other stuff under progress) using machine learning for real-time scenarios (games, ..)

here are some videos:
http://youtu.be/4ibq68ZspRI

various materials (I guess water looks the worst):
http://youtu.be/Ye9MhVwNxrc

comments?

_________________
[carebox]


Top
 Profile  
 
PostPosted: 25 Mar 2017, 20:21 
Offline
Kuski
User avatar

Joined: 24 Aug 2008, 19:56
Posts: 5510
Location: Southampton, UK
I have no idea about machine learning, but that looks pretty decent! I agree water looks the worst. I think this is mainly because splashes look unrealistic - they resemble a fluidic mist, rather than a bunch of droplets, which is what water splashes normally look like (or is it the lack of reflections?).

But some of the denser and more viscous fluids already look much more realistic, with droplets or patches forming and interacting (milk!). Sand also looks very decent, I wish games had this simulated at least to some extent!

Self-developed project or part of something bigger?

_________________
Image
Team TR
Multi WR in Labyrinth with GRob
Best Internal Total Times, Pipe stats & Pipe archive
World kuski map, World Cup stats


Top
 Profile  
 
PostPosted: 25 Mar 2017, 20:51 
Offline
Cheatless
User avatar

Joined: 19 May 2002, 17:05
Posts: 4241
milk & water are exactly the same (both simulation and surface generation algorithm), except that water is semi-transparent and milk lacks foam

_________________
[carebox]


Top
 Profile  
 
PostPosted: 25 Mar 2017, 22:22 
Offline
Kuski
User avatar

Joined: 24 Aug 2008, 19:56
Posts: 5510
Location: Southampton, UK
Maybe it's that foam that makes it look unrealistic then? I think I can see why foamy splash may be valid sometimes, but seems like that's the case all the time in the pool video - the foam dominates droplets a lot. How does it look without teh foam?

_________________
Image
Team TR
Multi WR in Labyrinth with GRob
Best Internal Total Times, Pipe stats & Pipe archive
World kuski map, World Cup stats


Top
 Profile  
 
PostPosted: 26 Mar 2017, 00:30 
Offline
Cheatless
User avatar

Joined: 19 May 2002, 17:05
Posts: 4241
it is a rendering issue, that means it doesn't matter - every system already has some rendering implemented, and typically much better than the one used here

_________________
[carebox]


Top
 Profile  
 
PostPosted: 26 Mar 2017, 03:23 
Offline
Kuski
User avatar

Joined: 22 May 2002, 20:53
Posts: 1554
awesome stuff mila!
water and one or two other fluids kinda look like are in a much smaller scale than the objects. Like you're watching the ocean from high up. This gives nice surreal touch (especially to first video) but prolly nat intended...
Anyway, can't wait to play games with real time physics like this!

_________________
"Every night, me go to sleep, me have wet dream..."


Top
 Profile  
 
PostPosted: 26 Mar 2017, 13:28 
Offline
first 35tt
User avatar

Joined: 28 Sep 2002, 19:42
Posts: 4582
Location: LuleƄ, Sweden
Impressive :o

_________________
Image


Top
 Profile  
 
PostPosted: 26 Mar 2017, 18:58 
Offline
Cheatless
User avatar

Joined: 19 May 2002, 17:05
Posts: 4241
insane guy wrote:
water and one or two other fluids kinda look like are in a much smaller scale than the objects. Like you're watching the ocean from high up.

the pool should be approx 6m diameter, so it so kinda big

_________________
[carebox]


Top
 Profile  
 
PostPosted: 26 Mar 2017, 22:27 
Offline
Kuski

Joined: 10 Apr 2015, 16:27
Posts: 18
If you don't import those physics in elma, I'll be disappointed.


Top
 Profile  
 
PostPosted: 28 Mar 2017, 07:51 
Offline
35mins club
User avatar

Joined: 28 Nov 2002, 15:54
Posts: 3693
Location: suo mesta
so the innovation here is real time? or has it been done before?

_________________
Image


Top
 Profile  
 
PostPosted: 28 Mar 2017, 09:43 
Offline
Kuski
User avatar

Joined: 28 May 2007, 08:47
Posts: 910
It's cool and it is beyond the scope of anything I know how to do myself. But I can't help but wonder, how will you make money from this? Some part of me thinks you are the type of person who shares things because you have a future business plan in mind. I could be wrong of course, I only know you through occasional internet comments.

_________________
God Bless America


Top
 Profile  
 
PostPosted: 28 Mar 2017, 10:37 
Offline
Kuski
User avatar

Joined: 21 Feb 2016, 17:59
Posts: 295
they will probably sell/license this tech for use in games. ive seen similar stuff, for example this: https://www.youtube.com/watch?v=Jl54WZtm0QE was made in 2011, what is different with your thing? 6 years in this sort of tech is a long time and it doesnt look that different visual acuity-wise. much less processing power needed or is it just that using machine learning for this is a novel approach or what?

_________________
Image


Top
 Profile  
 
PostPosted: 28 Mar 2017, 13:17 
Offline
Cheatless
User avatar

Joined: 19 May 2002, 17:05
Posts: 4241
Zweq wrote:
so the innovation here is real time? or has it been done before?

yes, the only comparable real-time library is NVIDIA flex, and that one is 10-100x slower depending on the size of simulation (their dependency is not linear)

_________________
[carebox]


Top
 Profile  
 
PostPosted: 28 Mar 2017, 13:19 
Offline
Cheatless
User avatar

Joined: 19 May 2002, 17:05
Posts: 4241
Vermin Supreme wrote:
they will probably sell/license this tech for use in games. ive seen similar stuff, for example this: https://www.youtube.com/watch?v=Jl54WZtm0QE was made in 2011, what is different with your thing?

that's restricted to heightmap + particles generated for a short time on the surface, online in this method ( https://www.youtube.com/watch?v=1o0Nuq71gI4 ), which has already been used in some games

_________________
[carebox]


Top
 Profile  
 
PostPosted: 28 Mar 2017, 15:15 
Offline
Kuski
User avatar

Joined: 27 Jan 2007, 12:53
Posts: 743
Location: Lappeenranta
What is the machine learning part? Is it for finding a new state satisfying the Navier-Stokes equations (or probably some simpler equations since full scientific accuracy is not needed for games etc) after the timestep?

Linearity sounds impressive :)

_________________
FEM2017 20.7.-28.7.
FF-cup on 23.7. at FEM


Top
 Profile  
 
PostPosted: 28 Mar 2017, 15:18 
Offline
Kuski
User avatar

Joined: 22 Oct 2005, 09:32
Posts: 252
Be careful milagros. milagrosnet. Skynet. Terminator who rides on a bike.

_________________
[i cruise, i lev, i live]


Top
 Profile  
 
PostPosted: 28 Mar 2017, 16:50 
Offline
Cheatless
User avatar

Joined: 19 May 2002, 17:05
Posts: 4241
nick-o-matic wrote:
What is the machine learning part? Is it for finding a new state satisfying the Navier-Stokes equations after the timestep?

yes

_________________
[carebox]


Top
 Profile  
 
PostPosted: 29 Mar 2017, 09:06 
Offline
Kuski
User avatar

Joined: 27 Jan 2007, 12:53
Posts: 743
Location: Lappeenranta
milagros wrote:
nick-o-matic wrote:
What is the machine learning part? Is it for finding a new state satisfying the Navier-Stokes equations after the timestep?

yes

Awesome. Is your machine learning method applicable to solving any set of tightly coupled non-linear differential equations? And is this method something you have been working on in university and then began to apply it to fluid simulations?

_________________
FEM2017 20.7.-28.7.
FF-cup on 23.7. at FEM


Top
 Profile  
 
PostPosted: 29 Mar 2017, 13:35 
Offline
Cheatless
User avatar

Joined: 19 May 2002, 17:05
Posts: 4241
nick-o-matic wrote:
Is your machine learning method applicable to solving any set of tightly coupled non-linear differential equations? And is this method something you have been working on in university and then began to apply it to fluid simulations?

yes (I wouldn't say any, but at least for a large class of problems) and yes

_________________
[carebox]


Top
 Profile  
 
PostPosted: 29 Mar 2017, 20:51 
Offline
Kuski
User avatar

Joined: 22 Aug 2005, 12:23
Posts: 2619
Location: Sweden, Gothemburg
Looks cool, I don't know a lot about physics, but I do know a lot about moving water. How did you think/work with the surface tension of the water in this? Is it calculated in at all? For instance, if you drop a ball in the water with speed, it would hit and land hard. Or if the water splashes then the drops forming would be separated from each other and quickly "close up", rather than sticking together... if that makes any sense.

_________________
Team HotHorses, and I'm converting to Icelandian now...


Top
 Profile  
 
PostPosted: 29 Mar 2017, 23:18 
Offline
Cheatless
User avatar

Joined: 19 May 2002, 17:05
Posts: 4241
niN wrote:
Looks cool, I don't know a lot about physics, but I do know a lot about moving water. How did you think/work with the surface tension of the water in this?

not sure what kind of answer do you expect if you say you don't understand physics
it is used only for the "mercury" (parameters are fake) - at the scale used there surface tension is irrelevant and typically ignored (for example in all movies)

_________________
[carebox]


Top
 Profile  
 
PostPosted: 31 Mar 2017, 13:10 
Offline
Kuski

Joined: 5 Dec 2013, 19:46
Posts: 55
looks super cool. would love to see it being used in some dark experimental sandbox game.


Top
 Profile  
 
PostPosted: 3 Apr 2017, 22:51 
Offline
Cheatless
User avatar

Joined: 19 May 2002, 17:05
Posts: 4241
tried to do a nice scene https://www.youtube.com/watch?v=nW_gd1Kity0

_________________
[carebox]


Top
 Profile  
 
PostPosted: 4 Apr 2017, 07:55 
Offline
39mins club
User avatar

Joined: 9 May 2003, 13:30
Posts: 4440
Location: Valmiera, Latvia
Nice ducky action.

_________________
39:37,91


Top
 Profile  
 
PostPosted: 4 Apr 2017, 08:49 
Offline
39mins club
User avatar

Joined: 19 Nov 2005, 10:45
Posts: 4525
Location: Deep in your Imagination, Twirling your Dreams and Weaving your thoughts.
I know you say surface tension is insignificant and therefore ignored, but realistically the cause of surface tension (hydrogen bonding between water molecules) is not insignificant on any scale and ignoring it is probably a significant part of the reason for the difference between real water physics and your water simulation. That said, it's significantly more difficult to emulate something such as hydrogen bonding in such a program, and I think you've done an absolutely phenomenal job simulating this stuff with your own program.

_________________
TT: 39:59:02 | AvgTT: 42:02:00 | Targets: 5 WC, 33 Pro, 16 Good | 20 Australian Records | Cyberscore! |
"Feelings of love are just a temporary lapse in judgement. Like a kind of mental illness." -- Suzumiya Haruhi


Top
 Profile  
 
PostPosted: 4 Apr 2017, 14:59 
Offline
Cheatless
User avatar

Joined: 19 May 2002, 17:05
Posts: 4241
Haruhi wrote:
I know you say surface tension is insignificant and therefore ignored, but realistically the cause of surface tension (hydrogen bonding between water molecules) is not insignificant on any scale

the significance of each term of navier-stokes equations in any scale is quantifiable, so if it's only a fraction of a percent, it is insignificant
also when you simulate galaxies, you don't need anything except gravity, even though stars would not hold together without strong nuclear force or electromagneticm
in any case, as I already mentioned the framework allows for surface tension and it is used for other materials, where it is significant (such as mercury)

_________________
[carebox]


Top
 Profile  
 
PostPosted: 5 Apr 2017, 07:12 
Offline
35mins club
User avatar

Joined: 28 Nov 2002, 15:54
Posts: 3693
Location: suo mesta
Is it deterministic? Let's say you want to make a physics puzzle game with premade objects that should work the same way everytime. For example object A: water container, object B: sandcastle, object C: tube that transfers water from A to B

_________________
Image


Top
 Profile  
 
PostPosted: 5 Apr 2017, 07:43 
Offline
Kuski
User avatar

Joined: 28 May 2007, 08:47
Posts: 910
Milagros you are a figure head of the elma scene and probably a scholar, we are very interested in your project. I was wondering, how will this make money?

_________________
God Bless America


Top
 Profile  
 
PostPosted: 5 Apr 2017, 12:45 
Offline
Cheatless
User avatar

Joined: 19 May 2002, 17:05
Posts: 4241
Zweq wrote:
Is it deterministic? Let's say you want to make a physics puzzle game with premade objects that should work the same way everytime. For example object A: water container, object B: sandcastle, object C: tube that transfers water from A to B

well.. the algorithm is deterministic, CPU implementation gives always the same simulation
however on GPU, there are some parallel summations done with atomic increments and the sum has a floating-point error depending on the order it was summed
then the epsilon error propagates and after a while it is a different simulation
I guess, it could be fixed by using fixed digit precision

_________________
[carebox]


Last edited by milagros on 5 Apr 2017, 12:46, edited 1 time in total.

Top
 Profile  
 
PostPosted: 5 Apr 2017, 12:45 
Offline
Cheatless
User avatar

Joined: 19 May 2002, 17:05
Posts: 4241
gimp wrote:
how will this make money?

by selling the library/plugins to various game/simulation engines

_________________
[carebox]


Top
 Profile  
 
PostPosted: 8 Apr 2017, 18:40 
Offline
39mins club
User avatar

Joined: 19 Nov 2005, 10:45
Posts: 4525
Location: Deep in your Imagination, Twirling your Dreams and Weaving your thoughts.
milagros wrote:
Haruhi wrote:
I know you say surface tension is insignificant and therefore ignored, but realistically the cause of surface tension (hydrogen bonding between water molecules) is not insignificant on any scale

the significance of each term of navier-stokes equations in any scale is quantifiable, so if it's only a fraction of a percent, it is insignificant
also when you simulate galaxies, you don't need anything except gravity, even though stars would not hold together without strong nuclear force or electromagneticm
in any case, as I already mentioned the framework allows for surface tension and it is used for other materials, where it is significant (such as mercury)



Taking the most conservative values I could find for the enthalpy values of hydrogen bonding between OH --- O, the standard enthalpy total of water and the average instantaneous number of hydrogen bonds between molecules in a mass of pure water all at Standard temperature and pressure suggests that the electrostatic value of hydrogen bonding in pure water vapour should be about 12.07% of the total electrostatic attraction, although other research puts the instantaneous number of hydrogen bonds much higher, leading to a potential value as high as 18.38% of total electrostatic attraction.

This, as well, is just in water vapour (gaseous state). I'd anticipate at least somewhat of an increase in this electrostatic attraction in liquid state, hence surface tension. I could be doing my calculations incorrectly - and I'll openly admit to not having studied navier-stokes equations or fluid dynamics in any great detail as a biologist and chemist rather than physicist, but I think 12% probably counts as significant for water.

Aside from the fact that there is an entire biological family of arthropods (Gerridae, or Pond Skaters) with the defining characteristic being their use of water surface tension, you can also easily observe it even in a glass of water - which wouldn't be possible if it was only a fraction of a percent's worth of significance towards water dynamics.

_________________
TT: 39:59:02 | AvgTT: 42:02:00 | Targets: 5 WC, 33 Pro, 16 Good | 20 Australian Records | Cyberscore! |
"Feelings of love are just a temporary lapse in judgement. Like a kind of mental illness." -- Suzumiya Haruhi


Top
 Profile  
 
PostPosted: 8 Apr 2017, 21:20 
Offline
Cheatless
User avatar

Joined: 19 May 2002, 17:05
Posts: 4241
surface tension clearly scales with surface (n^2) and other forces with volume (n^3), thus as the simulation size increases, the relative importance of surface tension goes to 0
the representative scale, at which surface tension starts to lose its importance (a few times more and its unimportant), is related to the size of water drops

_________________
[carebox]


Top
 Profile  
 
PostPosted: 12 May 2017, 21:58 
Offline
Cheatless
User avatar

Joined: 19 May 2002, 17:05
Posts: 4241
it's fucking waterfall!
https://www.youtube.com/watch?v=jjYHqakTrWY

_________________
[carebox]


Top
 Profile  
 
PostPosted: 13 May 2017, 17:46 
Offline
Kuski
User avatar

Joined: 21 Feb 2016, 17:59
Posts: 295
its nice

_________________
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 34 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], culinko and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group