Commit Graph

5942 Commits

Author SHA1 Message Date
Kévin Dietrich
aa1e4baa22 Cycles : add a Volume Geometry Node
This splits the volume related data (properties for rendering and attributes) of the Mesh node
into a new `Volume` node type.

This `Volume` node derives from the `Mesh` class since we generate a mesh for the bounds of the
volume, as such we can safely work on `Volumes` as if they were `Meshes`, e.g. for BVH creation.
However such code should still check for the geometry type of the object to be `MESH` or `VOLUME`
which may be bug prone if this is forgotten.

This is part of T79131.

Reviewed By: brecht

Maniphest Tasks: T79131

Differential Revision: https://developer.blender.org/D8538
2020-08-19 15:47:09 +02:00
Dalai Felinto
8ab0d0e399 Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-08-18 14:55:44 +02:00
Dalai Felinto
83e3d25bca Remove (ifdef) RNA for simulation, point cloud and particles
For 2.90 release this should not be exposed in the RNA API.

In master this needs to be ON by default, that's all.

Differential Revision: https://developer.blender.org/D8589
2020-08-18 14:41:16 +02:00
Kévin Dietrich
1da0685076 Cycles: add a Pass Node
The Pass struct is now a Node and the passes are moved from the Film
class to the Scene class.

The Pass Node only has `type` and `name` as sockets as those seem to be
the only properties settable by exporters (other properties are implicit
and depend on the pass type).

This is part of T79131.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8591
2020-08-18 14:28:59 +02:00
Kévin Dietrich
c82166ffcd Cycles: move some Scene related methods out of Session
This moves `Session::get_requested_device_features`,
`Session::load_kernels`, and `Session::update_scene` out of `Session`
and into `Scene`, as mentioned in D8544.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8590
2020-08-18 11:50:37 +02:00
Philipp Oeser
c65c66320f Merge branch 'blender-v2.90-release' 2020-08-17 21:11:29 +02:00
Philipp Oeser
e157573fab Fix T77683: Cycles baking crash with motion blur enabled and no camera
specified

Maniphest Tasks: T77683

Differential Revision: https://developer.blender.org/D8593
2020-08-17 21:04:55 +02:00
Stefan Werner
1c892e6814 Cycles: Fix local intersections in Embree for non-instancd geometry.
Embree's occlusion filter was checking against the wrong object ID
and not exiting correctly in case of a mismatch.

Fixes T79723
2020-08-17 20:41:34 +02:00
Richard Antalik
118e78a844 Merge branch 'blender-v2.90-release' 2020-08-17 20:39:07 +02:00
Brecht Van Lommel
2b896fc481 Fix T79052: Cycles new sky texture fails with sun size zero
Clamp to a minimum angle to avoid precision issues.
2020-08-17 17:57:29 +02:00
Stefan Werner
d88721879b Cycles: Fix local intersections in Embree for non-instancd geometry.
Embree's occlusion filter was checking against the wrong object ID
and not exiting correctly in case of a mismatch.

Fixes T79723
2020-08-17 16:04:01 +02:00
Campbell Barton
9762c3892e Cleanup: spelling 2020-08-17 12:34:05 +10:00
Julian Eisel
e8dfe91767 Merge branch 'blender-v2.90-release' 2020-08-14 17:18:09 +02:00
Brecht Van Lommel
690d76c624 Fix T79769, T79768: crash tweaking volume settings with Cycles viewport render
Refitting the BVH does not work in this case, it needs to be fully rebuilt.
2020-08-14 16:49:08 +02:00
Campbell Barton
608ec79bc3 Cleanup: clang-format 2020-08-13 16:01:38 +10:00
Brecht Van Lommel
6238eabcd4 Merge branch 'blender-v2.90-release' 2020-08-12 18:50:40 +02:00
Brecht Van Lommel
58a457da3d Fix T79680, T79680: confusing viewport denoise start sample behavior 2020-08-12 18:10:50 +02:00
Brecht Van Lommel
1f8cb90828 Merge branch 'blender-v2.90-release' 2020-08-12 12:12:12 +02:00
Kévin Dietrich
9280fb19e4 Fixes T77882: artifacts rendering OpenVDB volumes with multiple grids in Cycles
The previous algorithm was not using all of the requested grids to build a mesh
around the volume due to limitations regarding the use of a dense buffer to
gather information about the volume's topology. This resulted in artefacts during
rendering.

