Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Cycles 4.2.0 with OIDN support #266

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ jobs:
# Remove CommandLineTools so there is no potential for conflict with
# our selected Xcode version.
sudo rm -rf /Library/Developer/CommandLineTools
sudo rm -rf /Applications/Python\ 3.10
# Remove little-cms2 to prevent our LibRaw builds from finding it.
brew uninstall --ignore-dependencies little-cms2
shell: bash
if: runner.os == 'macOS'

Expand Down
3 changes: 2 additions & 1 deletion BitstreamVera/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

"downloads" : [

"https://ftp.gnome.org/pub/GNOME/sources/ttf-bitstream-vera/1.10/ttf-bitstream-vera-1.10.tar.gz"
"https://mirrors.dotsrc.org/gnome/sources/ttf-bitstream-vera/1.10/ttf-bitstream-vera-1.10.tar.gz"

],

"url" : "https://www.gnome.org/fonts",
Expand Down
9 changes: 8 additions & 1 deletion Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@

- CI : Added CI for linux-gcc11 and macos-arm64 (Xcode 14.3.1).
- LLVM : Updated to version 15.0.7.
- Cycles : Disabled CUDA binary generation for Kepler and Maxwell architecture GPUs.
- Cycles :
- Updated to version 4.2.0.
- Disabled CUDA binary generation for Kepler and Maxwell architecture GPUs.
- Enabled support for denoising with OpenImageDenoise.
- Embree : Updated to version 4.3.2.
- OpenPGL : Updated to version 0.6.0.
- OpenImageDenoise : Added version 2.3.0.
- Zstd : Added version 1.5.0.

8.x.x (relative to 8.0.1)
-----
Expand Down
13 changes: 10 additions & 3 deletions Cycles/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,32 @@

"downloads" : [

"https://github.com/blender/cycles/archive/refs/tags/v4.0.2.tar.gz",
"https://github.com/blender/cycles/archive/refs/tags/v4.2.0.tar.gz",

],

"url" : "https://www.cycles-renderer.org/",

"license" : "LICENSE",

"dependencies" : [ "Boost", "OpenJPEG", "OpenImageIO", "TBB", "Alembic", "Embree", "OpenColorIO", "OpenVDB", "OpenShadingLanguage", "OpenSubdiv", "OpenPGL", "LibWebP" ],
"dependencies" : [ "Boost", "OpenJPEG", "OpenImageIO", "TBB", "Alembic", "Embree", "OpenColorIO", "OpenVDB", "OpenShadingLanguage", "OpenSubdiv", "OpenPGL", "LibWebP", "Zstd", "OpenImageDenoise" ],

