Build: Update OpenImageDenoise to 2.1.0 #112143

Closed
Stefan Werner wants to merge 9 commits from Stefan_Werner/blender:oidn2_version_update into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Member

Major new feature in v2 is GPU support. This is not enabled yet,
this commit only changes the library version without enabling new
functionality.

Major new feature in v2 is GPU support. This is not enabled yet, this commit only changes the library version without enabling new functionality.
Stefan Werner added 1 commit 2023-09-08 14:39:19 +02:00
20bc1e8ec2 Build: Update OpenImageDenoise to 2.0.1
Major new feature in v2 is GPU support. This is not enabled yet,
this commit only changes the library version without enabling new
functionality.
Author
Member

@LazyDodo Would you mind verifying that I did not forget any of your changes necessary for the Windows build of the library dependencies?

@LazyDodo Would you mind verifying that I did not forget any of your changes necessary for the Windows build of the library dependencies?
Stefan Werner requested review from Sergey Sharybin 2023-09-08 14:40:29 +02:00
Stefan Werner requested review from Ray molenkamp 2023-09-08 14:40:29 +02:00
Sergey Sharybin requested review from Brecht Van Lommel 2023-09-08 15:55:04 +02:00
Sergey Sharybin requested review from Campbell Barton 2023-09-08 15:55:09 +02:00

Adding all platform maintainers to the review, as they'll need to do build after the change is landed.

Adding all platform maintainers to the review, as they'll need to do build after the change is landed.
Author
Member

FYI, for make deps to run successfully on my systems, I need to change the URI and hash of zlib and openal. It appears their updates to never versions changed the paths of the versions we're using? Those would be separate commits then though.

FYI, for `make deps` to run successfully on my systems, I need to change the URI and hash of zlib and openal. It appears their updates to never versions changed the paths of the versions we're using? Those would be separate commits then though.
Member

traveling without my laptop. this will have to wait till next week

traveling without my laptop. this will have to wait till next week
Stefan Werner added 1 commit 2023-09-11 09:07:20 +02:00
Stefan Werner added a new dependency 2023-09-11 17:38:23 +02:00
Stefan Werner added 1 commit 2023-09-11 22:50:08 +02:00
f407f9f931 Compositor: Explicitly make denoising node use CPU
OIDN2 can use GPU devices, but requires that images passed to it are
accessible by the GPU device. Since Blender uses host memory,
request the CPU device for OIDN instead of letting OIDN decide.

Works fine on Linux (Blender builds & tests succeed).

Works fine on Linux (Blender builds & tests succeed).
Campbell Barton approved these changes 2023-09-12 07:12:28 +02:00
Stefan Werner added 1 commit 2023-09-12 09:44:59 +02:00
Member

Some lost changes, but nothing crazy i'll leave it up to you to work them back in as 2 people working on this branch didn't seem to go super smooth last time

diff --git a/build_files/build_environment/cmake/options.cmake b/build_files/build_environment/cmake/options.cmake
index b3f676c5a4a..bff19b700be 100644
--- a/build_files/build_environment/cmake/options.cmake
+++ b/build_files/build_environment/cmake/options.cmake
@@ -97,6 +97,19 @@ if(WIN32)
   set(BLENDER_CLANG_CMAKE_CXX_FLAGS_RELEASE "${COMMON_CLANG_FLAGS} -Xclang --dependent-lib=msvcrt -D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS -O2 -DNDEBUG -DPLATFORM_WINDOWS -DPSAPI_VERSION=2 -DTINYFORMAT_ALLOW_WCHAR_STRINGS")
   set(BLENDER_CLANG_CMAKE_CXX_FLAGS_RELWITHDEBINFO "${COMMON_CLANG_FLAGS} -Xclang --dependent-lib=msvcrt -D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS -g -O2 -DNDEBUG -DPLATFORM_WINDOWS -DPSAPI_VERSION=2 -DTINYFORMAT_ALLOW_WCHAR_STRINGS")

