Physics: Enable liquid meshing by default #120832

Merged
Brecht Van Lommel merged 1 commits from Bartosz-Kosiorek/blender:liquid-mesh into main 2024-04-22 12:26:23 +02:00
Contributor

Problem:
With previous implementation Mesh generation is disabled for Liquid by default.

It is causing confusing for new users, as default Liquid Particle System,
is visible only with X-Ray enabled with Wireframe and Solid view.

Particles are not visible in Material Preview and Rendered view.
It is cauing frustration from new users, and feeling that Blender
is hard to use.

Solution:
Enable Mesh genertion for Liquid by default.

For new user, it would be much easier to setup the liquid simulation

Advanced users should not have problems with disabling Mesh generation,
and tune other parameters for their needs.

Problem: With previous implementation Mesh generation is disabled for Liquid by default. It is causing confusing for new users, as default Liquid Particle System, is visible only with X-Ray enabled with Wireframe and Solid view. Particles are not visible in Material Preview and Rendered view. It is cauing frustration from new users, and feeling that Blender is hard to use. Solution: Enable Mesh genertion for Liquid by default. For new user, it would be much easier to setup the liquid simulation Advanced users should not have problems with disabling Mesh generation, and tune other parameters for their needs.
Bartosz Kosiorek added 1 commit 2024-04-19 17:41:55 +02:00
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
719d20e952
UI: Enable Mesh displaying for Liquid
Problem:
With previous implementation Mesh generation is disabled for Liquid.

It is causing confusing for new users, as default Liquid Particle System,
is visible only with X-Ray enabled with Wireframe and Solid view.

Particles are not visible in Material Preview and Rendered view.
It is cauing frustration from new users, and feeling that Blender
is hard to use.

Solution:
Generate and display Mesh for Liquid by default.

For new user, it would be much easier to setup the liquid simulation

Advanced users should not have problems with disabling Mesh generation,
and tune other parameters for their needs.
Bartosz Kosiorek requested review from Brecht Van Lommel 2024-04-19 17:55:16 +02:00
Brecht Van Lommel approved these changes 2024-04-22 11:49:07 +02:00

@blender-bot build

@blender-bot build
Brecht Van Lommel changed title from UI: Enable Mesh displaying for Liquid as default to Physics: Enable liquid meshing by default 2024-04-22 11:50:09 +02:00
Brecht Van Lommel merged commit a36d7774cc into main 2024-04-22 12:26:23 +02:00
Brecht Van Lommel deleted branch liquid-mesh 2024-04-22 12:26:25 +02:00
First-time contributor

That is not a question of advanced users versus newbies.

That is a good practice to have that disabled.

First simulation attempt is rarely satisfying.
The way to improve simulation quality is often to tweak FLIP particles settings, to increase sampling, to adjust narrow band.
That is not advanced work. That is similar to increasing resolution of simulation.

Mesh generation is slower to compute.The testing phase is slowed down by that.
Blender Liquid simulation is not accelerated by GPU. It is far to be instantaneous.
So, anyways, advanced users will suggest to newbies to disable that, when they are trying to solve their issues.

So, at the end, you are forcing majority of users to disable a setting, to satisfy a minority of them for a poor quality simulation.
Only people that would be satisfied by that, are not newbies but very very advanced users, who are confident that their first setup will work as expected.

Making a good liquid simulation is complicated. But easing the way to create a bad one will not improve Blender reputation.

That is not a question of advanced users versus newbies. That is a good practice to have that disabled. First simulation attempt is rarely satisfying. The way to improve simulation quality is often to tweak FLIP particles settings, to increase sampling, to adjust narrow band. That is not advanced work. That is similar to increasing resolution of simulation. Mesh generation is slower to compute.The testing phase is slowed down by that. Blender Liquid simulation is not accelerated by GPU. It is far to be instantaneous. So, anyways, advanced users will suggest to newbies to disable that, when they are trying to solve their issues. So, at the end, you are forcing majority of users to disable a setting, to satisfy a minority of them for a poor quality simulation. Only people that would be satisfied by that, are not newbies but very very advanced users, who are confident that their first setup will work as expected. Making a good liquid simulation is complicated. But easing the way to create a bad one will not improve Blender reputation.
Author
Contributor

Thanks @RonanDucluzeau for your opinion.

I based this change on my personal experience, and on Blender Tutorials (where in all cases Liquid Meshing is enabled during adding the Liquid domain).