"commands" : [

# The Cycles archive includes empty folders under `./lib`
# named `{platform}_{architecture}`. The existence of a folder
# in lib matching the current platform and architecture causes
# the build to only look for dependencies within it, so we
# remove them to allow dependencies to be found in `{buildDir}`.
"rmdir ./lib/*",

"mkdir build",
"cd build &&"
" cmake"
" -D CMAKE_INSTALL_PREFIX={buildDir}/cycles"
" -D CMAKE_PREFIX_PATH={buildDir}"
" -D CMAKE_BUILD_TYPE=Release"
" -D WITH_CYCLES_OPENIMAGEDENOISE=OFF"
" -D WITH_CYCLES_OPENIMAGEDENOISE=ON"
" -D WITH_CYCLES_PATH_GUIDING=ON"
" -D WITH_CYCLES_CUDA_BINARIES=ON"
" -D WITH_CYCLES_DEVICE_CUDA=ON"
Expand Down
15 changes: 8 additions & 7 deletions Cycles/patches/cudaBinaries.patch
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -120,7 +120,7 @@
mark_as_advanced(WITH_CYCLES_DEVICE_CUDA)
@@ -122,7 +122,7 @@

option(WITH_CYCLES_CUDA_BINARIES "Build Cycles NVIDIA CUDA binaries" OFF)
- set(CYCLES_CUDA_BINARIES_ARCH sm_30 sm_35 sm_37 sm_50 sm_52 sm_60 sm_61 sm_70 sm_75 sm_86 sm_89 compute_75 CACHE STRING "CUDA architectures to build binaries for")
+ set(CYCLES_CUDA_BINARIES_ARCH sm_60 sm_61 sm_70 sm_75 sm_86 sm_89 compute_75 CACHE STRING "CUDA architectures to build binaries for")
option(WITH_CYCLES_CUDA_BUILD_SERIAL "Build cubins one after another (useful on machines with limited RAM)" OFF)
option(WITH_CUDA_DYNLOAD "Dynamically load CUDA libraries at runtime (for developers, makes cuda-gdb work)" ON)
option(WITH_CYCLES_CUDA_BINARIES "Build Cycles NVIDIA CUDA binaries" OFF)
set(CYCLES_CUDA_BINARIES_ARCH
- sm_30 sm_35 sm_37 sm_50 sm_52 sm_60 sm_61 sm_70 sm_75 sm_86 sm_89 compute_75
+ sm_60 sm_61 sm_70 sm_75 sm_86 sm_89 compute_75
CACHE STRING "CUDA architectures to build binaries for"
)
option(WITH_CYCLES_CUDA_BUILD_SERIAL "\
28 changes: 0 additions & 28 deletions Cycles/patches/iorDefaults.patch

This file was deleted.

2 changes: 1 addition & 1 deletion Embree/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

"downloads" : [

"https://github.com/embree/embree/archive/v4.3.0.tar.gz"
"https://github.com/embree/embree/archive/v4.3.2.tar.gz"

],

Expand Down
78 changes: 78 additions & 0 deletions OpenImageDenoise/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{

"downloads" : [

"https://github.com/OpenImageDenoise/oidn/releases/download/v2.3.0/oidn-2.3.0.src.tar.gz",
# The OIDN build system will look for ISPC in a directory next to the source, so we can download a platform
# specific ISPC release here and it will be extracted to a location where it will be automatically found.
"{ispcDownload}"

],

"url" : "https://www.openimagedenoise.org/",

"license" : "LICENSE.txt",

"dependencies" : [ "TBB", "OpenImageIO" ],

"commands" : [

"mkdir build",
"cd build &&"
" cmake"
" -D CMAKE_INSTALL_PREFIX={buildDir}"
" -D CMAKE_INSTALL_LIBDIR=lib"
" -D CMAKE_PREFIX_PATH={buildDir}"
" -D CMAKE_BUILD_TYPE=Release"
" -D OIDN_APPS=ON"
" -D OIDN_APPS_OPENIMAGEIO=ON"
" -D OIDN_FILTER_RTLIGHTMAP=OFF"
" {extraArguments}"
" ..",
"cd build && cmake --build . --config Release --target install -- -j {jobs}",

],

"manifest" : [

"bin/oidnDenoise",
"include/OpenImageDenoise*",
"lib/*OpenImageDenoise*",

],

"variables" : {

"extraArguments" : "",
"ispcDownload" : "https://github.com/ispc/ispc/releases/download/v1.21.1/ispc-v1.21.1-linux-oneapi.tar.gz",

},

"platform:linux" : {

"environment" : {

## \todo : This environment variable should instead be defined in the build container.
"CUDA_PATH" : "/usr/local/cuda",

},

"variables" : {

"extraArguments" : "-D OIDN_DEVICE_CUDA=ON",

},

},

"platform:macos" : {

"variables" : {

"ispcDownload" : "https://github.com/ispc/ispc/releases/download/v1.21.1/ispc-v1.21.1-macOS.universal.tar.gz",

},

},

}
2 changes: 1 addition & 1 deletion OpenPGL/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

"downloads" : [

"https://github.com/OpenPathGuidingLibrary/openpgl/archive/refs/tags/v0.5.0.tar.gz"
"https://github.com/OpenPathGuidingLibrary/openpgl/archive/refs/tags/v0.6.0.tar.gz"

],

Expand Down
37 changes: 37 additions & 0 deletions Zstd/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{

"downloads" : [

"https://github.com/facebook/zstd/releases/download/v1.5.0/zstd-1.5.0.tar.gz"

],

"url" : "http://zstd.net",

"license" : "LICENSE",

"commands" : [

"mkdir gafferBuild",
"cd gafferBuild &&"
" cmake"
" -D CMAKE_CXX_STANDARD={c++Standard}"
" -D CMAKE_INSTALL_PREFIX={buildDir}"
" -D CMAKE_INSTALL_LIBDIR={buildDir}/lib"
" -D CMAKE_BUILD_TYPE=Release"
" -D ZSTD_BUILD_PROGRAMS=OFF"
" -D ZSTD_BUILD_TESTS=OFF"
" ../build/cmake",

"cd gafferBuild && make -j {jobs} && make install",

],

"manifest" : [

"include/zstd.h",
"lib/libzstd{sharedLibraryExtension}*"

],

}