+  set(DEFAULT_CLANG_CMAKE_FLAGS
+    -DCMAKE_BUILD_TYPE=${BUILD_MODE}
+    -DCMAKE_C_FLAGS_DEBUG=${BLENDER_CLANG_CMAKE_C_FLAGS_DEBUG}
+    -DCMAKE_C_FLAGS_MINSIZEREL=${BLENDER_CLANG_CMAKE_C_FLAGS_MINSIZEREL}
+    -DCMAKE_C_FLAGS_RELEASE=${BLENDER_CLANG_CMAKE_C_FLAGS_RELEASE}
+    -DCMAKE_C_FLAGS_RELWITHDEBINFO=${BLENDER_CLANG_CMAKE_C_FLAGS_RELWITHDEBINFO}
+    -DCMAKE_CXX_FLAGS_DEBUG=${BLENDER_CLANG_CMAKE_CXX_FLAGS_DEBUG}
+    -DCMAKE_CXX_FLAGS_MINSIZEREL=${BLENDER_CLANG_CMAKE_CXX_FLAGS_MINSIZEREL}
+    -DCMAKE_CXX_FLAGS_RELEASE=${BLENDER_CLANG_CMAKE_CXX_FLAGS_RELEASE}
+    -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${BLENDER_CLANG_CMAKE_CXX_FLAGS_RELWITHDEBINFO}
+    -DCMAKE_CXX_STANDARD=17
+  )
+
   set(PLATFORM_FLAGS)
   set(PLATFORM_CXX_FLAGS)
   set(PLATFORM_CMAKE_FLAGS)
Some lost changes, but nothing crazy i'll leave it up to you to work them back in as 2 people working on this branch didn't seem to go super smooth last time ```diff diff --git a/build_files/build_environment/cmake/options.cmake b/build_files/build_environment/cmake/options.cmake index b3f676c5a4a..bff19b700be 100644 --- a/build_files/build_environment/cmake/options.cmake +++ b/build_files/build_environment/cmake/options.cmake @@ -97,6 +97,19 @@ if(WIN32) set(BLENDER_CLANG_CMAKE_CXX_FLAGS_RELEASE "${COMMON_CLANG_FLAGS} -Xclang --dependent-lib=msvcrt -D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS -O2 -DNDEBUG -DPLATFORM_WINDOWS -DPSAPI_VERSION=2 -DTINYFORMAT_ALLOW_WCHAR_STRINGS") set(BLENDER_CLANG_CMAKE_CXX_FLAGS_RELWITHDEBINFO "${COMMON_CLANG_FLAGS} -Xclang --dependent-lib=msvcrt -D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS -g -O2 -DNDEBUG -DPLATFORM_WINDOWS -DPSAPI_VERSION=2 -DTINYFORMAT_ALLOW_WCHAR_STRINGS") + set(DEFAULT_CLANG_CMAKE_FLAGS + -DCMAKE_BUILD_TYPE=${BUILD_MODE} + -DCMAKE_C_FLAGS_DEBUG=${BLENDER_CLANG_CMAKE_C_FLAGS_DEBUG} + -DCMAKE_C_FLAGS_MINSIZEREL=${BLENDER_CLANG_CMAKE_C_FLAGS_MINSIZEREL} + -DCMAKE_C_FLAGS_RELEASE=${BLENDER_CLANG_CMAKE_C_FLAGS_RELEASE} + -DCMAKE_C_FLAGS_RELWITHDEBINFO=${BLENDER_CLANG_CMAKE_C_FLAGS_RELWITHDEBINFO} + -DCMAKE_CXX_FLAGS_DEBUG=${BLENDER_CLANG_CMAKE_CXX_FLAGS_DEBUG} + -DCMAKE_CXX_FLAGS_MINSIZEREL=${BLENDER_CLANG_CMAKE_CXX_FLAGS_MINSIZEREL} + -DCMAKE_CXX_FLAGS_RELEASE=${BLENDER_CLANG_CMAKE_CXX_FLAGS_RELEASE} + -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${BLENDER_CLANG_CMAKE_CXX_FLAGS_RELWITHDEBINFO} + -DCMAKE_CXX_STANDARD=17 + ) + set(PLATFORM_FLAGS) set(PLATFORM_CXX_FLAGS) set(PLATFORM_CMAKE_FLAGS) ```
Stefan Werner added 1 commit 2023-09-14 15:18:31 +02:00
5292e6f553 Build: Added flags for clang compiler on Windows
OpenImageDenoise v2 is built with a fork off clang, make sure to
propagate Blender's compiler flags to it.
Author
Member

Thank you, @LazyDodo.

Thank you, @LazyDodo.

It's my understanding that we plan this for Blender 4.1. So this PR and associated library updates would wait for Bcon1, which is in less than 2 weeks.

It's my understanding that we plan this for Blender 4.1. So this PR and associated library updates would wait for Bcon1, which is in less than 2 weeks.
Xavier Hallade added this to the 4.1 milestone 2023-09-27 13:18:44 +02:00
Stefan Werner added 1 commit 2023-10-16 13:02:42 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
a270347c59
Merge branch 'main' into oidn2_version_update