The mesh generation is now done by merging all of the input grids and using the
resulting grid's topology to create the mesh. The generation of the mesh
is still done in index space as before, and the vertices are converted to object
space by using the merged topology grid indexToWorld transform.

To be able to merge the grids together we have to make sure that their transformation
matrices and their index spaces match, thus, if they do not match we simply resample
the grids. This behaviour should tackle one other limitation of the current algorithm,
which is that only one transformation matrix was used to generate the final mesh.

If we do not have an OpenVDB grid for the requested volume data, we generate
a temporary OpenVDB grid for it.

Differential Revision: https://developer.blender.org/D8401
2020-08-12 11:52:12 +02:00
3db67fd670 Revert "Cleanup: Cycles, applied Clang-Format"
This reverts commit 88cc3f167f7ee404640289ed9cfd6b13f0494d98. It was
caused by running Clang-Format version 10, instead of 9 from the
precompiled libs directory.
2020-08-07 13:38:07 +02:00
88cc3f167f Cleanup: Cycles, applied Clang-Format
No functional changes.
2020-08-07 12:01:40 +02:00
Antonio Vazquez
9a1ff4445b Merge branch 'blender-v2.90-release' 2020-08-06 19:52:49 +02:00
Brecht Van Lommel
8123b12006 Fix T79586: "rendering paused" not shown when viewport render starts paused 2020-08-06 19:19:22 +02:00
Dalai Felinto
56af04d31f Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-08-06 16:44:21 +02:00
Brecht Van Lommel
5e6119ddca Cycles: load OpenVDB file earlier in Blender export
In an upcoming bugfix we'll use OpenVDB data structures directly to build mesh
for sparse OpenVDB volumes, loading them OpenVDB grids earlier and removing any
references to Blender data structures makes that easier.

This also makes changes to Blender volumes to support this, so Cycles can take
ownership of a grid without Blender having to keep its own reference to it.
This should also be useful in a future Python API.

Ref D8401
2020-08-06 15:13:05 +02:00
Jeroen Bakker
2ca006f6c1 Merge branch 'blender-v2.90-release' 2020-08-05 15:59:04 +02:00
Brecht Van Lommel
ee351cb74d Fix T78869: denoising performance regression on Windows
Optimization was disabled in this function to work around a bug in MSVC, use
a different solution that does not come with such a big performance regression.
2020-08-05 15:46:44 +02:00
Campbell Barton
006698167b Cleanup: spelling 2020-08-05 11:49:31 +10:00
Bastien Montagne
5f621a12c6 Merge branch 'blender-v2.90-release'
Conflicts:
	source/blender/editors/gpencil/gpencil_primitive.c
2020-08-04 13:36:58 +02:00
Bastien Montagne
701a9d3917 Cleanup: typos & co in UI messages (and some other places). 2020-08-04 13:26:58 +02:00
Sergey Sharybin
778f0aca52 Merge branch 'blender-v2.90-release' 2020-08-04 12:08:09 +02:00
Sergey Sharybin
51af20b856 Cycles: Fix nan in decomposed transform for degenerated input
The decomposed transform would have consists of nan values if the input
transform had zero scale.

Now the decomposition will check for zero scale, and if it is detected
then the result will be ensured to be finite. Additionally, rotation
value will be copied from previous/next time step to help avoiding
obscure interpolation.

The latter step can become more comprehensive than the current simple
implementation.

Differential Revision: https://developer.blender.org/D8450
2020-08-04 11:40:09 +02:00
Sergey Sharybin
7f6530e5bd Cycles: Add finite checks for float4 and transforms
Currently unused, preparing for an upcoming development.
2020-08-04 11:40:09 +02:00
b38c04aebe Cleanup: fixed unused parameter warning
No functional changes.
2020-08-04 11:36:28 +02:00
Campbell Barton
83d6290800 Cleanup: remove trailing space, newlines at eof 2020-08-03 15:14:02 +10:00
Kévin Dietrich
b5dcf74636 Cycles: add support for rendering deformation motion blur from Alembic caches.
This patch adds the ability to render motion blur from Alembic caches.
The motion blur data is derived from a velocity attribute whose name has
to be defined by the user through the MeshSequenceCache modifier, with a
default value of ".velocities", which is the standard name in Alembic
for the velocity property, although other software may ignore it and
write velocity with their own naming convention (e.g. "v" in Houdini).

