Age | Commit message (Collapse) | Author |
|
This commit adds functions to set and get the object's active
modifier, which is stored as a flag in the ModifierData struct,
similar to constraints. This will be used to set the context in
the node editor. There are no visible changes in this commit.
Similar to how the node editor context works for materials, this commit
makes the node group displayed in the node editor depend on the active
object and its active modifier. To keep the node group from changing,
just pin the node group in the header.
* Shortcuts performed while there is an active modifier will affect
only that modifier (the exception is the A to expand the modifiers).
* Clicking anywhere on the empty space in a modifier's panel will make it active.
These changes require some refactoring of object modifier code. First
is splitting up the modifier property invoke callback, which now needs
to be able to get the active modifier separately from the hovered
modifier for the different operators.
Second is a change to removing modifiers, where there is now a separate
function to remove a modifier from an object's list, in order to handle
changing the active.
Finally, the panel handler needs a small tweak so that this "click in panel"
event can be handled afterwards.
|
|
This is the initial merge from the geometry-nodes branch.
Nodes:
* Attribute Math
* Boolean
* Edge Split
* Float Compare
* Object Info
* Point Distribute
* Point Instance
* Random Attribute
* Random Float
* Subdivision Surface
* Transform
* Triangulate
It includes the initial evaluation of geometry node groups in the Geometry Nodes modifier.
Notes on the Generic attribute access API
The API adds an indirection for attribute access. That has the following benefits:
* Most code does not have to care about how an attribute is stored internally.
This is mainly necessary, because we have to deal with "legacy" attributes
such as vertex weights and attributes that are embedded into other structs
such as vertex positions.
* When reading from an attribute, we generally don't care what domain the
attribute is stored on. So we want to abstract away the interpolation that
that adapts attributes from one domain to another domain (this is not
actually implemented yet).
Other possible improvements for later iterations include:
* Actually implement interpolation between domains.
* Don't use inheritance for the different attribute types. A single class for read
access and one for write access might be enough, because we know all the ways
in which attributes are stored internally. We don't want more different internal
structures in the future. On the contrary, ideally we can consolidate the different
storage formats in the future to reduce the need for this indirection.
* Remove the need for heap allocations when creating attribute accessors.
It includes commits from:
* Dalai Felinto
* Hans Goudey
* Jacques Lucke
* Léo Depoix
|
|
|
|
Scaling of forces needs more work. Before making changes to them it would be nice to have a setup, that works physically correct across multiple modifiers (cloth, rigid bodies, fluid).
This will be a to do for 2.92.
|
|
|
|
The clamp is too aggressive and results in forces being too weak.
|
|
|
|
Proper way to check for DEBUG_PRINT is to do `if defined` check rather
than `if`: this is because in non-debug builds the symbol is not defined.
|
|
Proper way to check for DEBUG_PRINT is to do `if defined` check rather
than `if`: this is because in non-debug builds the symbol is not defined.
|
|
|
|
Removed 0.2f factor when setting forces. Why this factor has been used when forces should only be clamped, nobody knows ..
|
|
|
|
|
|
Basic support for velocity updates with the APIC method.
This commit adds APIC to the already existing dropdown menu for the simulation method. The APIC plugin within Mantaflow has been updated to the latest version.
|
|
This issue is specific to Windows and should be resolved with the extra checks (untested).
|
|
Being able to adjust the distance between fluid and obstacles comes in handy when trying to achieve a fluid motion over inclined obstacles.
Depending on the slope of such obstacles, already small adjustments of this value can help when particles stick to obstacle surfaces (i.e. make particles not stick to obstacles).
|
|
Precision 'Mini' should only be available for liquids domains.
|
|
A general refactor / fix commit that should clear out the issues that have been reported on external forces and moving effectors (e.g. T79537, T81660, T80088).
|
|
When creating a particle system to display simulated particles, the phystype needs to be set to 'no physics' so that particle positions are just copied and not integrated.
|
|
Mistake in my own commit rBd3b59d1358.
|
|
This will make the "Reset to Default Value" operator in button right
click menus work for the fluid modifier. Before they always reset
the values to 0.
Differential Revision: https://developer.blender.org/D9206
|
|
Follow our code style guide by using C-comments for text descriptions.
|
|
Issue was introduced in rB8d1123ba220b.
|
|
Do not escape flow / effector objects if they have a disabled use flow / use effector flag.
Vertex velocities still need to be kept track of in order to have correct object velocities when enabling flows / effectors intermittenly. It is possible though to skip the emission loop if the flags are disabled.
|
|
This refactor is in response to an unreported bug in which overlapping, moving colliders produced an unstable simulation.
Things that change apart from cleanup through this refactor:
- Effector objects with no velocities (either non-animated or animated but non-moving object) will explicitly set zero velocities in their flow bounding box.
- When applying object velocities to the global grid, they will now be accumulated per cell (add and not set velocities). Later they will be averaged with the object count at any cell.
|
|
Following the most widely used convention for including todo's in
the code, that is: `TODO(name):`, `FIXME(name)` ... etc.
|
|
All the changes made in the branch `soc-2020-fluid-tools` are included in this patch.
**Major changes:**
=== Viewport Display ===
- //Raw voxel display// or //closest (nearest-neighbor)// interpolation for displaying the underlying voxel data of the simulation grids more clearly.
- An option to display //gridlines// when the slicing method is //single//.
==== Grid Display ====
- Visualization for flags, pressure and level-set representation grids with a fixed color coding based on Manta GUI.
==== Vector Display ====
- //**M**arker **A**nd **C**ell// grid visualization options for vector grids like velocity or external forces.
- Made vector display options available for external forces.
==== Coloring options for //gridlines// ====
- Range highlighting and cell filtering options for displaying the simulation grid data more precisely.
- Color gridlines with flags.
- Also, made slicing and interpolation options available for Volume Object.
Reviewed By: JacquesLucke, sebbas
Differential Revision: https://developer.blender.org/D8705
|
|
Crash was caused by an incorect domain size of the noise solver and an index out of bounds.
|
|
Load all grids when the grid display option is turned on. Otherwise, the grid from the viewport display options might not have been loaded from the cache.
|
|
|
|
No functional changes
|
|
|
|
Also order sizeof(..) first to promote other values to size_t.
|
|
|
|
|
|
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/blenkernel` module.
No functional changes.
|
|
Make curly brackets consistent.
|
|
Renders
The problem in this case was that the flag for active fire was not set. With hidden flow sources the flag was not updated in update_flowsflags().
The solution for this is to take the active field from the config cache file.
|
|
Before: If the current frame is out of the cache start/end range, the viewport will show the fluid as it was on the last frame that was still in the cache frame range.
Now: If the current frame is out of the cache start/end range, the viewport will show no fluid at all (even if there are cache files present for this frame).
This fix is related / in response to T79423.
|
|
Instead of clearing forces at the end of the simulation step, they will now be cleared before writing to them, i.e. at the beginning of a step.
Also cleaned up minor areas that I looked at while making this change.
|
|
Yet another update to ensure that pointer variables are always up to date, i.e. those referencing the memory allocated by Mantaflow. Outdated pointers usually show up through flickering in viewport.
|
|
In f2b04302cdec the pointer update was refactored. It was sufficient to update pointers just in replay mode at the end of a step since the 'ensure()' functions from manta_fluid_API.cpp had their own pointer update call. These were removed in 51f4bee5a5d7, however, and so in order to still have some sort of update, the given update call needs to be available to all cache types.
|
|
A collection of multiple changes that had been living in my stash:
- Use nullptr instead of NULL in C++ files
- Removed unused/deprecated functions from headers
- Cleared animatable flag in cache UI
- Comment cleanups
|
|
Use static_cast() where possible and refresh pointers for every frame when in replay mode. The latter is particularly important as this seems to have caused the issue where smoke in the viewport was flickering when loading data from pointers after loading them from disk for the frame before (e.g. when resuming a bake job).
|
|
simulation
New option that lets users the define the maximum number of fluid particles that will be allowed in the simulation. This can come in handy, for example, to ensure that the particle count will not exceed the hardware capabilities, or to avoid excessive amounts of particles in a scene.
|
|
|
|
This refactor is in response to reports in which the adaptive domain with noise caused a crash (e.g. T79009). It should also fix issues where the smoke appeared to be cut off when using the adaptive domain together with noise. It is also possible that some of these changes improve the lines issue from T74559.
|
|
Fixes issue with .bobj.gz and .obj mesh files not always being scaled correctly in the viewport.
|
|
Reviewers: sebbas
Differential Revision: https://developer.blender.org/D8281
|
|
Implemented G.moving suggestion from comments.
|