@blender-bot build

@blender-bot build
Brecht Van Lommel approved these changes 2023-10-16 19:45:22 +02:00
Brecht Van Lommel left a comment
Owner

Builds fine on macOS.

Builds fine on macOS.
Stefan Werner added 1 commit 2023-10-17 14:24:43 +02:00
40fb6de008 Build: Update OpenImageDenoise to 2.1.0
Major new feature in v2 is GPU support. This is not enabled yet,
this commit only changes the library version without enabling new
functionality.
Stefan Werner changed title from Build: Update OpenImageDenoise to 2.0.1 to Build: Update OpenImageDenoise to 2.1.0 2023-10-17 14:24:46 +02:00
Author
Member

I updated the version number and hash to the just released version 2.1.0 which contains bug fixes. Nothing else changes for this PR.

I updated the version number and hash to the just released version 2.1.0 which contains bug fixes. Nothing else changes for this PR.
Stefan Werner requested review from Campbell Barton 2023-10-17 14:26:02 +02:00
Stefan Werner requested review from Brecht Van Lommel 2023-10-17 14:26:03 +02:00
Brecht Van Lommel approved these changes 2023-10-17 17:50:36 +02:00
Member

unable to test on any other platforms currently but on windows the casing of the python executable variable changed, but i'm unsure if we need to replace or add the differently cased var since i can't test on linux

diff --git a/build_files/build_environment/cmake/openimagedenoise.cmake b/build_files/build_environment/cmake/openimagedenoise.cmake
index b1a366053f3..4c4111ea8e8 100644
--- a/build_files/build_environment/cmake/openimagedenoise.cmake
+++ b/build_files/build_environment/cmake/openimagedenoise.cmake
@@ -7,7 +7,7 @@ set(OIDN_EXTRA_ARGS
   -DTBB_ROOT=${LIBDIR}/tbb
   -DISPC_EXECUTABLE=${LIBDIR}/ispc/bin/ispc
   -DOIDN_FILTER_RTLIGHTMAP=OFF
-  -DPYTHON_EXECUTABLE=${PYTHON_BINARY}
+  -DPython_EXECUTABLE=${PYTHON_BINARY}
 )
 if(NOT APPLE)
   set(OIDN_EXTRA_ARGS
unable to test on any other platforms currently but on windows the casing of the python executable variable changed, but i'm unsure if we need to replace or add the differently cased var since i can't test on linux ``` diff --git a/build_files/build_environment/cmake/openimagedenoise.cmake b/build_files/build_environment/cmake/openimagedenoise.cmake index b1a366053f3..4c4111ea8e8 100644 --- a/build_files/build_environment/cmake/openimagedenoise.cmake +++ b/build_files/build_environment/cmake/openimagedenoise.cmake @@ -7,7 +7,7 @@ set(OIDN_EXTRA_ARGS -DTBB_ROOT=${LIBDIR}/tbb -DISPC_EXECUTABLE=${LIBDIR}/ispc/bin/ispc -DOIDN_FILTER_RTLIGHTMAP=OFF - -DPYTHON_EXECUTABLE=${PYTHON_BINARY} + -DPython_EXECUTABLE=${PYTHON_BINARY} ) if(NOT APPLE) set(OIDN_EXTRA_ARGS ```
Author
Member

@LazyDodo It looks like both spellings work, and both the Blender and OIDN code bases appear to use both. The CMake documentation mentions only the lower case variable, so I'm in favor of following that.

https://cmake.org/cmake/help/latest/module/FindPython.html

@LazyDodo It looks like both spellings work, and both the Blender and OIDN code bases appear to use both. The CMake documentation mentions only the lower case variable, so I'm in favor of following that. https://cmake.org/cmake/help/latest/module/FindPython.html
Stefan Werner added 1 commit 2023-10-19 14:00:08 +02:00
Ray molenkamp approved these changes 2023-10-19 14:42:21 +02:00
Campbell Barton approved these changes 2023-10-19 14:48:19 +02:00
Stefan Werner added 1 commit 2023-11-08 10:03:08 +01:00
Author
Member
https://projects.blender.org/blender/blender/commit/b414187efb776525d228810f3c200f0ca9648737
Stefan Werner closed this pull request 2023-11-08 10:18:21 +01:00

Pull request closed

Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: blender/blender#112143
No description provided.