My observations so far regarding enabling Meshing for Liquid:

  • It is now easier to achieve visible results of Liquid SImulations.
  • We are now aligned with Smoke simulation, where no additional step is needed (to display Smoke).
  • Users could now focus on other simulaton issues, which cause displaying errors (too small source of Liquid is causing no Inflow, Liquid collision issues/leaking, etc.). I still think there are too much potential issues, but at least missing enabling Meshing is not a issue anymore.
  • regarding performance, users could still disable meshing if they would need to get some more fps for simulation tuning. At the end, they have to remember to enable meshing. The default resolution (32) is quite low, and I didn't experienced performance issues with Meshing on my low spec machine (Intel Haswell from 2017, with integrated GPU).
Thanks @RonanDucluzeau for your opinion. I based this change on my personal experience, and on Blender Tutorials (where in all cases Liquid Meshing is enabled during adding the Liquid domain). My observations so far regarding enabling Meshing for Liquid: - It is now easier to achieve visible results of Liquid SImulations. - We are now aligned with Smoke simulation, where no additional step is needed (to display Smoke). - Users could now focus on other simulaton issues, which cause displaying errors (too small source of Liquid is causing no Inflow, Liquid collision issues/leaking, etc.). I still think there are too much potential issues, but at least missing enabling Meshing is not a issue anymore. - regarding performance, users could still disable meshing if they would need to get some more fps for simulation tuning. At the end, they have to remember to enable meshing. The default resolution (32) is quite low, and I didn't experienced performance issues with Meshing on my low spec machine (Intel Haswell from 2017, with integrated GPU).
First-time contributor

The wireframe is not really pertinent to inspect the mesh.
Without seeing faces, it is hard to perceive the shape of fluid simulation.
On the contrary, without any mesh and just particles, you can see basic flow of simulation.
Coloring of particles is set-up to perceive speed of particles.

The workflow was supposed to be : user tries to obtain a satisfying flow. When it is done, he tries to obtain a satisfying meshing.
The Smoke workflow is also in same kind of steps : user tries to obtain a satisfying flow. By default, now, from a mesh emitter. But initially, it was a particle system. And then, he tries to set up a satisfying Noise, increasing resolution by its Upres Factor.

The idea is that user should solve animation issues, first. And, then, he will solve render issues.

As you said default resolution is low, nobody will keep it. Set it to 48, and you will see a drop in playback.
Same for domain size. It is just there for an arbitrary splash demo. People will adapt it to their scene.
Same for cache type. At the end, the user is supposed to bake simulation to avoid having surprises, at rendertime.

Quick liquid preset is useful ; because it is creating a Domain object and adding a Fluid modifier to object selected as Flow.
So, it replaces 5 steps by 1.
But, after that, user has still half a dozen of adaptations to scene to make, before thinking about pressing play button.
When play button is pressed, the question is "Does the motion looks right ?". Not the material, the lighting, the smoothing or the transparency.
But when wireframe is over particles, at an higher resolution than 32 ; user can't distinguish anything.

We don't have Geometry nodes assets for fluid simulation, yet. But until then, that will be appreciated not to add extra step to a process, that is already slow by having a lot of them.

The wireframe is not really pertinent to inspect the mesh. Without seeing faces, it is hard to perceive the shape of fluid simulation. On the contrary, without any mesh and just particles, you can see basic flow of simulation. Coloring of particles is set-up to perceive speed of particles. The workflow was supposed to be : user tries to obtain a satisfying flow. When it is done, he tries to obtain a satisfying meshing. The Smoke workflow is also in same kind of steps : user tries to obtain a satisfying flow. By default, now, from a mesh emitter. But initially, it was a particle system. And then, he tries to set up a satisfying Noise, increasing resolution by its Upres Factor. The idea is that user should solve animation issues, first. And, then, he will solve render issues. As you said default resolution is low, nobody will keep it. Set it to 48, and you will see a drop in playback. Same for domain size. It is just there for an arbitrary splash demo. People will adapt it to their scene. Same for cache type. At the end, the user is supposed to bake simulation to avoid having surprises, at rendertime. Quick liquid preset is useful ; because it is creating a Domain object and adding a Fluid modifier to object selected as Flow. So, it replaces 5 steps by 1. But, after that, user has still half a dozen of adaptations to scene to make, before thinking about pressing play button. When play button is pressed, the question is "Does the motion looks right ?". Not the material, the lighting, the smoothing or the transparency. But when wireframe is over particles, at an higher resolution than 32 ; user can't distinguish anything. We don't have Geometry nodes assets for fluid simulation, yet. But until then, that will be appreciated not to add extra step to a process, that is already slow by having a lot of them.
Author
Contributor

