sebbas / blender-mantaflow

Mantaflow integration in Blender
https://developer.blender.org/diffusion/B/browse/fluid-mantaflow/
Other
101 stars 12 forks source link

Shape of domain stays when changed in edit mode, fluid expands rapidly at boundaries #6

Closed GottfriedHofmann closed 7 years ago

GottfriedHofmann commented 7 years ago

Hello Sebastian,

I created a demo that features two bugs:

1: I changed the domain in edit mode but the simulation ignores the new domain shape/size.

  1. The amount of liquid drastically increases when the liquid either touches an obstacle or at the boundaries of the domain.

Link to file: https://www.dropbox.com/s/c0mz79alkbu8kx2/animenable1.blend?dl=1 Demo video: https://www.dropbox.com/s/ihjukp2s4s8ebw0/animenable1.mkv?dl=1

I am using the following build (revision 443d567): https://blenderartists.org/forum/showthread.php?373547-Lets-talk-about-Mantaflow&p=3208878&viewfull=1#post3208878

sebbas commented 7 years ago

Hi Gottfried,

thanks for reporting those two bugs! Bug no. 2 is probably because I set the velocity extrapolation too high (I recently experimented with that). I'll find a better value there.

Bug no 1. is interesting because smoke domains work fine. Let's see

sebbas commented 7 years ago

Okay, both problems were actually related to each other:

When I implemented the obstacle velocities I "switched off" the fractions mode (uses extra grid which tracks fluid/obstacle interaction more precisely). I had to do this to get obstacle velocities to work. They currently don't work together with fractions.

For some reason though, switching this off caused these strange bugs. I just disabled obstacle velocities for liquids and reenabled fractions and now everything seems to work fine.

The plan is now to finish fractions support for obstacle velocities. This way I can enable obstacle velocities again and it's not really necessary to know what actually caused these 2 bugs in the end.

Hope this makes sense, Cheers, Sebastián

thunil commented 7 years ago

Hi Sebastian, good to hear the fractions code fixes the general bevahior! I remember some weird behavior with the domain loosing the scaling information, though, during our tests on Friday. That looked like it's more on the blender side?

Cheers, -> Nils

=== Technical University of Munich , http://wwwge.in.tum.de/ ===

On 23. Jun 2017, at 22:40, Sebastián notifications@github.com wrote:

Okay, both problems were actually related to each other:

When I implemented the obstacle velocities I "switched off" the fractions mode (uses extra grid which tracks fluid/obstacle interaction more precisely). I had to do this to get obstacle velocities to work. They currently don't work together with fractions.

For some reason though, switching this off caused these strange bugs. I just disabled obstacle velocities for liquids and reenabled fractions and now everything seems to work fine.

The plan is now to finish fractions support for obstacle velocities. This way I can enable obstacle velocities again and it's not really necessary to know what actually caused these 2 bugs in the end.

Hope this makes sense, Cheers, Sebastián

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sebbas/BlenderMantaflow/issues/6#issuecomment-310767780, or mute the thread https://github.com/notifications/unsubscribe-auth/APrHfAPMq6j9LKEXz5M3TUgGcTK6y_BRks5sHCKvgaJpZM4N_h9u.

sebbas commented 7 years ago

Hi Nils,

I just figured out what caused all the weird behaviour: the Blender side is fine, I just had one inappropriate line in the Mantascript.

When I disabled everything related to fractions, liquid started sticking to the walls. Obviously this was because phiObs had the outer border (where usually fractions are) set to 0 velocity. I figured that by adding just a const value to phiObs (and in effect shrinking it slightly) I could temporarily overcome this issue.

For a fixed domain this works fine, but when modifying the domain (scaling up like we did on Friday or like Gottfried did in edit mode) everything goes south with that const value.

Long story short: It's probably best not to experiment too much. Once fractions work with obvels everything should sort out itself.

Best, Sebastián

sebbas commented 7 years ago

Issue should be resolved (tested with e3d1f6b). Closing for now.