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

Conversation

murraystevenson
Copy link
Contributor

This updates Cycles to 4.2.0 with the addition of OpenImageDenoise 2.3.0. OIDN is built with OIIO support and the oidnDenoise binary is included in the manifest as it may be useful for anyone wishing to do post-process deniosing via a SystemCommand node. Zstd is also a new addition as it is now required by Cycles to compress and decompress GPU kernel .ptx and .cubin files.

The last few commits are attempts to address a couple of issues that have been preventing CI from running reliably.

@boberfly it'd be great to know if this works for you. There's one todo which will need to be addressed via a build container update, but that's just moving the creation of an environment variable to the right place...

Download the same file from a mirror URL as we've been seeing intermittent download failures from ftp.gnome.org
Python builds on macOS attempt to install Python Launcher.app and IDLE.app to /Applications. The github provided macos-14 image already includes an install of Python 3.10, which causes our Python 3.10 build to fail as it cannot overwrite `/Applications/Python 3.10/Python Launcher.app` and `/Applications/Python 3.10/IDLE.app`. There appears to be no obvious way to configure our build to not install to /Applications, so we instead remove these conflicting paths for now...
The github macos-14 runner image provides it, which then causes our LibRaw builds to treat it as a dependency. We have no need for little-cms2 so we make sure to remove it.
@murraystevenson murraystevenson self-assigned this Jul 26, 2024
@boberfly
Copy link
Contributor

Nice one Murray!

For OpenImageDenoise I found that I couldn't load in Cycles if Arnold is also loaded in, and it was down to Arnold's version preventing Cycles to load. A way around this was to rename the library:
https://github.com/RenderKit/oidn/blob/d94147f9bf85a15940f75847685bf96f1caf006a/cmake/oidn_common.cmake#L43

Perhaps a prefix eg. "GafferOpenImageDenoise" is the way to go. I was able to get cycles to find this by patching their FindOpenImageDenoise.cmake and it then worked as normal.

@boberfly
Copy link
Contributor

boberfly commented Aug 3, 2024

I did a build recently and saw that oslc needed libblosc (my hunch is that OpenImageIO rebuilt itself and found OpenVDB while a regular clean and ordered build doesn't due to dependency ordering?) Anyways I solved it by adding this to the Cycles build:
" -D PLATFORM_BUNDLED_LIBRARY_DIRS={buildDir}/lib"
Which does a platform-independent LD_LIBRARY_PATH type thing to the environment while building.

@murraystevenson
Copy link
Contributor Author

Closing this as the Cycles 4.2.0 update has been handled as part of #267 and we'll investigate the OIDN issues separately at a later date...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants