Friday, July 13, 2007

Anitbugs

An antibug is a bug that combines with another bug and "fixes" it. Last night I found quite a few bugs and then had to spend most of the night finding the corresponding antibugs. These were infact quite big bugs in the sense that they where mathematical in nature. So if the size of the particles was changed, the results were quite simply wrong. Fixing this has meant some performance improvements as well. Unfortunately it means I didn't finish the plugin to a beta 0.5 yet. Also I have two more things to add to the list of todo's. Firstly I want to put in the advanced Options and a "reset" button.

So here is the suface version of the jump with the old code:
Old code Jump

Here is a new version of the jump with the fixed code:
New code Jump
New code Jump, Side View

12 comments:

Anonymous said...

Wow - this is looking amazing. Great work. Can't wait to give it a try.

Julian

deltaepsylon said...

This looks amazing, cant wait to give it a try.

How do you plan on integrating this with blender?

bob said...

the blender integration will be with a python bridge interface. Python in blender is very good, and will alow a interface very similar to nt fluid stuff that is already there.

I will look at nt stuff again though. If his stuff does what I want there really is no need to integrate it back into blender.

Also I have zero intention of putting this code into C/C++.

deltaepsylon said...

what method of fluid simulation is used, navier-stokes?

bob said...

navier-stokes is the *equation* that describes fluid dynamics. The different *methods* are different ways to numerically solve the NS equation.

I use Smooth partical hydrodynamics which is a meshless method. Basically is a bunch of particles where the rules of interaction are designed to accurately solve the NS equation in the usall limits (infinatly small particals). And to bound error terms in practical problems.

This is in contrast to the fluid solver in Blender that uses LBM solver (implemented on a regular mesh).

Or traditional FEM that dominated the field for so long. Mesh less methods seem to have found there way to the front of the field now. But FEM still make up the bulk of commercial and R&D (aka NASA) Fluid solvers.

Real flow uses lots of different methods depending on what you are doing. ie deep ocean waves (called gravity waves) have a sepreate solver. Very good and fast for the open sea, but useless for filling a glass of water. The Possion equation is solved for ripples (its linear and you can used multgrid methods)

Anonymous said...

Bob - if this can be seen as the impact after appendix removement, I´ll start to ask if the surgeon can´t find another appendix by chance?

Just kidding here of course.

Well done - I´m also eagerly waiting that looks really cool.

Harald /vidiot

bob said...

My nick is based of the Dirac delta, Defender of the integrator...eh anyway, i was thinking more on the lines of physics pluigin since i want to add some dynamics that can interact with the fluids...

Anonymous said...

Hi Deltor,
it´s been a while since the last comment - so I thought because of that and the upcoming AoI 2.5, - I start to ask about your progress with the plugin.

I´m pretty sure you´ll be responsible for some more C02 output on our planet after release ;)

Cheers
Harald

bob said...

yes. its been a while. Ironically I'm working on it today. Don't think it will be quite ready though. I'm all 2.4 at the moment, but i don't expect that moving up to 2.5 will be a problem and will happen as soon as its a proper release. There is some code in there for me, that will speed up the isosurface stuff a lot.

Nik777 said...

Hey Bob,

Just thought I'd pop over and see how things were progressing. :o)

I *really* enjoyed the "jump" animations. The difference between the old and new code is also quite pronounced...

Anyway, keep up the great work, and "break a leg", as we programmers say ;o)

Cheers!
Nik

vidiot said...

Hello Bob,

as promised, I´ll keep on asking about the progress you made.

So are there some news?
I´m also interested in what you say about difference between ocean waves or filling a glass of water.
Is the isosurface stuff useful for both? Regardless which equation is used? Or are meshes usually faster but not better? Can I also "bake" animations with isosurfaces?

Cheers
Harald

bob said...

Sorry, progress hasn't happened lately. I was helping Jordan with her science a lot, and I went to the frequency festival. Hoping this weekend will be a starter, last weekend should have been, but I just could not get motivated.

Anyway. The idea with different sovlers for different fluid flow ranges are you can leave out some of the math and make it quicker and use less ram. For example I can get a accurate Ocean wave type model with a 2d grid as long as the depth is large compared to the wave. But these types of gravity waves are infact nonlinear. Where the very small ripples you see in a glass are surface tension waves and are linear and don't really care so much about depth. (linear is easy, nonlinear is hard)

When you do these things for visual effects its even more important to understand the difference between looking good and accuracy. Ocean wave don't need to be accurate, they need to look good. Smoke does not need to be accurate it needs to "billow" and swirl nicely.

My system is very similar to blenders in the way you use it. So yes you bake the simulation.