I just compared implementation with Flip Fluid:
https://www.youtube.com/watch?v=JRIGxIc5yzA&t=226s

In Flip Fluid you need to:

  1. Add Domain
  2. Add Fluid Source
  3. Click Bake

The simulation is visible in all viewports including render.

What I would like to achieve here, is to make Blender easy to use as in commercial software.
You could install Flip Fluid Demo from:
https://github.com/rlguy/Blender-FLIP-Fluids/wiki/FLIP-Fluids-Demo-Addon

I just compared implementation with Flip Fluid: https://www.youtube.com/watch?v=JRIGxIc5yzA&t=226s In Flip Fluid you need to: 1. Add Domain 2. Add Fluid Source 3. Click Bake The simulation is visible in all viewports including render. What I would like to achieve here, is to make Blender easy to use as in commercial software. You could install Flip Fluid Demo from: https://github.com/rlguy/Blender-FLIP-Fluids/wiki/FLIP-Fluids-Demo-Addon
First-time contributor

That is how was working old simulation, that did not have a Replay cache type, that did not allow particles settings tweaking.
Currently, somebody who wants to work like that, just have to use All cache type, instead of Replay.
If that workflow is seen like the easiest one by people, Blender is already able to do that.

As you can see in video, because what is expected is to see mesh generated, 3D Viewport is in Solid Mode.
That is just Inflow object that has a display limited to wireframe.
Because improvement of Mantaflow was to display particles and be able to tweak particles independently of mesh generation, there is an automatic switch to wireframe mode.

Display in Blender is coherent with Cache Type chosen.

Activating Mesh Generation is annoying people who want to treat it, later.
Being in Wireframe mode is annoying people who want to immediately see mesh.

Good solution would be to create a preference for Fluid Domain creation, based on Cache Type wanted, by default.
If cache type chosen is All, Mesh Generation should be activated. Viewport should not be in Wireframe mode.
If cache type chosen is Modular, it should be deactivated by default. Viewport should be in Solid mode.
If cache type chosen is Replay, there should be additional preferences. Because that could correspond to one preference or the other.
Working on animation by tweaking particles, or looking directly at Mesh.

But if you force a preference by default, you are just exchanging some people complaining for other people complaining.
I don't think that people wanting Mesh Generation by default, will be the more numerous on the long term ; when they will understand that is currently the slower way to preview simulation.

Blender Liquid Simulation does not provide color blending from different inflows. There is no material stuff provided by simulation to look at. Quick Liquid preset is always adding the same Glass material to Domain. Expected result should not be a lot different than what is shown in Material Preview panel.
User may have to increase Max Transparent bounces for Cycles or fix Trransparency Blend Mode and reflection/refraction of material for EEVEE.
But except that, there is no rendering, material issue relative to Liquid Simulation use.

That is how was working old simulation, that did not have a Replay cache type, that did not allow particles settings tweaking. Currently, somebody who wants to work like that, just have to use All cache type, instead of Replay. If that workflow is seen like the easiest one by people, Blender is already able to do that. As you can see in video, because what is expected is to see mesh generated, 3D Viewport is in Solid Mode. That is just Inflow object that has a display limited to wireframe. Because improvement of Mantaflow was to display particles and be able to tweak particles independently of mesh generation, there is an automatic switch to wireframe mode. Display in Blender is coherent with Cache Type chosen. Activating Mesh Generation is annoying people who want to treat it, later. Being in Wireframe mode is annoying people who want to immediately see mesh. Good solution would be to create a preference for Fluid Domain creation, based on Cache Type wanted, by default. If cache type chosen is All, Mesh Generation should be activated. Viewport should not be in Wireframe mode. If cache type chosen is Modular, it should be deactivated by default. Viewport should be in Solid mode. If cache type chosen is Replay, there should be additional preferences. Because that could correspond to one preference or the other. Working on animation by tweaking particles, or looking directly at Mesh. But if you force a preference by default, you are just exchanging some people complaining for other people complaining. I don't think that people wanting Mesh Generation by default, will be the more numerous on the long term ; when they will understand that is currently the slower way to preview simulation. Blender Liquid Simulation does not provide color blending from different inflows. There is no material stuff provided by simulation to look at. Quick Liquid preset is always adding the same Glass material to Domain. Expected result should not be a lot different than what is shown in Material Preview panel. User may have to increase Max Transparent bounces for Cycles or fix Trransparency Blend Mode and reflection/refraction of material for EEVEE. But except that, there is no rendering, material issue relative to Liquid Simulation use.
First-time contributor

