Age | Commit message (Collapse) | Author |
|
* Split render/ into scene/ and session/. The scene/ folder now contains the
scene and its nodes. The session/ folder contains the render session and
associated data structures like drivers and render buffers.
* Move top level kernel headers into new folders kernel/camera/, kernel/film/,
kernel/light/, kernel/sample/, kernel/util/
* Move integrator related kernel headers into kernel/integrator/
* Move OSL shaders from kernel/shaders/ to kernel/osl/shaders/
For patches and branches, git merge and rebase should be able to detect the
renames and move over code to the right file.
|
|
|
|
Add a Fast GI Method, either Replace for the existing behavior, or Add
to add ambient occlusion like the old world settings.
This replaces the old Ambient Occlusion settings in the world properties.
|
|
This is still useful in some cases even if not used by OpenImageDenoise. In
the future this may be replaced with a more generic system to control render
passes and filtering, but for now this just does what it did before.
|
|
|
|
The idea is to allow having a lot of non-intersecting volumes without
allocating volume stack to its full size.
With the F11285472 file the memory usage goes from 1400 MiB to 1000
on the RTX6000 card.
The fix makes it so the integrator work memory is allocated after
scene update which has downside of possible less efficient update
when some textures don't fit GPU memory, but has an advantage of
making proper decision and having a clear and consistent internal API.
Fixes memory part of T92014.
Differential Revision: https://developer.blender.org/D12966
|
|
The approach didn't turn out to be that useful after all as there
are unavoidable dependencies of data from the device. For example,
to know whether object intersects volume or not it is required to
run displacement kernels.
The way of splitting host and device updates caused state where
some data is not yet available, causing confusion and leaving
code to be error-prone.
|
|
|
|
Taking advantage of the new decoupled main and shadow paths. For CPU we
just store two nested structs in the integrator state, one for direct light
shadows and one for AO. For the GPU we restrict the number of shade surface
states to be executed based on available space in the shadow paths queue.
This also helps improve performance in benchmark scenes with an AO pass,
since it is no longer needed to use the shader raytracing kernel there,
which has worse performance.
Differential Revision: https://developer.blender.org/D12900
|
|
These transparent shadows can be expansive to evaluate. Especially on the
GPU they can lead to poor occupancy when only some pixels require many kernel
launches to trace and evaluate many layers of transparency.
Baked transparency allows tracing a single ray in many cases by accumulating
the throughput directly in the intersection program without recording hits
or evaluating shaders. Transparency is baked at curve vertices and
interpolated, for most shaders this will look practically the same as actual
shader evaluation.
Fixes T91428, performance regression with spring demo file due to transparent
hair, and makes it render significantly faster than Blender 2.93.
Differential Revision: https://developer.blender.org/D12880
|
|
Better not to tempt anyone from using unsafe access to device
functionality during host update.
|
|
The lookup tables are to be initialized after device free.
On Linux was only noticeable when rendering default cube scene with
an extra assert. On Windows it was causing an assert in STL in debug
builds.
Differential Revision: https://developer.blender.org/D12918
|
|
|
|
|
|
|
|
There is not enough time before the release to improve Random Walk to handle
all cases this was used for, so restore it for now.
Since there is no more path splitting in cycles-x, this can increase noise in
non-flat areas for the sample number of samples, though fewer rays will be traced
also. This is fundamentally a trade-off we made in the new design and why Random
Walk is a better fit. However the importance resampling we do now does help to
reduce noise.
Differential Revision: https://developer.blender.org/D12800
|
|
Only count volume objects after shader optimization.
Allows to discard objects which don't have effective volume
BSDF connected to the shader output (i.e. constant folded,
or non-volume BSDF used by mistake).
Solves memory regression reported in T92014.
There is still possibility to improve memory even further
for cases when there are a lot of non-intersecting volume
objects, but that requires a deeper refactor of update
process. Will happen as a followup development.
Differential Revision: https://developer.blender.org/D12797
|
|
The longer-term goal is to separate host-only scene update
from device update: make it possible to make kernel features
depend on actual scene state and flags.
This change makes it so shaders are compiled before kernel
load, making checks like "has_volume" available at the
kernel features calculation state.
No functional changes are expected at this point.
Differential Revision: https://developer.blender.org/D12795
|
|
artifacts
Enabling or disabling motion blur requires rebuilding the BVH of affected geometry and
uploading modified vertices to the device (since without motion blur the transform is
applied to the vertex positions, whereas with motion blur this is done during traversal).
Previously neither was happening when persistent data was enabled, since the relevant
node sockets were not tagged as modified after toggling motion blur.
The change to blender_object.cpp makes it so `geom->set_use_motion_blur()` is always
called (regardless of motion blur being toggled on or off), which will tag the geometry
as modified if that value changed and ensures the BVH is updated.
The change to hair.cpp/mesh.cpp was necessary since after motion blur is disabled,
the transform is applied to the vertex positions of a mesh, but those changes were not
uploaded to the device. This is fixed now that they are tagged as modified.
Maniphest Tasks: T90666
Differential Revision: https://developer.blender.org/D12781
|
|
|
|
|
|
Was causing extra overscan pixels, and was confusing multiple workers
check after fix T91994.
|
|
The overscan change from D12599 lacked proper handling of window
when slicing buffer for multiple devices.
|
|
Previously the storage here was optimized to avoid indirections in BVH2
traversal. This helps improve performance a bit, but makes performance
and memory usage of Embree and OptiX BVHs a bit worse also. It also adds
code complexity in other parts of the code.
Now decouple triangle and curve primitive storage from BVH2.
* Reduced peak memory usage on all devices
* Bit better performance for OptiX and Embree
* Bit worse performance for CUDA
* Simplified code:
** Intersection.prim/object now matches ShaderData.prim/object
** No more offset manipulation for mesh displacement before a BVH is built
** Remove primitive packing code and flags for Embree and OptiX
** Curve segments are now stored in a KernelCurve struct
* Also happens to fix a bug in baking with incorrect prim/object
Fixes T91968, T91770, T91902
Differential Revision: https://developer.blender.org/D12766
|
|
Make volume stack allocated conditionally, potentially based on the
actual nested level of objects in the scene.
Currently the nested level is estimated by number of volume objects.
This is a non-expensive check which is probably enough in practice
to get almost perfect memory usage and performance.
The conditional allocation is a bit tricky.
For the CPU we declare and define maximum possible volume stack,
because there are only that many integrator states on the CPU.
On the GPU we declare outer SoA to have all volume stack elements,
but only allocate actually needed ones. The actually used volume
stack size is passed as a pre-processor, which seems to be easiest
and fastest for the GPU state copy.
There seems to be no speed regression in the demo files on RTX6000.
Note that scenes with high nested level of volume will now be slower
but correct.
Differential Revision: https://developer.blender.org/D12759
|
|
|
|
Implement an overscan support for tiles, so that adaptive sampling can
rely on the pixels neighbourhood.
Differential Revision: https://developer.blender.org/D12599
|
|
For example, crash when attempting to use OptiX denoiser on systems
without OptiX-capable device.
Perform check that scene update happened without errors.
Note that `et_error` makes progress to cancel, so the code was
simplified a bit.
|
|
This previously only work for CPU rendering, and isn't that practical to get
working in the new architecture.
|
|
* Add OutputDriver, replacing function callbacks in Session.
* Add PathTraceTile, replacing tile access methods in Session.
* Add more detailed comments about how this driver should be implemented.
* Add OIIOOutputDriver for Cycles standalone to output an image.
Differential Revision: https://developer.blender.org/D12627
|
|
* Split GPUDisplay into two classes. PathTraceDisplay to implement the Cycles side,
and DisplayDriver to implement the host application side. The DisplayDriver is now
a fully abstract base class, embedded in the PathTraceDisplay.
* Move copy_pixels_to_texture implementation out of the host side into the Cycles side,
since it can be implemented in terms of the texture buffer mapping.
* Move definition of DeviceGraphicsInteropDestination into display driver header, so
that we do not need to expose private device headers in the public API.
* Add more detailed comments about how the DisplayDriver should be implemented.
The "driver" terminology might not be obvious, but is also used in other renderers.
Differential Revision: https://developer.blender.org/D12626
|
|
Replacement for float curve in legacy Attribute Curve Map node.
Float Curve defaults to [0.0-1.0] range.
Reviewed By: JacquesLucke, brecht
Differential Revision: https://developer.blender.org/D12683
|
|
This change fixes an issue when scene has a shadow catcher and film is
configured to be transparent. Starting viewport render and making the
background non-transparent will cause bad memory access (wrong render
and possibly crash).
Film passes depends on transparency of background, so check for this.
Demo file: F10650585
Differential Revision: https://developer.blender.org/D12666
|
|
Expose them to the interface, and stop rendering as soon as possible.
Differential Revision: https://developer.blender.org/D12617
|
|
We were writing large 2048x2048 tiles into EXR files, which appears to cause
integer overflow inside the OpenEXR library when there are multiple passes. Now
use smaller tiles in the image file, while still rendering large tiles.
This adds the requirement that the render tile size must be a multiple of 128
or be smaller than 128, this is adjusted automatically.
|
|
|
|
|
|
|
|
Goal is to add the length attribute to the Hair Info node, for better control over color gradients or similar along the hair.
Reviewed By: #eevee_viewport, brecht
Differential Revision: https://developer.blender.org/D10481
|
|
|
|
|
|
|
|
Differential Revision: https://developer.blender.org/D12601
|
|
For the default startup was showing -14:-08.-48 as a remaining time.
Was an integer overflow when specifying total number of pixel-samples.
|
|
Making object which uses volume shader invisible will mark the shader
as not having a volume, forcing re-compilation of the shader to bring
it back to a consistent state.
The compilation is happening as part of scene update, which needs to
know kernel features. So there is a feedback loop.
Use more relaxed way of knowing whether there is a volume in the
shader for the kernel features, which doesn't require shader to be
compiled first.
Solves issues from the report, but potentially causes extra memory
allocated if the volume part of graph is fully optimized out. This
downside is solvable, but would need to split scene update into two
steps (the one which requires on kernel, and the one which does not).
It will be an interesting project to tackle, but for a bug fix is
better to use simpler solution.
|
|
working
There was an optimization to remove duplicate storage of normals as attributes
when using normal maps. However for named attributes like this we still need to
store the attribute.
Don't request normal attribute from the normal map node now, instead of skipping it
in the geometry code.
|
|
Samples count pass is normalized to the overall number of samples.
This means that we need to store actual value of the samples in the
tile buffer file.
A bit annoying to pull all those settings to BufferParams and need
to find a more generic solution, but for now this is easiest and a
quickest solution.
Differential Revision: https://developer.blender.org/D12597
|
|
|
|
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
|
|
|