New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect liquid surface scale #414

Closed
PavelBlend opened this Issue Jan 23, 2019 · 4 comments

Comments

Projects
None yet
2 participants
@PavelBlend
Copy link

PavelBlend commented Jan 23, 2019

System Information

Blender Version: 2.79b f4dc9f9d68b
FLIP Fluids Version: 9.0.5
Operating System: Windows 7 64 bit
CPU: AMD A8 5600K 3.60GHz 4 Core
GFX: None
RAM: 8 GB

Describe the bug

The surface of the fluid does not match the debug particles. This is due to the fact that the scale of the surface is not correct.

To Reproduce

Open the blend file and run the simulation.
surface_scale_bug.zip

Expected Behaviour

The scale of the surface must be 1.0

Actual Behaviour

Liquid surface scale is not 1.0

Screenshots

222

@rlguy rlguy added the bug label Jan 23, 2019

@rlguy

This comment has been minimized.

Copy link
Owner

rlguy commented Jan 23, 2019

Hey PavelBlend,

Thanks for the report! I was able to reproduce this error.

This bug is caused by a rounding/precision error when calculating the resolution within the addon. In your scene, the resolution is set to 50. The addon was calculating the resolution to be 50.00000111758712, which was rounded up to 51. This caused the fluid mesh to be scaled up slightly to match the resolution of 51.

This bug has been fixed and will be included in the next update which will be available either this Friday (Jan 25th) or next Friday (Feb 1st).

- Ryan

@rlguy rlguy closed this Jan 23, 2019

@PavelBlend

This comment has been minimized.

Copy link
Author

PavelBlend commented Feb 2, 2019

It seems this problem has remained in version 9.0.5.3:
01
test_scene_01.zip

@rlguy rlguy reopened this Feb 3, 2019

@rlguy

This comment has been minimized.

Copy link
Owner

rlguy commented Feb 5, 2019

Hey PavelBlend,

Thanks for letting me know! I just had a chance to check this out and it looks like this is a result of bad code design. I'm calculating the resolution differently in different areas of the addon/simulator. This is leading to different resolution values which is causing incorrect scale:

inconsistent_grid

I'll redesign how the addon/simulator handles resolution and grid dimension calculations so that that can be fixed in the next version.

- Ryan

@rlguy

This comment has been minimized.

Copy link
Owner

rlguy commented Feb 7, 2019

Alright, hope this is all fixed now! I have update the way we calculate grid dimensions/resolution to be the same between the UI resolution, debug display, simulation, and mesh scaling. This fix will be included in the next version update (1.0.5)

@rlguy rlguy closed this Feb 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment