Jump to content

View more

Image of the Day

#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

Sign up now

Building background knowledge for high level math-physics

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 elix   Members   


Posted 20 December 2013 - 10:20 AM



I use physics in my studies but I can't go further, lack of my math-physics knowledge hold me back. I have a Bs. degree on Computer Science and MS. degree on Game Technologies but still I don't understand the language used in siggraph papers. Implementing physical rules is not my problem, there are so many theorems, different mathematical terms etc. I can't understand what they are trying to tell. Many times when I look at the code I understand how that does the magic but I still don't understand the things mentioned in the related description part.



I will tell about my current problem to make clear my position;

Currently I am working on fluid dynamics. Here is Jos Stam's paper,  unlike the other papers it explains the things quite clear, although it doesn't dive into all details. I have understood all the parts but I couldn't comprehend the process of making velocity vector field mass conserving. In a sample implementation here is the comment of the project() method which is responsible for that task:


     * Use project() to make the velocity a mass conserving,
     * incompressible field. Achieved through a Hodge
     * decomposition. First we calculate the divergence field
     * of our velocity using the mean finite differnce approach,
     * and apply the linear solver to compute the Poisson
     * equation and obtain a "height" field. Now we subtract
     * the gradient of this field to obtain our mass conserving
     * velocity field.
I want to understand such things when I see. I don't want to give up but it seems that searching for the terms that I am not familiar through google and wikipedia doesn't work. I asked if there are some video tutorials smile.png, but these topics... you know. Then I accepted that I need to reserve more time and build some background first. There are some courses in ocw. I am planning to check them for now.(I have basic background on linear algebra, differential eqns, numerical analysis)
Now, what kind of roadmap would you suggest? 

Edited by elix, 20 December 2013 - 02:54 PM.

#2 cadjunkie   Members   


Posted 20 December 2013 - 09:56 PM

If you want to understand fluid dynamics, then I suggest picking up an introductory book on it. The math is a different matter, IMHO. I don't pretend to understand why Hodge decomposition works for this, so I can't help you there.


This paper is actually very interesting. As an mechanical engineer, I have a decent understanding of fluid dynamics and the Navier-Stokes equations. After reading this paper, it's interesting that they don't exactly follow the Navier-Stokes equations because of the problems when dealing with nonlinear partial differential equations. I always wondered how games handle fluids because real CFD is even hard to set up so it runs right in a proper solver, let alone program a solver that runs in real-time. 

Edited by cadjunkie, 20 December 2013 - 09:57 PM.

#3 elix   Members   


Posted 22 December 2013 - 11:22 AM

Yes, as mentioned in the paper for computer simulations the emphasis is on stability and speed. Physical accuracy is secondary, visually satisfactory results are enough.


I want to make an application about an art form called 'ebru'. It is something like this. I had already an implementationof this traditional fluid simulation by copying algorithms but as you see ebru is a little bit different, I need to comprehend the details and manipulate according to my needs. 


I've understood somethings about the divergence field by checking the code, I think I can not be that patient and start with somethings experimental smile.png



Edited by elix, 22 December 2013 - 11:23 AM.

#4 cadjunkie   Members   


Posted 23 December 2013 - 11:43 AM

Wow...that's some pretty intense artwork. That would be awesome if you could make something like that. It might actually be worth starting from the base concepts of Navier-Stokes to figure out how Stam's code works. I would recommend "Fundamentals of Fluid Mechanics" by Munson as a good introductory text for learning about the different pieces of Navier-Stokes. For math concepts, I would familiarize myself with differential equations, particularly the Poisson equation.


FWIW, I think Stam's code will work for you. The thing he warns about are large diffusion rates, which you won't have because it seems that ebru art uses high viscosity fluids. I think you'll have to get or empirically determine viscosity and density values for the fluid medium and the oils (or whatever the colored fluid is) that make things visually correct.

#5 elix   Members   


Posted 24 December 2013 - 07:11 AM

At first I also thought that Stam's method would work but as you dive into details it differs so much. I am aware that building a very successful implementation is difficult. For now my aim is to come up with something works. I can share the results here.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.