Age | Commit message (Collapse) | Author |
|
|
|
Adds toggle to graph editor (View->Show Extrapolation). When disabled, then fcurves only draw over the keyframe range. For baked fcurves, the range is all sampled points. For ghost fcurves, extraplation is always drawn since the sampled points may include extrapolated points of the original fcurve.
Show Extrapolation is the default.
___
**Technical Notes**:
- `draw_fcurve_curve()`: There are now explicit checks for floating point poor accuracy cases. Without them, then there would be visual flickering when no extrapolation is drawn and there is a discontinuity at the end (due to cyclic modifier). This removes the need for the `+samplefreq` in `etime = v2d->curxmax + samplefreq`. It also removes the need to do so on `fcu_start/fcu_end`.
- `draw_fcurve_curve()`: Besides the previous note, the only other meaningful change is the `if(!draw_extrapolation)` branch which just changes `stime/etime` to match the keyframe bounds instead.
Differential Revision: https://developer.blender.org/D10442
|
|
Since these enums are only used in a single function, they can be
defined where they are used. Similar to rB2f60e5d1b56dfb8c9104.
|
|
This commit adds a drop-down to the attribute randomize node to support
a few operations on the values of existing attributes: "Replace/Create"
(the existing behavior), "Add", "Subtract", and "Multiply".
At this point, the operations are limited by what is simple to implement.
More could be added in the future, but there isn't a strong use case
for more complex operations anyway, and a second math node can be used.
Differential Revision: https://developer.blender.org/D10269
|
|
Currently every attribute node assumes that the attribute exists on the
"points" domain, so it generally isn't possible to work with attributes
on other domains like edges, polygons, and corners.
This commit adds a heuristic to each attribute node to determine the
correct domain for the result attribute. In general, it works like this:
- If the output attribute already exists, use that domain.
- Otherwise, use the highest priority domain of the input attributes.
- If none of the inputs are attributes, use the default domain (points).
For the implementation I abstracted the check a bit, but in each
node has a slightly different situation, so we end up with slightly
different `get_result_domain` functions in each node. I think this makes
sense, it keeps the code flexible and more easily understandable.
Note that we might eventually want to expose a domain drop-down to some
of the nodes. But that will be a separate discussion; this commit focuses
on making a more useful choice automatically.
Differential Revision: https://developer.blender.org/D10389
|
|
Ref T84819
Build System
============
This is an API breaking new version, and the updated code only builds with
OpenColorIO 2.0 and later. Adding backwards compatibility was too complicated.
* Tinyxml was replaced with Expat, adding a new dependency.
* Yaml-cpp is now built as a dependency on Unix, as was already done on Windows.
* Removed currently unused LCMS code.
* Pystring remains built as part of OCIO itself, since it has no good build system.
* Linux and macOS check for the OpenColorIO verison, and disable it if too old.
Ref D10270
Processors and Transforms
=========================
CPU processors now need to be created to do CPU processing. These are cached
internally, but the cache lookup is not fast enough to execute per pixel or
texture sample, so for performance these are now also exposed in the C API.
The C API for transforms will no longer be needed afer all changes, so remove
it to simplify the API and fallback implementation.
Ref D10271
Display Transforms
==================
Needs a bit more manual work constructing the transform. LegacyViewingPipeline
could also have been used, but isn't really any simpler and since it's legacy
we better not rely on it.
We moved more logic into the opencolorio module, to simplify the API. There is
no need to wrap a dozen functions just to be able to do this in C rather than C++.
It's also tightly coupled to the GPU shader logic, and so should be in the same
module.
Ref D10271
GPU Display Shader
==================
To avoid baking exposure and gamma into the GLSL shader and requiring slow
recompiles when tweaking, we manually apply them in the shader. This leads
to some logic duplicaton between the CPU and GPU display processor, but it
seems unavoidable.
Caching was also changed. Previously this was done both on the imbuf and
opencolorio module levels. Now it's all done in the opencolorio module by
simply matching color space names. We no longer use cacheIDs from OpenColorIO
since computing them is expensive, and they are unlikely to match now that
more is baked into the shader code.
Shaders can now use multiple 2D textures, 3D textures and uniforms, rather
than a single 3D texture. So allocating and binding those adds some code.
Color space conversions for blending with overlays is now hardcoded in the
shader. This was using harcoded numbers anyway, if this every becomes a
general OpenColorIO transform it can be changed, but for now there is no
point to add code complexity.
Ref D10273
CIE XYZ
=======
We need standard CIE XYZ values for rendering effects like blackbody emission.
The relation to the scene linear role is based on OpenColorIO configuration.
In OpenColorIO 2.0 configs roles can no longer have the same name as color
spaces, which means our XYZ role and colorspace in the configuration give an
error.
Instead use the new standard aces_interchange role, which relates scene linear
to a known scene referred color space. Compatibility with the old XYZ role is
preserved, if the configuration file has no conflicting names.
Also includes a non-functional change to the configuraton file to use an
XYZ-to-ACES matrix instead of REC709-to-ACES, makes debugging a little easier
since the matrix is the same one we have in the code now and that is also
found easily in the ACES specs.
Ref D10274
|
|
Currently moving or changing an object references in a node modifier's
node group does not trigger re-evaluation. Because there is no collection
relation in the dependency graph, we must add the relation to all objects
in the collection individually.
|
|
This commit makes the geometry output of the collection info usable.
The output is the geometry of a collection instance, but this commit
adds a utility to convert the instances to real geometry, used in the
background whenever it is needed, like copy on write.
The recursive nature of the "realize instances" code is essential,
because collection instances in the `InstancesComponent`, might have no
geometry sets of their own containing even more collection instances,
which might then contain object instances, etc.
Another consideration is that currently, every single instance contains
a reference to its data. This is inefficient since most of the time
there are many locations and only a few sets of unique data. So this
commit adds a `GeometryInstanceGroup` to support this future optimization.
The API for instances returns a vector of `GeometryInstanceGroup`.
This may be less efficient when there are many instances, but it makes
more complicated operations like point distribution that need to iterate
over input geometry multiple times much simpler.
Any code that needs to change data, like most of the attribute nodes,
can simply call `geometry_set_realize_instances(geometry_set)`,
which will move any geometry in the `InstancesComponent` to new "real"
geometry components.
Many nodes can support read-only access to instances in order to avoid
making them real, this will be addressed where needed in the near future.
Instances from the existing "dupli" system are not supported yet.
Differential Revision: https://developer.blender.org/D10327
|
|
|
|
Ids stored in the `id` attribute cannot be assumed to be unique. While they
might be unique in some cases, this is not something that can be guaranteed
in general. For some use cases (e.g. generating "stable randomness" on points)
uniqueness is not important. To support features like motion blur, unique ids
are important though.
This patch implements a simple algorithm that turns non-unique ids into
unique ones. It might fail to do so under very unlikely circumstances, in
which it returns non-unique ids instead of possibly going into an endless
loop.
Here are some requirements I set for the algorithm:
* Ids that are unique already, must not be changed.
* The same input should generate the same output.
* Handle cases when all ids are different and when all ids are the same
equally well (in expected linear time).
* Small changes in the input id array should ideally only have a small
impact on the output id array.
The reported bug happened because cycles found multiple objects with
the same id and thought that it was a single object that moved on every
check.
Differential Revision: https://developer.blender.org/D10402
|
|
|
|
These warnings were not detected by Windows compiler as the Linux compiler does.
|
|
|
|
The problem was the stroke was reproject flat to view if the axis was View. Now, if the operation is using depth, the stroke is not reprojected.
Related to T85082
|
|
|
|
Baking vertex colors per-corner leads to unwanted discontinuities when there is
sampling noise, for example in ambient occlusion or with a bevel shader node for
normals. For this reason the code used to always average results per-vertex.
However when using split normals, multiple materials or UV islands, we do want to
preserve discontinuities. So now bake per corner, but make sure the sampling seed
is shared for vertices.
Fix T85550: vertex color baking crash with split normals, Ref D10399
Fix T84663: vertex color baking blending at UV seams
|
|
The nodes update function geo_node_volume_to_mesh_update would not run
if it is not the very first node in the tree.
If the update function is not run, there are sockets not cleared from
the SOCK_UNAVAIL flag (but this needs to be done -- these get available
depending on the chosen mode).
Havent tracked down why this was actually updating when it was the first
node in the tree, but now make sure we always get an update by specifing
an appropriate RNA update callback for the property.
Maniphest Tasks: T85558
Differential Revision: https://developer.blender.org/D10403
|
|
|
|
It is perfectly valid that an attribute does not exist and cannot be created.
For example, this can happen when a mesh does not contain any vertices.
|
|
|
|
This patch will share the AOV settings between Cycles and Eevee.
It enable using the AOV name conflict detection of Blender. This
means that unlike how Cycles used to work it isn't possible to add an
AOV with a similar name. Conflicts with internal render pass names will
be indicated with an Warning icon.
Reviewed By: Brecht van Lommel
Differential Revision: https://developer.blender.org/D9774
|
|
This makes it so that normals are tagged dirty whenever the position
attribute is requested for writing. This seems like a good default. If the
calling code is aware of normals, it could untag normals when they are
not changed by the operation.
Differential Revision: https://developer.blender.org/D10397
|
|
In 2.81 there was a change to increase the performance of viewport
animation rendering. This change would perform the color management on the
GPU if the only 8bit was needed. This saved CPU cycles and data
transfer.
The issue is that in the image editor or when saving the image the CM
will be reapplied. Although the speed is desired, exporting the actual
colors has more priority.
In the ticket there is an analysis that shows that shows that this fix
is the correct short term step to take. It would be better that the
render result is aware of the color space of its buffers so the applying
color management could be skipped when saving to disk or drawing in the
image editor.
The issue with this change is the performance penalty it has.
Reviewed By: Brecht van Lommel
Maniphest Tasks: T79999
Differential Revision: https://developer.blender.org/D10371
|
|
In 2.81 there was a change to increase the performance of viewport
animation rendering. This change would perform the color management on the
GPU if the only 8bit was needed. This saved CPU cycles and data
transfer.
The issue is that in the image editor or when saving the image the CM
will be reapplied. Although the speed is desired, exporting the actual
colors has more priority.
In the ticket there is an analysis that shows that shows that this fix
is the correct short term step to take. It would be better that the
render result is aware of the color space of its buffers so the applying
color management could be skipped when saving to disk or drawing in the
image editor.
The issue with this change is the performance penalty it has.
Reviewed By: Brecht van Lommel
Maniphest Tasks: T79999
Differential Revision: https://developer.blender.org/D10371
|
|
The previous behavior meant that changing an objects visibility
effectively changed the current mode - which missed necessary
updates for the tool-system (for example).
There was already a check for edit-mode, now expected to all modes.
This makes the test-case described in T83013 work as expected.
|
|
Adds a new property called "Confirm On Release" that does what it says,
confirm the action without having to do left-click or to press any other
extra-key which concludes in a more dynamic and efficient way of changing
brush size or strength for example, especially for tablet users.
Reviewed By: campbellbarton
Ref D10233
|
|
Use Python 3.8's API for setting the initial configuration.
This replaces a mix of our logic and direct calls to the Python API
and has no user visible changes.
Using the Python API makes the logic easier to follow and provides
utilities such as `PyConfig_SetBytesArgv`
that wasn't available in previous releases.
Note that this uses Python's utf8/wchar_t conversions,
which used to cause problems (see T31506).
Since `Py_UTF8Mode` was set, the systems locale isn't used for decoding,
allowing us to use Python's utility functions that call
`Py_DecodeLocale` internally.
Ref D10382
|
|
|
|
This removes Python version checks needed to build with 3.8+ and 3.7x.
Ref D10381
|
|
|
|
It was not following the own documentation at the top code that mentions
that for local API the prefix is "bpygpu_".
|
|
|
|
|
|
This was just a copy and paste error / typo. The proper DNA variable
wasn't used. Thanks @charlie for finding the issue.
|
|
As this is used only in corner cases, it is better keep in advanced panel.
Also renamed to "Limit to Viewport"
|
|
|
|
Having a vertex group in a mesh slowed down unrelated operations
such as selection.
De-duplicating custom-data arrays for layers that contain pointers
can become slow without any benefit as the content never matches.
Use full copies when storing custom-data for edit-mesh undo.
|
|
Differential Revision: https://developer.blender.org/D10387
|
|
|
|
Caused by rB0f95f51361d7.
Similar to T85515, T84717 and their related fixes.
In this case, add missing shading notifier as in rB9274bd457a25.
Maniphest Tasks: T85543
Differential Revision: https://developer.blender.org/D10395
|
|
It's not necessary to check if the link has to be removed,
if it was removed already.
This regression was caused by rB8f707a72e81833bb835324ddc635b29dfbe87a9f.
|
|
This commit makes links connected to multi-input sockets spread verticaly
along the socket. Sockets grow if more links are connected and the node
layout updates accordingly. Links are sorted by their incoming angle
to avoid crossing links. Also, link picking is updated to work with
spread links and bezier links.
Currently the multi-input sockets are used in the join geometry node.
The mutli-input sockets look like a vertical rounded rectangle.
Currently they do not support the other custom socket shapes.
Reviewed By Hans Goudey, with cleanup and additional edits
Differential Revision: https://developer.blender.org/D10181
|
|
This updates the join node to use the new multi-input socket from D10067.
The change just requires slightly changing the arguments of the exec
function, and changing the socket input list.
Note that this commit does not contain the UI changes, it only allows for
more input links, and combines the two sockets into one. The UI changes
will come next.
Reviewed By: Hans Goudey
Differential Revision: https://developer.blender.org/D10069
|
|
The DNA struct name for the node storage was incorrect.
|
|
|
|
This just avoids the crash, the annotation tool still doesn't work.
Larger changes will be needed to resolve this, see T85532.
|
|
|
|
|
|
|
|
|