Age | Commit message (Collapse) | Author |
|
Using the `MEM_*` API from C++ code was a bit annoying:
* When converting C to C++ code, one often has to add a type cast on
returned `void *`. That leads to having the same type name three times
in the same line. This patch reduces the amount to two and removes the
`sizeof(...)` from the line.
* The existing alternative of using `OBJECT_GUARDED_NEW` looks a out
of place compared to other allocation methods. Sometimes
`MEM_CXX_CLASS_ALLOC_FUNCS` can be used when structs are defined
in C++ code. It doesn't look great but it's definitely better. The downside
is that it makes the name of the allocation less useful. That's because
the same name is used for all allocations of a type, independend of
where it is allocated.
This patch introduces three new functions: `MEM_new`, `MEM_cnew` and
`MEM_delete`. These cover the majority of use cases (array allocation is
not covered).
The `OBJECT_GUARDED_*` macros are removed because they are not
needed anymore.
Differential Revision: https://developer.blender.org/D13502
|
|
Thanks to Christophe Hery for spotting this.
|
|
Missing ccl_private form an older patch.
Differential Revision: https://developer.blender.org/D13612
|
|
|
|
This add support for rendering of the point cloud object in Blender, as a native
geometry type in Cycles that is more memory and time efficient than instancing
sphere meshes. This can be useful for rendering sand, water splashes, particles,
motion graphics, etc.
Points are currently always rendered as spheres, with backface culling. More
shapes are likely to be added later, but this is the most important one and can
be customized with shaders.
For CPU rendering the Embree primitive is used, for GPU there is our own
intersection code. Motion blur is suppored. Volumes inside points are not
currently supported.
Implemented with help from:
* Kévin Dietrich: Alembic procedural integration
* Patrick Mourse: OptiX integration
* Josh Whelchel: update for cycles-x changes
Ref T92573
Differential Revision: https://developer.blender.org/D9887
|
|
This reverts commit d8b42751625c915113b64f5a2d9c72f19f009fee. It causes reduced
viewport render resolution. Revert for now until I have time to look into this
more closely.
|
|
Thanks to Michael (michael64) for identifying the solution.
Ref D13567
|
|
|
|
This replaces lost functionality from the old GN Attribute Map Range node.
This also adds vector support to the shader version of the node.
Notes:
This breaks forward compatibility as this node now uses data storage.
Reviewed By: HooglyBoogly, brecht
Differential Revision: https://developer.blender.org/D12760
|
|
- Nest compositor pages under the compositor module
- Nest GUI, DNA/RNA & externformats modules under Blender.
- Remove modules from intern which no longer exist.
- Add intern modules (atomic, eigen, glew-mx, libc_compat, locale,
numaapi, rigidbody, sky, utfconv).
- Use 'intern_' prefix for intern modules since some of the modules
use generic terms such as locale & atomic.
|
|
Renamed or removed parameters which no longer exist.
|
|
Also add groups in some files.
|
|
|
|
render crash. (ARM/Metal)
This fixes crash T94022 when selecting live viewport render with both GPU & CPU devices selected. It is caused by incorrect `KernelBVHLayout` assignment. Similar to `BVH_LAYOUT_MULTI_OPTIX` for Optix, this patch adds a `BVH_LAYOUT_MULTI_METAL` to correctly redirect to the correct Metal BVH layout type.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D13561
|
|
|
|
This adds the remaining bits to enable Metal on macOS. There are still
performance optimizations and other improvements planned, but it should
now be ready for early testing.
This is currently only enabled on in Arm builds for M1 GPUs. It is not
yet working on AMD or Intel GPUs.
Ref T92212
Differential Revision: https://developer.blender.org/D13503
|
|
|
|
Early return in some places also.
De-duplicate getSystemDir and getUserDir also.
Reviewed By: #platform_macos, brecht
Differential Revision: https://developer.blender.org/D13211
|
|
This allows to use fewer evaluations (30 msec down to 23 for me) while giving more accurate results (3x-10x less relative absolute error) compared to classic ray marching.
Not a massive difference, but meh, it's better. For Cycles the speedup doesn't really matter much, but I also have a patch for Eevee support.
I've also tried Gauss-Legendre and Gauss-Lobatto - the latter was always worse, while the former was slightly better at 2deg elevation but notably worse on 15deg.
Unfortunately the same approach can't be used for the integration along the primary ray, since there we also need the accumulated transmission so far at every integration point, not just the total result.
Differential Revision: https://developer.blender.org/D13521
|
|
|
|
with the CPU and GPU
When rendering volume surfaces in unbounded worlds the volume stepping can produce large values. If used with a magic texture node the values can results in a Inf float which when used in a sin or cos produces a NaN.
To fix this the input values are mapped into the periodic range of the sin and cos functions (-2*PI 2*PI) this stops the possibility of a Inf occurring and thus the NaN. It also improves the accuracy and smoothness of the result due to loss of precision when large values are summed with smaller ones effectively removing the parts of the smaller number (i.e. those in the -2PI to 2PI range) that result in variation of the output of sin and cos.
Reviewed By: brecht
Maniphest Tasks: T92036
Differential Revision: https://developer.blender.org/D12821
|
|
Sample offset was not accounted for in the adaptive sampling code and caused
issues, like immediately applied adaptive filtering, with non-zero values.
Differential Revision: https://developer.blender.org/D13510
|
|
This patch adds support for merging images rendered with adaptive sampling to
the merge operator (which is currently only exposed in the Python API).
To do this an sample count buffer is created for each render layer from the
sample count pass if it exists, or from the metadata otherwise. This is then
used for averaging passes.
Differential Revision: https://developer.blender.org/D13457
|
|
Use structured binding and for-each loop, remove reduntant type casts, use
find_if instead of loop.
Differential Revision: https://developer.blender.org/D13456
|
|
This is only for the replace method.
|
|
|
|
|
|
|
|
Adds hysteresis to the resolution divider algorithm to avoid having the resolution bounce around when on the boundary of two resolutions.
Reviewed By: brecht, leesonw
Differential Revision: https://developer.blender.org/D12385
|
|
This patch suppresses OS version warnings and hides currently unsupported Metal GPUs when enumerating devices.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D13506
|
|
|
|
|
|
|
|
|
|
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D13505
|
|
resolutions"
This reverts commit 5e37f70307bdacedd0f7da65f8b385bc1426f21d.
It is leading to freezing of the entire desktop for a few seconds when stopping
3D viewport rendering on my Linux / NVIDIA system.
|
|
This allows real world cameras to be modeled by specifying the coordinates of a
4th degree polynomial that relates a pixels distance (in mm) from the optical
center on the sensor to the angle (in radians) of the world ray that is
projected onto that pixel.
This is available as part of the panoramic lens type, however it can also be
used to model lens distortions in projective cameras for example.
Differential Revision: https://developer.blender.org/D12691
|
|
|
|
The root of the issue is caused by Cycles ignoring OpenGL limitation on
the maximum resolution of textures: Cycles was allocating texture of the
final render resolution. It was exceeding limitation on certain GPUs and
driver.
The idea is simple: use multiple textures for the display, each of which
will fit into OpenGL limitations.
There is some code which allows the display driver to know when to start
the new tile. Also added some code to allow force graphics interop to be
re-created. The latter one ended up not used in the final version of the
patch, but it might be helpful for other drivers implementation.
The tile size is limited to 8K now as it is the safest size for textures
on many GPUs and OpenGL drivers.
Differential Revision: https://developer.blender.org/D13385
|
|
Differential Revision: https://developer.blender.org/D13468
|
|
Somehow only a part of rBf4f8b6dde32b0438e0b97a6d8ebeb89802987127 ended up in
Cycles X, causing the issue that commit fixed, "OPTIX_ERROR_INVALID_VALUE" when the
system is out of memory, to show up again.
This adds the missing changes to fix that problem.
Maniphest Tasks: T93620
Differential Revision: https://developer.blender.org/D13488
|
|
Add a `DEVICE_METAL` case to the enum-value-to-string mapping function.
|
|
Skip compiling `metal.mm` unless `WITH_CYCLES_DEVICE_METAL` is enabled.
|
|
This patch adds the Metal host-side code:
- Add all core host-side Metal backend files (device_impl, queue, etc)
- Add MetalRT BVH setup files
- Integrate with Cycles device enumeration code
- Revive `path_source_replace_includes` in util/path (required for MSL compilation)
This patch also includes a couple of small kernel-side fixes:
- Add an implementation of `lgammaf` for Metal [Nemes, Gergő (2010), "New asymptotic expansion for the Gamma function", Archiv der Mathematik](https://users.renyi.hu/~gergonemes/)
- include "work_stealing.h" inside the Metal context class because it accesses state now
Ref T92212
Reviewed By: brecht
Maniphest Tasks: T92212
Differential Revision: https://developer.blender.org/D13423
|
|
Fix typos in the variables of the Xxf86vm libray to fix link failure
with bfd. These variables are defined in platform_unix.cmake.
Reviewed By: zeddb
Differential Revision: https://developer.blender.org/D12911
|
|
|
|
Cycles preview rendering could free the image buffers being used by drawing in
another thread due to a race condition. This race condition was unlikely before,
but now that preview renders are started right before we draw the image in the
image editor or load it as a texture in the 3D viewport, it's likely to happen.
As we are close to release this is too risky to fix properly, just avoid freeing
the cache for preview renders instead and accept increased memory usage in some
cases.
|
|
The OptiX denoiser does have an upper limit as to how many pixels it can denoise at once, so
this changes the OptiX denoising process to use tiles for high resolution images.
The OptiX SDK does have an utility function for this purpose, so changes are minor, adjusting
the configured tile size and including enough overlap.
Maniphest Tasks: T92308
Differential Revision: https://developer.blender.org/D13436
|
|
|
|
* Spot lights are now handled as disks aligned with the direction of the
spotlight instead of view aligned disks.
* Point light is now handled separately from the spot light, to fix a case
where multiple lights are intersected in a row. Before the origin of the
ray was the previously intersected light and not the origin of the initial
ray traced from the last surface/volume interaction.
This makes both strategies in multiple importance sampling converge to the same
result. It changes the render results in some scenes, for example the junkshop
scene where there are large point lights overlapping scene geometry and each
other.
Differential Revision: https://developer.blender.org/D13233
|