Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
Comment or remove unused defines.
|
|
Those kind of checks are handy to have for generic processing...
|
|
If ID doesn't want to do user counting it shouldn't be in main.
|
|
The issue was caused by the hair step checking whether
particle system needs to have path cache. This was done
in a way which was traversing an entire scene and was
checking every object for particle instance modifier.
Ideally, path cache should be an own operation in the
dependency graph. Or at least, this flag should be set
by dependency graph builder, similar to curve's path.
Since the code was broken already (it was only checking
first particle instance modifier), it is easier to
remove the buggy code, solve the crash and move on for
now.
If this causes an issue, simply set particle system to
be rendered as path.
Fixes crash with playback of Spring scenes.
|
|
Part of T60660
|
|
|
|
|
|
The value worked in 2.7, but not with copy-on-write in 2.8.
|
|
Do not see why flags from loaded file should be skipped when we do not
load UI, this is not related to UI...
Think we can keep flags from file in both cases, should this raise some
other issue we'll just have to fine tune masked flags in each case
separately.
|
|
Similar to masking grids, need to also check existing grid level.
This is because edit mode might leave allocated grid with 0 levels.
|
|
|
|
Treat those vertices as infinitely sharp. This matches the way
how OpenSubdiv's topology is being created.
|
|
This helps to generate cleaner topology and define sharp features for dynamic
topology. Best used on relatively low-poly meshes, it is not needed as much
for high detail areas and has a performance impact.
Differential Revision: https://developer.blender.org/D4189
|
|
This line looks a mistake and it's not needed.
|
|
It seems more predictable, and makes more sense for future multi-object modes.
|
|
Compositor makes a copy of mask before sampling the mask on different
time steps. The copy of layers did not copy falloff Settings.
|
|
The issue was caused by the lack of averaging of normals for
vertices which are on the ptex face boundaries.
|
|
This is more like a band-aid than a real fix actually, real fix would be
to understand why rendering smoke requires auto texspace to be ON
(afaict, this was not the case in 2.7x)...
But I've already spent way too much time on this issue, at least now we
get better situation than before (i.e. smoke with adaptive domain works
well even when orig domain mesh has autospace flag disabled).
|
|
Not sure why that was that way (can't remember any good reason at least,
so assuming this is a dummy mistake from own rB33cbcd73448f), this
should be done in any case.
|
|
Free the BVH tree immediately along with the mesh, otherwise we might access
invalid mesh data.
Differential Revision: https://developer.blender.org/D4201
|
|
After rename is done we need to make sure all copies of
corresponding datablocks are updated in all dependency
graphs: otherwise bone will have a new name, but animation
will still be using an old one.
|
|
The issue was caused by intermediate DerivedMesh being created with
scene's Simplify settings taken into account. This is what happens
when one area makes implicit decisions based on whether passed Scene
pointer is not NULL.
Made it so ignoring simplification serttings is an explicit flag,
which makes it easier to follow what's going on.
|
|
This is actually a workaround for the crash in OpenSubdiv.
Topology refiner will have a crash when special conditions
are met:
- Refiner is configured to use infinitely sharp patches.
- Refinement happens for the level 1 (which we call Quality 1 on
Blender side).
- Mesh has non-quad faces.
The workaround is to force refinement to happen to level 2 (or
quality 2 on Blender side) when those conditions are met.
Later on with the next OpenSubdiv update we can remove this
workaround, since there was work done on OpenSubdiv side to
deal better with such configurations.
The modifier will now be somewhat slower, but this will be
compensated with upcoming topology cache enabled by default.
The workaround is done when initializing settings, so the
comparison of topology refiner settings is happening without
any extra workarounds there.
|
|
|
|
|
|
|
|
Not only were those often making doublons with already existing
BLI_math's stuff, but they were also used to hide implicit type
conversions...
As usual this adds some more exotic inlined vector functions (one of
the rare cases where I really miss C++ and its templates... ;) ).
|
|
Prevents clang-format merging into a single line.
|
|
|
|
Before that only normal component was averaged, which is not
really correct.
Unfortunately, the new code is somewhat slower due to more
involved math to deal properly with non-quad faces, but the
plan is to move averaging from runtime to edit time, This
means, that mdisps will always be continuous around the edges
and no averaging on every frame change of animated character
will be needed.
|
|
|
|
|
|
The idea is to run reshaping for every boundary vertex
of a grid rather than trying to copy boundary grid
elements.
While this is somewhat slower, this avoids all this
tangent flipping magic, which tempts to be rather tricky
and fragile.
|
|
|
|
The boundary copy code was not dealing correct with flipping
tangent vectors, hence causing discontinuity in the final
positions.
Now we only copy boundaries for quads, where we know how to
deal with tangent vectors and where we know that this is
needed.
More clear solution could be to change the code in a way that
handles handles displacement grids of quads in the same way
as it's done for non-quad faces.
|
|
|
|
|
|
Some of Eevee's Bloom defaults are not very good for physically based rendering. This patches addresses this issue.
This picture shows one of the problems with current default. Bloom looks very foggy:
{F6280495}
Even worse, light emitters much dimmer than the Sun can make everything equally hazy if Clamp is set to 1.0 and intensity to 0.8 (current default). Artists often forget to adjust Clamp value and do not know what value to use for realistic intensity. Also, currently both Clamp and Intensity do not have good UI ranges. This is why often Eevee renders end up very hazy and bloom often does not look right.
Bloom effect plays important role to help to distinguish between bright and relatively dim light sources. With current defaults this is broken because Clamp set to 1.0. Also, it cannot be disabled if set to 0 like expected. This patch fixes this and sets it to 0 by default. If users need to clamp, they can do so easily with UI range up to 1000. This range is good enough for most cases and provides enough precision to control lower values, and the highest value helps to limit bloom from the Sun if necessary and will leave untouched most other light emitters. If needed, much higher values for Clamp can be entered manually up to 100000. 10000 is still affects the Sun, but up to 100000 highest limit allows to clamp anything that is much brighter than the Sun if user needs to limit bloom in such cases (for example, bright explosion in the sky or anything else very bright).
I propose new default for bloom Intensity - 0.05 and UI range to suggests realistic values. Bloom Intensity > 0.1 is not realistic for clean lens but the user can enter manually much larger values if needed.
For comparison, here is a my own photo with and without bloom caused by the Sun (on second photo the Sun was occluded with an object).
{F6280500}
{F6280492}
In real life bloom is much more subtle and does not look hazy. If Clamp is disabled, then out of 0.1, 0.05 and 0.025 values I have tried, 0.05 looks most similar to the photo. Here is test render with and without bloom with the Sun in similar position like on the photo:
{F6280496}
{F6280494}
Using color probe 27x27 I compared lightness below the horizon under the Sun. In rendered by Eevee images lightness difference was 17. In case of the photos lightness difference in similar place was 11. I then compared leftmost spot (also below the horizon) and lightness difference was approximately 2 between two photos and 1 between rendered images. In other words, with these settings bloom effect is not too strong and is not too weak. Visually it may seem like decreasing bloom intensity may increase photorealism, but then bloom effect would be too localized even for the Sun.
Besides this single test, I tested in many other scenes as well, with and without the Sun, with different HDRIs, and as far as I can tell 0.05 intensity turned out to be good default - it produces bloom strong enough to be noticeable and not too hazy.
In Cycles shutter default value is 0.50, so for consistency set to 0.5 by default in Eevee too. Besides, 0.5 is typical standard for real cameras, and values higher than 0.5 usually are needed only if very strong motion blur is desired.
Here is summary of all changes:
Bloom Intensity: 0.8 > 0.05
Bloom Intensity UI range: 0-10 > 0-0.1
Bloom Clamp: 1.0 > 0.0 (disabled by default)
Bloom Clamp manual range: 0-1000 > 0-100000
Bloom Clamp UI range: 0-10 > 0-1000
Shutter: 1.0 > 0.5
This patch is related to the discussion in this thread, there are more examples of what bloom will look like with 0.05 intensity by me and others:
https://devtalk.blender.org/t/eevee-needs-to-have-physically-based-defaults/4700
Reviewers: fclem
Reviewed By: fclem
Subscribers: pablovazquez, billreynish, rboxman
Tags: #eevee
Differential Revision: https://developer.blender.org/D4212
|
|
|
|
|
|
|
|
There was no documentation at all, some very bad practices (like using
G.debug_value > 0 as some sort of global debug print switch), and even
an overlapping use of '1' value...
Also, python setter did not check for valid range (since this is a
short, not an int).
|
|
This code has been disabled (hidden behind a specific debug value) for
over 10 years now! More than time to get rid of it...
|
|
Reported/noted in D4178, it would return immediatly in case of NULL
source ID, without ensuring that return 'copied' ID was properly
initialized.
|
|
|
|
Main idea is to remove IDs to be deleted from Main, to avoid looping on
them to remove other deleted IDs usage (this is the most expensive
process in ID deletion, by far).
Speed improvements when deleting a large amount of IDs from a Main
containing a lot of them is quite significant, some examples for Objects:
* Removing 1k from 10k: 32% quicker (2.5s to 1.7s).
* Removing 10k from 20k: 60% quicker (59s to 23s).
* Removing 20k from 20k: 99.5% quicker (82s to 0.4s)!
Note however that this process is more risky/touchy, since we by-pass
some safety checks from regular ID removal here.
So will only give access to that code from python API for now (in
separate commit), so that it gets really tested. Also still need to
think about how to hook it up in UI (probably mostly for Outliner),
since we often do higher-level operations there...
|
|
Seems to be caused by cae3750 which changed free() function used
by bmain free to the one which does dependency graph tag. We do
no want to do any tags here.
|