Furthermore, a property was added to define how the velocity vectors
are interpreted with regard to time : frame or second. "Frame"
means that the velocity is already scaled by the time step and we do not
need to modify it for it to look proper. "Second" means that the unit
the velocity was measured in is in seconds and so has to be scaled by
some time step computed here as being the time between two frames (1 /
FPS, which would be typical for a simulation). This appears to be
common, and is the default behavior.

Another property was added to control the scale of the velocity to
further modify the look of the motion blur.

Reviewed By: brecht, sybren

Differential Revision: https://developer.blender.org/D2388
2020-08-03 03:44:40 +02:00
Philipp Oeser
cab9673bed Fix T79111: Cycles: Image Sequence not rendering
Caused by c7aa0f9d743ee9cafe91b4a51d9f1ecc5e437d71.

Since above commit, BKE_image_user_frame_calc requires an image (not
just the iuser) to get the framenumber.

Cycles used to call this with NULL image (in `image_user_file_path` and
`image_user_frame_number`), now pass the image as well.

Maniphest Tasks: T79111

Differential Revision: https://developer.blender.org/D8439
2020-07-31 16:39:22 +02:00
556252f1fe Fix T79067: Cycles panorama viewport render stretched after recent changes 2020-07-28 17:34:51 +02:00
80539723b9 Fix T79219: Cycles NLM denoiser clean passes broken after recent changes 2020-07-28 17:34:44 +02:00
Patrick Mours
9ff7820f62 Fix T79259: OptiX render with fisheye camera is different to CUDA
The fisheye camera setup causes the edges of the image to not shoot primary rays. This was not
respected by OptiX because of an optimization that tried to reduce conditionals around trace calls.
Removing that does not seem to have an impact on performance anymore however and it fixes
the issue.
2020-07-28 15:45:46 +02:00
Patrick Mours
d64e171c4b Cycles: Enable OptiX on first generation Maxwell GPUs again 2020-07-27 16:11:00 +02:00
Patrick Mours
c64b12c0b8 Fix OptiX being shown as available on first generation Maxwell GPUs
The OptiX kernels are compiled for target "compute_sm_52", which is only available on second
generation Maxwell GPUs, so disable support for older ones.
2020-07-24 15:36:09 +02:00
Brecht Van Lommel
d40c39fca0 Cycles: adjust Sky texture intensity to follow physical units
The sky will appear brighter than before by default. To compensate for this,
lower exposure in the Film panel. The default altitude was also changed from
90 to 15 degrees.

Patch contributed by Marco with the help of Ryan Jones.

Differential Revision: https://developer.blender.org/D8285
2020-07-20 19:31:42 +02:00
Patrick Mours
a9644c812f Cycles: Use pre-compiled PTX kernel for older generation when no matching one is found
This patch changes the discovery of pre-compiled kernels, to look for any PTX, even if
it does not match the current architecture version exactly. It works because the driver can
JIT-compile PTX generated for architectures less than or equal to the current one.
This e.g. makes it possible to render on a new GPU architecture even if no pre-compiled
binary kernel was distributed for it as part of the Blender installation.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8332
2020-07-20 19:25:27 +02:00
Campbell Barton
123e29c274 Cleanup: missing CMake headers from source lists 2020-07-16 13:17:31 +10:00
Brecht Van Lommel
87f8949f0e Fix T78930: Cycles OpenCL error on graphics cards that don't support half float 2020-07-15 13:38:04 +02:00
Campbell Barton
5338b36fcc Cleanup: spelling 2020-07-14 15:19:52 +10:00
Brecht Van Lommel
6e74a8b69f Fix T78881: Cycles OpenImageDenoise not using albedo and normal correctly
Properly normalize buffers now. Also expose option to not use albedo and normal
just like OptiX.
2020-07-13 19:38:49 +02:00
Lukas Stockner
6a3c91f7ad Cycles: Clamp Sky Texture altitude to avoid numerical issues
Differential Revision: https://developer.blender.org/D8091
2020-07-13 03:08:11 +02:00
Lukas Stockner
7aacf2e119 Cycles: Account for Sky Texture mapping in the sun sampling code
Differential Revision: https://developer.blender.org/D8091
2020-07-13 03:08:11 +02:00