There is probably a poor chance that a new preference will be accepted for something that should be replaced by nodes.

So, instead, I suggest that you split Quick Liquid operator into two operators.

  • Quick Liquid Particles operator ( that would set Viewport to Wireframe mode and keep Mesh Generation disabled. )
  • Quick Liquid Mesh operator ( that would set Viewport to Solid mode and enable Mesh Generation. )

The best way to improve Quick Liquid simulation setup for newbies would be to provide usecase/quality presets for the whole Fluid modifier, like there are for Cloth modifier.

There is probably a poor chance that a new preference will be accepted for something that should be replaced by nodes. So, instead, I suggest that you split Quick Liquid operator into two operators. * Quick Liquid Particles operator ( that would set Viewport to Wireframe mode and keep Mesh Generation disabled. ) * Quick Liquid Mesh operator ( that would set Viewport to Solid mode and enable Mesh Generation. ) The best way to improve Quick Liquid simulation setup for newbies would be to provide usecase/quality presets for the whole Fluid modifier, like there are for Cloth modifier.

I think this behavior change is fine as is, making it more compatible with the rest of Blender. Toggling of the mesh generation is trivial for those who want that. I don't think we need to make this more complicated.

I think this behavior change is fine as is, making it more compatible with the rest of Blender. Toggling of the mesh generation is trivial for those who want that. I don't think we need to make this more complicated.
First-time contributor

That change makes situation worse for some people, without making it optimal for somebody.

Figure 1 is what it looked like before change.
Figure 2 is what it looks like, now.
Figure 3 is probably optimal mesh visualisation, people were expecting.

Figure 1 or Figure 3 may satisfy some people. But Figure 2 makes sense for nobody.

That change makes situation worse for some people, without making it optimal for somebody. Figure 1 is what it looked like before change. Figure 2 is what it looks like, now. Figure 3 is probably optimal mesh visualisation, people were expecting. Figure 1 or Figure 3 may satisfy some people. But Figure 2 makes sense for nobody.
Author
Contributor

Do you mean that particles should be disabled?

Do you mean that particles should be disabled?
First-time contributor

I always mean that what is coherent, to how the fluid simulation was improved in 2.82, was to make no change, at all.
Copying UI of other software does not make sense, if UX to how use the tool is still completely different.
Do what is good for the tool, we have. Don't copy what we don't have, without understanding it.

Switching to Wireframe mode and keeping Mesh Generation disabled, in order to see particles, is coherent with the idea to build simulation step by step.
Only seeing particles is sufficient to have an idea, if motion is correct. By tweaking particles display size, user can have a relatively good idea of what shape, he can expect obtaining at Mesh Generation. And, then, for Mesh Generation, user can focus on improving smoothing of the simulation.

But if you don't want to follow that path and prefer to force activation of Mesh Generation : do it in a pertinent way.
Don't continue to switch viewport to Wireframe mode. Switch it to Solid mode.

Anyways, default of particles display size is too small for a domain of several meters, and mesh generation is taking into account a particle radius 2 times higher than its physical radius. So, you don't have to disable particles display. They are not visible in Solid mode, unless the domain is scaled down by user to dozens of centimeters.

But if you were creating presets for Liquid Simulation, a pertinent particles display size could be set for simulation, with a domain of few meters. And another pertinent one could be set for a domain of few dozen of centimeters.

I always mean that what is coherent, to how the fluid simulation was improved in 2.82, was to make no change, at all. Copying UI of other software does not make sense, if UX to how use the tool is still completely different. Do what is good for the tool, we have. Don't copy what we don't have, without understanding it. Switching to Wireframe mode and keeping Mesh Generation disabled, in order to see particles, is coherent with the idea to build simulation step by step. Only seeing particles is sufficient to have an idea, if motion is correct. By tweaking particles display size, user can have a relatively good idea of what shape, he can expect obtaining at Mesh Generation. And, then, for Mesh Generation, user can focus on improving smoothing of the simulation. But if you don't want to follow that path and prefer to force activation of Mesh Generation : do it in a pertinent way. Don't continue to switch viewport to Wireframe mode. Switch it to Solid mode. Anyways, default of particles display size is too small for a domain of several meters, and mesh generation is taking into account a particle radius 2 times higher than its physical radius. So, you don't have to disable particles display. They are not visible in Solid mode, unless the domain is scaled down by user to dozens of centimeters. But if you were creating presets for Liquid Simulation, a pertinent particles display size could be set for simulation, with a domain of few meters. And another pertinent one could be set for a domain of few dozen of centimeters.
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#120832
No description provided.