Age | Commit message (Collapse) | Author |
|
Rendering directly to a resource using OpenGL interop and Hgi
doesn't work in Houdini, since it never uses the resulting resource
(it does not call `HdRenderBuffer::GetResource`). But since doing
that simultaneously disables mapping (`HdRenderBuffer::Map` is
not implemented then), nothing was displayed. To fix this, keep
track of whether a Hydra viewport does support displaying a Hgi
resource directly, by checking whether
`HdRenderBuffer::GetResource` is ever called and only enable use
of OpenGL interop if that is the case.
Differential Revision: https://developer.blender.org/D15090
|
|
Must include the AOV writing feature in background shader evaluation.
Differential Revision: https://developer.blender.org/D15114
|
|
Move MNEE to own kernel, separate from shader ray-tracing. This does introduce
the limitation that a shader can't use both MNEE and AO/bevel, but that seems
like the better trade-off for now.
We can experiment with bigger kernel organization changes later.
Differential Revision: https://developer.blender.org/D15070
|
|
When multiple objects are in edit mode, UVs for the objects, except for
the first one (in rendering order) appear corrupted. The corruption is
because the UVs are not evaluated as the compute shader is not bound,
thus we read unitialized memory.
We keep track of the currently bound shader in the GPU context in order
to avoid unnecessary shader switches in case the same shader is used in
consecutive calls. However, the shader used by the OpenSubdiv evaluator
is not part of Blender and therefore not tracked via the GPU context.
When extracting UVs for multiple objects, we only ever run a single
shader (FVar evaluation). However, between the compute calls, we also
call the OpenSubdiv stencil evaluation shader, which uses `glUseProgram`
modifying the current program, outside of our control, which then also
unbinds the Blender compute shader making the compute dispatch fail ("No
active compute shader").
The fact that extracting the UVs for the first rendered object works is
because another (Blender) shader was bound in the GPU context prior to
our binding of our evaluation shader.
To fix this, we remember, in the OpenSubdiv evaluator, the current
program so that it can be reset after the stencil program is done.
Differential Revision: https://developer.blender.org/D15064
|
|
Building problem introduced on 24e74f8bef813820. It affects `make lite`
and other builds that skip OpenSubdiv.
|
|
Subdivision did not properly update when evaluating first without and then with
orco coordinates. Now update the subdivision evaluator settings every time, and
reallocate the vertex data buffer when needed.
there is an additional issue in this file where orco coordinates are not
available immediately on the first frame when they should be, and only appear
on the second frame. However that is an old limitation related to the depsgraph
not getting re-evaluated on viewport display mode changes, here we just fix the
crash.
|
|
After recent changes to Nishita sky to clamp negative colors, the pixels ended
up a bit brighter which lead to them exceeding the half float max value. The
CUDA float to half function seems to need clamping.
|
|
Code was not yet updated to use generic attributes for vertex colors. This also
makes generic attributes work for adaptive subdivision.
|
|
Regenerate blackbody RGB curve fit to not clamp values, and extend down to
800K since it does now change below 965K.
Note that as before, blackbody is only defined in the range 800K to 12000K
and has a fixed value outside of that. But within that range there should
be no more unnecessary gamut clamping.
|
|
Found those missing casts while looking into a crash report made in
the Blender Chat. Was unable to reproduce the crash, but the casts
should totally be there to avoid integer overflow.
|
|
* Rename ambiguous rgb to scene_linear in some places
* Precompute matrices to directly go to scene instead of through XYZ
* Make function signatures more consistent
|
|
Between scene linear and sRGB, XYZ, linear Rec.709 and ACES2065-1.
And add some clarifications about color spaces in the docs.
Fixes T98267
Ref T68926
Differential Revision: https://developer.blender.org/D14989
|
|
Not sure why constructing a ustring inside [] is causing issues here, but
it's slightly more efficient to construct it once anyway.
|
|
This makes changes to the opensubdiv module to support additional vertex data
besides the vertex position, that is smootly interpolated the same way. This is
different than varying data which is interpolated linearly.
Fixes T96596: wrong generated texture coordinates with GPU subdivision. In that
bug lazy subdivision would not interpolate orcos.
Later on, this implementation can also be used to remove the modifier stack
mechanism where modifiers are evaluated a second time for orcos, which is messy
and inefficient. But that's a more risky change, this is just the part to fix
the bug in 3.2.
Differential Revision: https://developer.blender.org/D14973
|
|
|
|
Ensure the correct total/diffuse/transmission depth is set when evaluating
shaders for MNEE, consistent with regular light shader evaluation.
Differential Revision: https://developer.blender.org/D14902
|
|
Match SVM and ensure valid reflection when setting up BSDFs.
|
|
|
|
Made tangent frame consistent across the surface regardless of the sample,
which was not the case with the previous algorithm. Previously, a tangent
frame would stay consistent for the same sample throughout the walk, but not
from sample to sample for the same triangle. This actually resulted in code
simplification.
Also includes additional fixes:
* Fixed an important bug that manifested itself with multiple lights in the
scene, where caustics had abnormally low amplitude: The final light pdf did
not include the light distribution pdf.
* Removed unnecessary orthonormal basis generation function, using cycles'
native one instead.
* Increased solver max iteration back to 64: It turns out we sometimes need
these extra iterations in cases where projection back to the surface takes
many steps. The effective solver iteration count, the most expensive part,
is actually much less than the raw iteration count.
Differential Revision: https://developer.blender.org/D14931
|
|
Avoid 'parameter unused' warning when building Cycles without
OpenImageDenoise.
No functional changes.
Over-the-shoulder reviewed by @sergey
|
|
Assume geometry is always potentially animated, since we can't use our heuristic
to detect if the object is potentially animated by looking at modifiers on the
object.
The main original reason for this check was to avoid evaluating subdivision
surfaces for many static objects, which is not happening here anyway.
|
|
Differential Revision: https://developer.blender.org/D14893
|
|
Differential Revision: https://developer.blender.org/D14901
|
|
These aren't really ideal for rendering, but better to show something. Edge
values are averaged at vertices.
|
|
It was wrongly writing passes twice, for both the surface entry and exit points.
We can skip code for filtering closures, emission and holdout also, as these do
nothing with only a subsurface diffuse closure present.
|
|
|
|
The Russian roulette probability was not taken into account for volumes in all
cases. It should not be left out from the SD_HAS_ONLY_VOLUME case.
|
|
Move to a subpanel of the Settings panel. Otherwise it seems like it's a
setting of one of the shader nodes.
|
|
evice_update_preprocess is supposed to detect modified attributes and flag the
device_vector for a copy through device_update_flags. However, since object
attributes are only created in device_update_attributes afterwards, they can't
be included in that check.
Change the function that actually updates the device_vector to tag it as
modified as soon as its content gets updated.
Differential Revision: https://developer.blender.org/D14815
|
|
A shader node setup accidentally used the bump normal as emission. Bump
mapping nodes are excluded from light shader evaluation to reduce kernel size
and register pressure, but in that case should write zero instead of leaving
memory uninitialized.
Thanks to Lukas for helping identify the cause.
|
|
If the render gets cancelled before the first sample finishes.
|
|
All released versions appear to work fine. Also slightly change wording.
|
|
At the frame before/after an object starts moving, it's transform may not be
modified but its motion would be and requires an update.
|
|
|
|
The Multiscatter GGX code was missing the same-side checks for incoming and
outgoing directions w.r.t. to shading and geometry normal.
Should not be needed for the Glass variant since it intentionally has both
reflection and transmission.
|
|
Add "stageMetersPerUnit" render setting for USD files that have that set to
something other than the default (e.g. exported by Blender).
And fix a crash when an application creates a Hydra render pass on a thread
that does not have an OpenGL context current.
|
|
Long term, this should replace the XML format. This reuses the Hydra render
delegate implementation, and so supports the same features. The same command
line options and GUI work for both XML and USD also.
The implementation of this is still disabled, waiting for some refactoring of
USD library linking. However we want the Cycles code to be in sync between
repositories for the 3.2 release.
Ref T96731
|
|
* Leave code for building the render delegate against other applications and
their USD libraries to the Cycles repository, since this is not a great fit.
In the Blender repository, always use Blender's USD libraries now that they
include Hydra support.
* Hide non-USD symbols from the hdCycles shared library, to avoid library
version conflicts.
* Share Apple framework linking between the standalone app and plugin.
* Add cycles_hydra module, to be shared between the standalone app and plugin.
* Bring external libs code in sync with standalone repo, adding various missing
libraries.
* Move some cmake include directories to the top level cycles source folder
because we need to control their global order, to ensure we link against the
correct headers with mixed Blender libraries and external USD libraries.
|
|
OpenGL support was removed from Blender's USD precompiled libraries. This
is currently only useful when building against other applications anyway.
|
|
Like --cycles-print-stats for Blender.
|
|
This does not affect Blender integration, but gives better defaults for
Cycles standalone.
|
|
|
|
* Float/double promotion warnings were mainly meant for avoiding slow
operatiosn in the kernel. Limit it to that to avoid hard to fix warnings
in Hydra.
* Const warnings in Hydra iterators.
* Unused variable warnings when building without glog.
* Wrong camera enum comparisons in assert.
* PASS_UNUSED is not a pass type, only for pass offsets.
|
|
Fix 'unused parameter' warning when building without OpenColorIO.
No functional changes.
|
|
Need to use get() instead of is_property_set() for properties
which are not defined as Property.
|
|
It was kept for forward compatibility during 2.7x.
Reference rB5a45ccaf3e5102ee571599fa9f26a78ac1f6d0f4
|
|
|
|
Currently, the `eval` and `pdf` are not explicitly set to zero when a BSDF sample is invalid (e.g., below the upper hemisphere), when calling
`bsdf_sample` or `bsdf_eval`. It is assumed that `eval` and `pdf` are set to zero before these functions are called, which can cause problems if not.
This patch fixes this potential problem by explicitly setting `eval` and `pdf` to zero when the sampled direction is invalid.
I also added a sanity check if `eval` and `pdf` are valid (i.e., >= 0.f).
The check is activated when build in debug mode and with the `WITH_CYCLES_DEBUG` set to `ON`.
Reviewed By: brecht, sergey
Differential Revision: https://developer.blender.org/D14776
|
|
When converting from XYZ to RGB it can happen, in some sky models, that the resulting RGB values are negative.
Atm, this is not considered and the returned values for the sky model can be negative.
This patch clamps the returned RGB values to be `= 0.f`
Reviewed By: brecht, sergey
Differential Revision: https://developer.blender.org/D14777
|
|
This fixes wrong render passs and bounce limits.
Differential Revision: https://developer.blender.org/D14737
|