Compare commits

..
Author SHA1 Message Date
Dan Bailey ae0875bb06 Add an example to demonstrate sampling and point advection using an adaptive grid
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-04-15 23:25:14 -07:00
Dan Bailey 13aa50ac1f Introduce a TreeTraits struct to differentiate between sparse and adaptive trees
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-04-15 23:25:14 -07:00
Dan Bailey 77a424312e Add a type-dependent false expression
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-03-11 22:46:35 -07:00
Dan Bailey 7624beab0a Add TreeAdapter partial specialization for AdaptiveAccessor
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-03-11 22:46:35 -07:00
Dan Bailey 7262f8b113 Extend AdaptiveTree to add an AdaptiveAccessor
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-03-11 22:46:35 -07:00
Dan Bailey a6c7af8109 Add AdaptiveTree and Grid registration
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-03-11 22:46:35 -07:00
Dan Bailey f5f92dcde1 Adjust existing grid API to move ValueAccessor methods to the tree
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-03-11 20:45:53 -07:00
Nick Avramoussis 78614d002b Merge pull request #1763 from zhangha182/support_other_rel
Support relwithdebinfo and minsizerel build
2024-03-06 22:03:33 +13:00
Nick Avramoussis 0c1727fdfb Merge pull request #1768 from Idclip/fixes
Various Fixes
2024-03-06 15:47:57 +13:00
Dan Bailey 206f96e092 Merge pull request #1767 from danrbailey/tsc_13_02
Meeting Notes 13 Feb 2024
2024-03-05 18:47:20 -08:00
Nick Avramoussis 6a6aa4a237 Don't use the version of jemalloc shipped with Houdini on MacOS (caused by 6ce7033a2b)
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2024-02-27 11:29:39 +13:00
Nick Avramoussis 359e70cd49 Fixed incorrect assert
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2024-02-27 11:29:07 +13:00
Nick Avramoussis 3d1dbffa27 Minor spelling fix
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2024-02-27 11:28:50 +13:00
Dan Bailey fdb244949d meeting notes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-02-14 17:01:01 -08:00
Dan Bailey 9ae369e7ab Merge pull request #1751 from NBickford-NV/nbickford/faster-resetBackground
Add early-exit optimization for LeafNode::resetBackground()
2024-02-14 16:30:39 -08:00
jmlait 1b0fa91efd Merge pull request #1762 from sideeffects/sendupstream_processgrid_warning
Removing the validation warning in CreateNanoGrid::processGrid()
2024-02-13 14:06:07 -05:00
zhangha 4f1ada21d5 Support relwithdebinfo and minsizerel build.
Signed-off-by: zhangha <hao.zhang@autodesk.com>
2024-02-09 09:57:26 +08:00
alexandresv d2fed76ee8 Removing the validation warning in CreateNanoGrid::processGrid() to prevent the console from being spammed when a vector grid of type fog volume is processed.
Signed-off-by: alexandresv <alexandres@sidefx.com>
2024-02-02 13:59:16 -05:00
Nick Avramoussis 1efbe09191 Merge pull request #1757 from Idclip/vdb_asserts
Introduce OPENVDB_ASSERT macro to replace cassert usage
2024-01-31 13:36:16 +13:00
Nick Avramoussis ea5b2293f5 Merge pull request #1754 from Idclip/houdini_ci
Introduced CI for Houdini on MacOS
2024-01-30 20:54:18 +13:00
Neil Bickford b3985c19d6 Remove incorrect early-exit for oldBackground == -newBackground case
Signed-off-by: Neil Bickford <nbickford@nvidia.com>
2024-01-26 17:19:19 -08:00
apradhana 58e43d3931 Merge pull request #1756 from apradhana/TSC_Jan16_2024
Add TSC notes from 2024-01-16.
2024-01-24 09:29:48 -08:00
jmlait 14714d0a6b Merge pull request #1758 from sideeffects/send_upstream_tscnotes_20240123
Meeting notes for Jan 23rd.
2024-01-24 12:05:26 -05:00
Jeff Lait 2268f63d9b Meeting notes for Jan 23rd.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2024-01-24 10:50:38 -05:00
Nick Avramoussis eb3656cb96 Aded missing dependency to Windows CI
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2024-01-24 10:12:03 +13:00
Nick Avramoussis fbfa409c8f Replaced cassert/assert usage with a VDB specific function assertAbort
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2024-01-24 10:06:37 +13:00
apradhana 18d9a96415 Add TSC notes from 2024-01-16.
Signed-off-by: apradhana <andre.pradhana@gmail.com>
2024-01-23 10:57:58 -08:00
Nick Avramoussis de204cd958 Introduced CI for Houdini on MacOS
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2024-01-20 23:23:52 +13:00
Dan Bailey a41c65ff48 Merge pull request #1697 from matthewdcong/more_pybind11_cleanup
More pybind11 bugfixes and cleanup
2024-01-18 02:56:44 +01:00
Nick Avramoussis b51fce1017 Merge pull request #1721 from Idclip/explicit_instantiation_windows
Turn off USE_EXPLICIT_INSTANTIATION on Windows by default
2024-01-18 14:54:14 +13:00
Nick Avramoussis 6c0bd0b81b Merge pull request #1729 from Idclip/various_improvements
Various improvements
2024-01-18 14:47:37 +13:00
Nick Avramoussis ee78fb7f91 Merge pull request #1746 from Idclip/tsan_volume_spheres_fix
Fixed a TSAN issue with TBB operators being modified and copied concu…
2024-01-18 14:44:03 +13:00
Nick Avramoussis f931626503 Merge pull request #1749 from Idclip/weekly_ci
Fixed the weekly CI, introduce a new build type for the ABI check job
2024-01-18 14:39:17 +13:00
jmlait eaaa68f2a3 Merge pull request #1750 from sideeffects/sendupstream_reference_dir
Move the pure-reference files, GU_PrimVDB and GEO_PrimVDB, to a reference directory
2024-01-17 11:48:57 -05:00
Neil Bickford 5475fe30f3 Add early-exit optimization for LeafNode::resetBackground()
Signed-off-by: Neil Bickford <nbickford@nvidia.com>
2024-01-12 17:26:22 -08:00
Nick Avramoussis 0df00c8a25 Suppress sanitizer errors about memory leaks in tbb init in older tbb versions
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2024-01-12 17:04:43 +13:00
Jeff Lait dc95dfa152 Remove hvdb:: qualifiers as we only use the Houdini GU_PrimVDB.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2024-01-10 19:39:06 -05:00
Jeff Lait 5f1c97afd5 Properly include <GU/ rather than "GU
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2024-01-10 13:52:12 -05:00
Jeff Lait 87c494b40b We do not need to copy the reference files here as this just goes to
the buld directory.  Distributions don't need reference files as
people can go to the original git hub source for them.

Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2024-01-10 13:49:43 -05:00
Jeff Lait ec0f809b57 Since these are in reference it no longer is easy to switch to
this implementation, so update the comment that they are reference
for those seeking to understand the SOP algorithms.

Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2024-01-10 13:48:33 -05:00
Nick Avramoussis 6b2d0e34fd Merge pull request #1722 from apradhana/TSC_Nov7_2023
Add TSC meeting notes from 2023-11-07.
2024-01-10 12:20:45 +13:00
Jeff Lait 8d2a33c13b Do not use the shipped GEO_PrimVDB.h nor GU_PrimVDB.h, but always
use the Houdini version.

Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2024-01-09 15:16:57 -05:00
Jeff Lait 7414505917 Properly provide relative directories to reference files.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2024-01-09 14:54:53 -05:00
Jeff Lait faab4dc9cb Move the pure-reference files, GU_PrimVDB and GEO_PrimVDB, to a
reference subdirectory to make it clear they are not for compiling
directly, but are to provide an open source reference to otherwise
properietary Houdini code.

Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2024-01-09 14:43:42 -05:00
Nick Avramoussis fc7843c35c Fixed the weekly CI, introduce a new build type for the ABI check job
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2024-01-09 14:59:18 +13:00
Matthew Cong 71310c0697 More Python binding cleanup
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2024-01-05 14:32:36 -08:00
Nick Avramoussis 065bd6faa7 Fixed a TSAN issue with TBB operators being modified and copied concurrently in VolumeToSpheres
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2024-01-05 16:33:11 +13:00
Nick Avramoussis b77fc2b7d4 Merge pull request #1733 from brechtvl/lzcnt
Bump internal copy of half to fix issues on older x86_64 CPUs on Windows
2024-01-05 16:23:11 +13:00
Dan Bailey 28453c131f Merge pull request #1737 from danrbailey/tsc_notes_191223
Add meeting notes - 19th Dec 2023
2023-12-22 13:53:44 -08:00
Dan Bailey a8c784ea12 Add meeting notes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2023-12-19 20:42:57 -08:00
Nick Avramoussis 605970fc1e Merge pull request #1692 from bpmckinnon/FixMissingClimitsHeader
Fix CHAR_BIT undefined. climits header is missing in some build envir…
2023-12-19 19:50:39 +13:00
Nick Avramoussis be2518587f Merge pull request #1724 from Idclip/post_release_11
Post release updates
2023-12-19 19:28:08 +13:00
Nick Avramoussis ff2e59f04f Merge pull request #1725 from Idclip/houdini_20_ci
Added Houdini 20 CI for old and new CXX11 ABI
2023-12-19 19:27:43 +13:00
Nick Avramoussis e2011c53cf Merge pull request #1726 from Idclip/ax_windows_build_fix
Fixed an issue with AX's cmake on windows producing the same library …
2023-12-19 19:16:04 +13:00
Nick Avramoussis ccfd27c2a4 Merge pull request #1731 from Idclip/ubsan_fix
Fixed an instance of undefined behaviour in tools::activate
2023-12-19 18:29:09 +13:00
Brecht Van Lommel 30a5fd2734 Bump internal copy of half to fix issues on older x86_64 CPUs on Windows
On some older CPUs without support for the lzcnt instruction, the
conversion from half to float was wrong.

See AcademySoftwareFoundation/Imath#358 for more details.

Thanks to Ray Molenkamp for tracking down this bug.

Signed-off-by: Brecht Van Lommel <brecht@blender.org>
2023-12-16 12:37:21 +01:00
Nick Avramoussis 669fbabba5 Fixed an instance of undefined behaviour in tools::activate which could access invalid values representing child pointers
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-12-15 14:58:35 +13:00
Nick Avramoussis 730dbca52b Removed unused logic from TestStreamCompression
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-12-13 09:46:57 +13:00
Nick Avramoussis 4df989a9b1 Added pendingchanges
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-12-12 23:43:16 +13:00
Nick Avramoussis 6ce7033a2b Default to prefering jemalloc on all platforms if CONCURRENT_MALLOC is set to auto
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-12-12 23:35:58 +13:00
Nick Avramoussis b4647eef33 Minor compiler warning fixes. Added missing rpaths to the Houdini SOPs
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-12-12 23:35:58 +13:00
Nick Avramoussis cbef4cde90 Added Houdini 20 CI for old and new CXX ABI and improved CXX11 ABI logic
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-12-12 21:17:25 +13:00
Nick Avramoussis d858e645ed Fixed an issue with AX's cmake on windows producing the same library filenames
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-12-06 17:04:51 +13:00
Nick Avramoussis 3016b54d53 Post release updates
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-12-06 16:34:51 +13:00
Nick Avramoussis 41bb1279c2 Merge pull request #1720 from AcademySoftwareFoundation/v11.0.0_rc
V11.0.0 -> Master
2023-12-06 16:25:14 +13:00
apradhana 39fffffed5 Add TSC meeting notes from 2023-11-07.
Signed-off-by: apradhana <andre.pradhana@gmail.com>
2023-12-05 18:21:21 -08:00
Nick Avramoussis beb1d0b25c Turn off USE_EXPLICIT_INSTANTIATION on Windows by default
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-12-06 14:57:23 +13:00
Dan Bailey 6c044e628a Merge pull request #1705 from AcademySoftwareFoundation/v11_0_0_notes
v11.0.0 Update release notes
2023-11-01 13:31:11 -07:00
Dan Bailey 9ac0553af1 Update release notes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2023-11-01 13:25:34 -07:00
Dan Bailey e11125dbd9 Merge pull request #1704 from AcademySoftwareFoundation/v11_0_0_vdb_fixes
Bug fixes to v11.0.0
2023-11-01 12:34:53 -07:00
Dan Bailey 1d6f632edf Revert "Remove boost from the build system when OPENVDB_USE_DELAYED_LOADING is OFF"
This reverts commit 828bea2b75.

Signed-off-by: Dan Bailey <danbailey@ilm.com>
2023-11-01 00:31:10 -07:00
Dan Bailey 996b297135 Revert "Replace boost conversion_traits with std::common_type"
This reverts commit fd4c370b22.

Signed-off-by: Dan Bailey <danbailey@ilm.com>
2023-11-01 00:30:52 -07:00
Jeff Lait b5bba2cd0d Fix for potential crash when reading invalid .vdb files.
Original fix thanks to Matthias Ueberheide.

Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2023-10-31 23:52:19 -07:00
jmlait 9153c12ed0 Merge pull request #1701 from sideeffects/sendupstream_vdbioclamp
Fix for potential crash when reading invalid .vdb files.
2023-10-31 21:53:17 -04:00
Jeff Lait f02e7e1cbd Fix for potential crash when reading invalid .vdb files.
Original fix thanks to Matthias Ueberheide.

Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2023-10-31 16:09:59 -04:00
Ken Museth 863738248f bug-fix to nanovdb related to new I/O (#1699)
* bug-fix to nanovdb related to new I/O

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* improved GridData::isValid

Signed-off-by: Ken Museth <ken.museth@gmail.com>

---------

Signed-off-by: Ken Museth <ken.museth@gmail.com>
2023-10-31 00:49:47 -07:00
Dan Bailey 49dc1581b4 Merge pull request #1698 from danrbailey/update_release_notes_11_0
Update change notes
2023-10-30 22:37:32 -07:00
Dan Bailey 04f4ee3915 Update change notes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2023-10-30 21:26:39 -07:00
Ken Museth fc4a5592d6 Cleanup several aspects of the Python bindings (copy of PR #1696) (#1696)
Signed-off-by: Ken Museth <ken.museth@gmail.com>
2023-10-27 18:34:03 -07:00
Ken Museth 77f28d1611 Massive improvements to NanoVDB (#1651) 2023-10-27 14:03:17 -07:00
apradhana e0479ce4e8 Merge pull request #1695 from apradhana/vdb11_nanovdb_ci
Prepare NanoVDB CI for the massive NanoVDB update for VDB11.
2023-10-27 09:13:35 -07:00
apradhana e36bedb881 Fix nanovdb CI and use the correct MSVC_RUNTIME library tag explicitly.
Signed-off-by: apradhana <andre.pradhana@gmail.com>
2023-10-26 21:09:17 -07:00
Nick Avramoussis b38c916388 Merge pull request #1691 from Idclip/cmake_imp
CMake/CI fixes
2023-10-27 11:33:32 +13:00
Nick Avramoussis 9ecdc8f02a Added a warning when attempting to use the unmaintained maya plugin
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-10-25 10:24:08 +13:00
Nick Avramoussis 1e6f47adde Updated pendingchanges
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-10-25 10:24:08 +13:00
Nick Avramoussis 4edd7ff183 Weekly CI fix for 2024 containers and added CMake CONFIG test
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-10-25 10:24:08 +13:00
Nick Avramoussis 99bbd416e1 Merge pull request #1657 from jdumas/jdumas/cmake-timestamp
Don't update timestamp when regenerating instantation files.
2023-10-25 10:13:13 +13:00
Brian McKinnon a652848e9f Fix CHAR_BIT undefined. climits header is missing in some build environments
Signed-off-by: Brian McKinnon <brian.mckinnon@ubisoft.com>
2023-10-24 15:58:27 -05:00
Nick Avramoussis 828bea2b75 Remove boost from the build system when OPENVDB_USE_DELAYED_LOADING is OFF
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-10-25 08:37:14 +13:00
Nick Avramoussis 4845be4553 Various CMake fixes to allow VDB to be built with CMAKE_FIND_PACKAGE_PREFER_CONFIG
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-10-25 08:19:27 +13:00
Nick Avramoussis b227321651 Merge pull request #1688 from bpmckinnon/ReplaceBoostConversionTraits
Replace boost conversion_traits with std::common_type
2023-10-25 08:04:25 +13:00
Nick Avramoussis 70145ae576 Merge pull request #1687 from bpmckinnon/ReplaceBoostAnyWithStdAny
Replace boost::any with std::any
2023-10-25 08:03:55 +13:00
Nick Avramoussis 102e56d7a9 Merge pull request #1690 from Idclip/hou_ci_fix
Fix Houdini CI Caching
2023-10-19 17:24:00 +13:00
Nick Avramoussis 35808213e6 Minor spelling fix in README
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-10-19 17:04:12 +13:00
Nick Avramoussis e6664ec62c Fix houdini CI caching
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-10-18 22:05:47 +13:00
Nick Avramoussis c00c7f6969 Merge pull request #1684 from Idclip/vdb_11
Infrastructure changes for VDB 11
2023-10-18 10:55:09 +13:00
Nick Avramoussis f2e0bac39a Merge pull request #1689 from sideeffects/send_upstream_h20_sync2
Houdini 20 requires RenderContext rather than Render *.
2023-10-18 10:54:56 +13:00
Jeff Lait fb58dceff4 Houdini 20 requires RenderContext rather than Render *.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2023-10-17 16:56:11 -04:00
Nick Avramoussis 97b94f1b67 Merge pull request #1679 from sideeffects/nullptr_fix
Fix nullptr dereferences found by gcc 11.4
2023-10-18 08:03:57 +13:00
Brian McKinnon c00edd5613 Replace boost::any with std::any
Replace BOOST_STATIC_ASSERT with static_assert

Signed-off-by: Brian McKinnon <brian.mckinnon@ubisoft.com>
2023-10-16 08:27:32 -05:00
Brian McKinnon fd4c370b22 Replace boost conversion_traits with std::common_type
Signed-off-by: Brian McKinnon <brian.mckinnon@ubisoft.com>
2023-10-16 08:19:46 -05:00
Nick Avramoussis 9876cdf56e Infrastructure changes for VDB 11
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-10-15 00:06:21 +13:00
apradhana 53044dc609 Merge pull request #1682 from AcademySoftwareFoundation/v10.1.0_rc
Merging VDB 10.1.0 release back to master
2023-10-11 21:53:11 -07:00
apradhana 3cd310f3ee Merge pull request #1683 from Idclip/docs
Fixed changenotes
2023-10-11 16:27:23 -07:00
Nick Avramoussis d71a6d04c4 Fixed changenotes
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-10-12 11:53:56 +13:00
apradhana 87a508ca48 Merge pull request #1681 from apradhana/v10.1.0_rc_fix
Make PagedArray to compile with clang14 with C++20 on the runner
2023-10-10 21:13:03 -07:00
apradhana 6f8851e3a4 Change release date to October 11.
Signed-off-by: apradhana <andre.pradhana@gmail.com>
2023-10-10 21:07:41 -07:00
apradhana 1709dbab91 Get rid of static_assert with random_access_iterator for CXX20.
Signed-off-by: apradhana <andre.pradhana@gmail.com>
2023-10-10 21:02:57 -07:00
apradhana 8443745a9c Merge pull request #1680 from apradhana/v10.1.0_rc
VDB Version 10.1.0 release candidate
2023-10-10 18:06:58 -07:00
apradhana 4e8f16a297 Added include iterator in PagedArray.
Signed-off-by: apradhana <andre.pradhana@gmail.com>
2023-10-10 16:52:22 -07:00
apradhana ce1875623c Update changes.
Signed-off-by: apradhana <andre.pradhana@gmail.com>
2023-10-10 16:01:43 -07:00
apradhana 1db29a9240 Update CMakeLists minor and patch version.
Signed-off-by: apradhana <andre.pradhana@gmail.com>
2023-10-10 13:49:28 -07:00
Nick Avramoussis 172a31c9eb Merge pull request #1677 from Idclip/cmake_fixes
Minor CMake Fixes
2023-10-11 07:35:39 +13:00
Edward Lam 663948efd6 Fix nullptr dereferences found by gcc 11.4
Signed-off-by: Edward Lam <e4lam@yahoo.com>
2023-10-10 11:21:55 -04:00
Nick Avramoussis efdbd9fdf6 Added pendingchanges
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-10-10 11:08:24 +13:00
Nick Avramoussis 549b3bfcdb Bumped the 'latest' CI tests
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-10-10 11:08:24 +13:00
Nick Avramoussis 7164db247d Removed now unecessary tbb/glibc defines in AX CMake
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-10-10 11:08:24 +13:00
Nick Avramoussis 3bc668615a More C++20 conformance fixes
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-10-10 11:08:24 +13:00
Nick Avramoussis 33c8790af8 Remove explicit pybind11 install from build.sh
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-10-10 11:08:24 +13:00
Nick Avramoussis 2d3eabc0c4 Merge pull request #1672 from sideeffects/sendupstream_tscnotes_20230919
Notes for TSC meeting.
2023-10-04 20:25:37 +13:00
Nick Avramoussis 545737e1b8 Disable boost usage with macos latest CI for now
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-10-04 20:12:00 +13:00
Nick Avramoussis 04644d4a38 OpenVDBs CMake no longer incorrectly modifies the BUILD_SHARED_LIBS option
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-10-04 20:12:00 +13:00
Nick Avramoussis bc63bf948b Merge pull request #1664 from maletsden/c++20_fix
Fixed C++20 compatibility of OpenVDB and TBB
2023-10-03 22:53:20 +13:00
Nick Avramoussis fd5bfe8ee4 Merge pull request #1674 from Idclip/ci
CI updates
2023-10-03 22:50:28 +13:00
Nick Avramoussis 664dc5c302 CI updates
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-09-30 23:06:25 +13:00
Nick Avramoussis a6064e892a Merge pull request #1673 from Idclip/stencil_minmax
Fixed a compilation issue with min() and max() methods on the stencils
2023-09-28 23:47:27 +13:00
Dan Bailey d41e3a5b34 Merge pull request #1628 from jdumas/jdumas/cpp20
Fix C++20 compatibility by removing deprecated shared_ptr::unique()
2023-09-26 11:44:10 -07:00
Nick Avramoussis 5a0519d043 Merge pull request #1575 from Idclip/leaf_node_bool_topology_fix
Fixed a bug with LeafNodeBool TopologyCopy constructor
2023-09-26 11:51:23 +13:00
Nick Avramoussis a7fd213dd9 Fixed a compilation issue with min() and max() methods on the stencils
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-09-23 20:56:34 +12:00
Jeff Lait 353499cb76 Notes for TSC meeting.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2023-09-20 15:20:48 -04:00
jmlait 2d7ba1c75c Merge pull request #1655 from sideeffects/sendupstream_sync_h20
Synchronize the GEO reference implementations with upcoming H20.
2023-09-11 10:52:33 -04:00
jmlait a46f498420 Merge pull request #1654 from sideeffects/sendupstream_remove_half_lut
Remove Half LUT
2023-09-05 09:54:25 -04:00
Jeff Lait 2155e860df Fix tabs.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2023-09-05 09:53:51 -04:00
maletsden 98176b82db Fixed C++20 support for OpenVDB
Signed-off-by: maletsden <maletsden@gmail.com>
2023-09-01 12:25:51 +03:00
Nick Avramoussis 7f8888004d Merge pull request #1649 from Idclip/tsc_notes
TSC minutes
2023-08-15 16:06:03 +12:00
Nick Avramoussis 316ad95942 TSC minutes
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-08-15 16:04:41 +12:00
Jeremie Dumas 740a69f46e Don't update timestamp when regenerating instantation files.
Signed-off-by: Jérémie Dumas <jeremie.dumas@ens-lyon.org>
2023-08-07 14:58:51 -07:00
Jeff Lait a5e6bd9317 Synchronize the GEO reference implementations with upcoming H20.
Change to PRM_UI rather than PRM_FREE to match H20 version of parms in
activate.

Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2023-08-03 10:29:15 -04:00
Jeff Lait 01ca701ae1 Remove trailing whitespace.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2023-08-03 10:06:57 -04:00
Jeff Lait 5f9503534c Describe and justify LUT change.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2023-08-02 14:35:46 -04:00
Jeff Lait 0452d6e22e Explicitly disable the lookup table generation as two namespaced
versions will otherwise conflict, as the lookuptable itself is extern
"C" so not namespaced.

Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2023-08-02 14:33:25 -04:00
jmlait 3f8b6f30cf Merge pull request #1645 from jmather-sesi/non-x86-intrinsic-flag-fix
Only emit SIMD compiler flags on x86-based platforms
2023-08-01 15:07:38 -04:00
Ken Museth 3552fc62ec Merge pull request #1650 from quagla/patch-2
Add missing braces
2023-07-30 11:06:14 -07:00
Alessio Quaglino 7ff2fdd3fc Add missing braces
This solves a compile error when using -Wmissing-braces.

Signed-off-by: Alessio Quaglino <102665781+quagla@users.noreply.github.com>
2023-07-26 13:39:58 +01:00
jmlait da409c23d8 Merge pull request #1525 from sideeffects/send_upstream_hollowmesh
Support for hollow VDBs
2023-07-25 16:21:56 -04:00
Jeff Lait bc96671635 abs -> std::abs
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2023-07-24 15:29:03 -04:00
jmlait 23e5e7a44c Merge pull request #1639 from sideeffects/sendupstream_tscnotes20230627
TSC Meeting notes June 23rd.
2023-07-24 15:24:09 -04:00
Jeff Lait da4d8afc89 Fix indexing of last item.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2023-07-24 15:23:45 -04:00
jmather-sesi 83e467ef24 Updated pendingchanges.
Signed-off-by: jmather-sesi <54645798+jmather-sesi@users.noreply.github.com>
2023-07-18 19:58:15 -04:00
jmather-sesi c68dccba97 Only emit SIMD compiler flags on x86-based platforms
Enabling the SSE4.2 or AVX SIMD flags on non-x86 based platforms will
result in a compilation error stating that the -msse4.2 and -mavx flags
cannot be found. This patch causes the flags to only be emitted on x86-based
platforms.

Signed-off-by: jmather-sesi <54645798+jmather-sesi@users.noreply.github.com>
2023-07-18 19:37:21 -04:00
Jeff Lait 95b1a433d5 Properly credit Tomas in pendingchanges.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2023-07-18 16:11:36 -04:00
Jeff Lait 57ec4954cd Describe the floodfill algorithm.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2023-07-18 16:07:48 -04:00
Jeff Lait 1bd822e307 Add pendingchanges for this commit.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2023-07-18 15:53:26 -04:00
Jeff Lait 321d2b3f3c Fix trailing whitespace.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2023-07-11 13:55:41 -04:00
Jeff Lait 072a501ffa Guard the levelset rebuild oracle behind a #define. There are issues
when increasing resolution.  We still include it because we want
anyone who thinks of trying this approach in the future to have an
example and some documentation of what goes wrong.

Add explicit instantiation for oracle-less meshToVolume, which should
allow the explicit template builds to work.

Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2023-07-11 13:52:15 -04:00
Nick Avramoussis f81d1aa284 Merge pull request #1635 from Idclip/pending_changes_update
Updated pendingchanges
2023-07-11 14:05:18 +12:00
Jeff Lait 7399178adb TSC Meeting notes June 23rd.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2023-07-10 11:31:02 -04:00
Nick Avramoussis ffc71c3639 Merge pull request #1592 from Idclip/llvm15
Added basic support for LLVM 15 in OpenVDB AX
2023-07-05 21:24:30 +12:00
Nick Avramoussis 1bb3c6b833 Updated pendingchanges
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-07-05 10:44:28 +12:00
Nick Avramoussis 19710c1fe3 Merge pull request #1626 from benemer/master
Fix prime number in voxel hashing
2023-07-05 10:39:42 +12:00
Benedikt Mersch d57bca5fc9 Make all numbers prime
The prime numbers are modified based on the ACM Transactions on Graphics
paper:  "Real-time 3D reconstruction at scale using voxel hashing"

Signed-off-by: Benedikt Mersch <benedikt.mersch@gmail.com>
2023-06-26 08:58:31 +02:00
Nick Avramoussis f4cdcd60a6 Merge pull request #1579 from danrbailey/tsc_0702
Meeting notes 7th Feb
2023-06-22 11:29:05 +12:00
Jérémie Dumas e31140cc32 Fix C++20 compatibility by removing deprecated shared_ptr::unique()
Signed-off-by: Jérémie Dumas <jeremie.dumas@ens-lyon.org>
2023-06-21 08:08:50 -07:00
Ken Museth 9a57c7e68e Merge pull request #1531 from malaterre/nanovdb-32
Use fixed-width integers to remove warnings (32bits)
2023-06-06 11:47:47 -07:00
apradhana e17efa5592 Merge pull request #1597 from apradhana/vdb_point_windows_warning
Addresses warning in vdb point: integer conversion resulted in truncation
2023-06-06 11:09:53 -07:00
Nick Avramoussis 500b507ff7 Merge pull request #1620 from Idclip/siof_problems
Various Fixes around SIOF
2023-06-03 13:15:51 +12:00
Nick Avramoussis 52c7b9ab67 pedantic fixes
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-05-26 13:27:00 +12:00
jmlait 9c79ea2c98 Merge pull request #1613 from sideeffects/send_upstream_tsc20230425
TSC Meeting notes.
2023-05-25 14:40:03 -04:00
Nick Avramoussis ee4f8fa9f9 Fixed another occurance of static non-trivial construction
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-05-25 22:43:12 +12:00
Nick Avramoussis e0bc5f4620 Enabled some more useful compiler warnings around fallthrough switches and missing virtual methods
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-05-25 22:22:42 +12:00
Nick Avramoussis 0cf46fb90f Fixed a number of global constructor issues which could cause SIOF problems
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-05-25 22:22:42 +12:00
Nick Avramoussis 4a71881492 Merge pull request #1584 from kmuseth/fix_IteratorRange
Fixed precision bug in tree::RangeIterator
2023-05-12 14:34:17 +12:00
Nick Avramoussis 6d1ff040e3 Merge pull request #1589 from Idclip/treetype_gcc_fix
Fixed a crash with GCC11 in Tree::treeType()
2023-05-12 14:33:38 +12:00
Nick Avramoussis 34095fa3be Merge pull request #1598 from Idclip/point_impl
Moved most internal point tool implementations into points/impl
2023-05-12 14:32:54 +12:00
apradhana e7ec2a716e Merge pull request #1612 from apradhana/TSC_2023_04_18
Add TSC Meeting Notes April 18, 2023.
2023-05-02 12:38:36 -07:00
Jeff Lait d3d9e1bcdb TSC Meeting notes.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2023-05-02 15:31:59 -04:00
Andre Pradhana 18b4f69ad6 Add TSC Meeting Notes April 18, 2023.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2023-05-02 10:44:26 -07:00
jmlait 5cb821242f Merge pull request #1606 from sideeffects/sendupstream_remove_boost_uuid
Remove Boost UUID
2023-04-25 21:48:50 -04:00
Jeff Lait 3c2ee3d82d Make the to_hex take an unsigned int in both cases as shifting right
will promote char anyways.

Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2023-04-11 16:13:44 -04:00
Jeff Lait 7c29811be4 More casting to make char -> int conversion happy.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2023-04-11 12:00:37 -04:00
Jeff Lait cf38e71441 Add explicit (char) cast to output to silence narrowing warnings.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2023-04-05 14:09:46 -04:00
Jeff Lait b70115f70a Add release notes for the change.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2023-04-04 16:40:12 -04:00
Jeff Lait 27e821f902 Fix off by one when initializing old-style uuids.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2023-04-04 16:37:33 -04:00
Ken Museth 89be525e36 Merge branch 'master' into fix_IteratorRange 2023-03-25 11:18:35 -07:00
Andre Pradhana 47952ca885 Addresses warning/error: integer conversion resulted in truncation as reported and solved by C. Horvath.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2023-03-10 18:14:09 -08:00
Nick Avramoussis 040893418c Moved most internal point tool implementations into points/impl
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-03-04 21:16:32 +00:00
Nick Avramoussis 4a31d7f821 Added LLVM 15 CI
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-03-04 17:53:00 +00:00
Nick Avramoussis c1d92f1aac Added basic support for LLVM 15 by toggling off opaque pointer support on all contexts
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-03-04 17:03:17 +00:00
Nick Avramoussis 7edd8cd86f Merge pull request #1574 from Idclip/leafmanager_root_leaf_fix
LeafManager LeafArray bugfix from RootNode<LeafNode>
2023-02-28 22:17:18 +00:00
Nick Avramoussis 0a9502852e Merge branch 'master' into treetype_gcc_fix 2023-02-27 21:49:24 +00:00
Nick Avramoussis 0cd5ed704b Merge pull request #1588 from Idclip/vdb_ax_bugfix
Fixed incorrect optimization level default in vdb_ax
2023-02-27 21:47:33 +00:00
Nick Avramoussis ddaff1f0f0 Fixed a crash with GCC11 in Tree::treeType()
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-02-25 16:07:44 +00:00
Nick Avramoussis a583c329eb Minor update to FindBlosc.cmake to support renamed lib on windows
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-02-25 14:58:16 +00:00
Nick Avramoussis 146204311a Fixed incorrect optimization level default in vdb_ax
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-02-25 14:58:16 +00:00
Ken Museth ffdf6971f0 Fixed precision bug in tree::RangeIterator
Signed-off-by: Ken Museth <ken.museth@gmail.com>
2023-02-16 10:14:59 -08:00
Nick Avramoussis c332f81cf2 Merge pull request #1570 from Idclip/ci_updates
CI Updates
2023-02-15 17:09:39 +00:00
Nick Avramoussis 0e52f85b81 Merge pull request #1577 from Idclip/iterator_deprecated_cxx17
Removed inheritance from std::iterator, deprecated from C++17
2023-02-14 12:02:06 +00:00
Nick Avramoussis a8b9eb5854 Removed macos tests with tbb 2020 which has been disabled in homebrew
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-02-07 21:08:30 +00:00
Dan Bailey 26d63f8add Meeting notes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2023-02-07 11:37:04 -08:00
Nick Avramoussis cd4498bf17 Fixed a bug with LeafManager construction from a single level RootNode
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-02-05 20:31:31 +00:00
Nick Avramoussis 2188e2829d Merge pull request #1578 from Idclip/float_to_half_ax
Fixed a crash in AX when target does not have f16c support
2023-02-03 15:45:08 +00:00
Dan Bailey b865fbd0e7 Merge pull request #1563 from danrbailey/fix_gcc9_warnings
Fix all the int-in-bool-context warnings with GCC9
2023-02-02 20:52:43 -08:00
Dan Bailey 7c3aa5a808 change notes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2023-02-02 20:47:49 -08:00
Dan Bailey fae88a8b81 Merge pull request #1559 from danrbailey/projectioncrash
Fix Segfault in Projection Mode of VDB Advect Points SOP
2023-02-02 20:44:41 -08:00
Nick Avramoussis c9c2528e9a Fixed a crash in AX when target does not have f16c support
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-01-30 17:55:14 +00:00
Nick Avramoussis 569f7f6cd6 Removed inheritance from std::iterator, deperecated from C++17
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-01-29 22:14:18 +00:00
Nick Avramoussis 7d88a6194d Fixed a bug with LeafNodeBool TopologyCopy constructor
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-01-29 22:02:09 +00:00
Nick Avramoussis 1ba2520a72 Added a unittest for LeafManager construction from different tree configurations
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-01-29 18:13:27 +00:00
Nick Avramoussis 2908fd3df9 Merge pull request #731 from Idclip/boost_string
Removed boost/string methods in favour of utility methods in util/Name.h
2023-01-29 11:33:00 +00:00
Nick Avramoussis 3821773310 Removed boost/string methods in favour of utility methods in util/Name.h
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-01-29 00:24:51 +00:00
Nick Avramoussis e711ff7d05 Updated build documentation fix some pybind compiler warnings/CI
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-01-27 17:19:57 +00:00
Nick Avramoussis 0b91c1ce74 Various CI fixes:
- Remove custom blosc CI logic (images now have 1.17)
 - Bump extra weekly CI to build with Clang14
 - zip code coverage function index

Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-01-27 17:19:57 +00:00
Ken Museth 434fb9f665 Merge pull request #1530 from sideeffects/send_upstream_ruleofzero
Remove the explicit default assignment operator.
2023-01-27 07:47:22 -08:00
Nick Avramoussis 7c5fe62919 deprecated-copy fixes
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-01-27 15:03:57 +00:00
Nick Avramoussis 0b86176eb1 Removed defines which are no longer uses (we do not support TBB2018 anymore)
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-01-27 15:03:57 +00:00
Nick Avramoussis c131f3eafc Fixed some more deprecated volatile usage
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-01-27 15:03:57 +00:00
Nick Avramoussis 266b9ef4e4 Merge pull request #1571 from kmuseth/feature/pybind11
Feature/pybind11
2023-01-27 13:29:14 +00:00
Nick Avramoussis d2f8d4a818 Merge pull request #1522 from sideeffects/sendupstream_use_offsetof
Switch to using the static asserts.
2023-01-27 12:20:42 +00:00
Nick Avramoussis 2aeb50e92b Merge pull request #1528 from malaterre/shift-count-overflow
Prefer fixed-width integer types instead of size_t
2023-01-27 12:19:27 +00:00
Nick Avramoussis 0b8c1f74e6 Added back CI thread logic
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-01-27 11:35:43 +00:00
Ken Museth 56bbe63c2d Adding PyBind11
Signed-off-by: Ken Museth <ken.museth@gmail.com>
2023-01-26 23:48:37 -08:00
Ken Museth b81ea33568 Adding PyBind11
Signed-off-by: Ken Museth <ken.museth@gmail.com>
2023-01-26 23:17:11 -08:00
Nick Avramoussis cbcf15ff8b Merge pull request #1547 from Idclip/feature/value_accessor_revamp
Consolidated ValueAccessor implementations
2023-01-26 18:51:18 +00:00
Nick Avramoussis 6e99c7987b Added pendingchanges for accessor changes
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-01-26 16:46:14 +00:00
Nick Avramoussis 888f309c0a Added back the optimized ValueAccessor size instantiation when a leaf buffer cannot be cached
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-01-26 15:05:32 +00:00
jmlait 00a0cd3db0 Merge pull request #1568 from sideeffects/sendupstream_tscnotes20230118
TSC Notes for Jan 17 2023
2023-01-25 13:31:57 -05:00
apradhana 742a9148ec Merge pull request #1567 from apradhana/TSC-2023-01-10
Add TSC Meeting Notes 2023-01-10.md.
2023-01-25 10:17:38 -08:00
Nick Avramoussis 8a68f14409 Split out Type/TypeList tests, added unit tests for TupleList and other minor improvements
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-01-25 18:01:46 +00:00
Nick Avramoussis 594ed722c0 Consolidated ValueAccessor implementations
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-01-25 18:01:46 +00:00
jlait df2d3d8cca After further discussion, remove all the default assignment operators.
If you specify an assignment operator (even if default) you should
also be specifying a copy constructor.  We haven't done the latter, so
should just leave as rule-of-zero.

Signed-off-by: jlait <jlait@andorra.sidefx.com>
2023-01-25 12:14:13 -05:00
jlait 774aee5a22 Fix the agenda.
Signed-off-by: jlait <jlait@andorra.sidefx.com>
2023-01-25 12:09:14 -05:00
jlait c0bb9fe950 Replace boost::uid with a simple string.
Unlike the comments, however, we were NOT storing UUID as an ascii
string, we were instead storing a fixed byte array of the ascii
version of the UUID string.  This means we have to continue to save a
uuid-like string to ensure old readers will not fail (the boost::uuid
will just fail if it doesn't like where hyphens are)

Do not attempt to format the UUID as a random UUID, instead just
randomize the entire string; this is not meant to interoperate with
any other UUID system.

Generate the random string purely from std::random_device so we get
maximum entropy.  This can throw system specific exceptions, so catch
those and produce an always-fail state of an empty string.  These
files may not load in older versions as the nil string I think will be
rejected by the boost uuid reader; but I also don't think this can
occur in modern systems with /dev/urandom.

Signed-off-by: jlait <jlait@andorra.sidefx.com>
2023-01-25 12:01:42 -05:00
jlait f00c31c3ef TSC Notes for Jan 17 2023
Signed-off-by: jlait <jlait@andorra.sidefx.com>
2023-01-18 20:59:14 -05:00
Andre Pradhana 6376183b21 Add TSC Meeting Notes 2023-01-10.md.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2023-01-17 10:52:36 -08:00
Nick Avramoussis d77eaade1e Merge pull request #1565 from Idclip/boost_fixes
Fixed a boost build issue when OPENVDB_USE_DELAYED_LOADING is set to OFF
2023-01-15 12:38:55 +00:00
Nick Avramoussis b1fdff99e8 Fixed a boost build issue when OPENVDB_USE_DELAYED_LOADING is set to OFF
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-01-10 21:13:14 +00:00
Dan Bailey 3a109d0f73 Fix all the int-in-bool-context warnings with GCC9
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2023-01-09 14:08:03 -08:00
Nick Avramoussis f53592fe7c Merge pull request #1552 from Idclip/cxx20_fix
Minor C++20 build fix
2023-01-09 19:25:37 +00:00
Dan Bailey 3d167ebb2f Update changes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2023-01-03 20:24:50 -08:00
Dan Bailey c0c32f3f00 Fix Projection mode of Advect Points SOP
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2023-01-03 20:24:45 -08:00
Nick Avramoussis 2caed72398 Merge pull request #1386 from Idclip/feature/replicate
Added PointReplicate for duplicating points and attributes
2022-12-20 12:46:30 +00:00
Nick Avramoussis 05266b52a0 Minor C++20 build fix
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-12-18 12:17:41 +00:00
Ken Museth a4d4c5fe63 Merge pull request #1550 from brechtvl/fix-nanovdb10-hip
Fix NanoVDB build errors with HIP on Linux
2022-12-15 14:40:57 -08:00
Brecht Van Lommel f068ce61c8 Fix NanoVDB build errors with HIP on Linux
Signed-off-by: Brecht Van Lommel <brecht@blender.org>
2022-12-15 17:52:49 +01:00
Nick Avramoussis 144c2a6263 Merge pull request #1545 from Idclip/feature/runner_forks
Fixed forked repo action runners
2022-12-14 23:48:33 +00:00
Dan Bailey dea3fd629a Merge pull request #1544 from danrbailey/notes_29_11
Meeting notes 29th Nov
2022-12-12 22:27:42 -08:00
Nick Avramoussis c124055415 Merge pull request #1532 from Idclip/imath_half_3.1
Bumped internal copy of half to Imath 3.1.6
2022-12-12 22:50:11 +00:00
Nick Avramoussis 60796b6ea7 Merge pull request #1542 from Idclip/cmake_fixes
Switched to automatically generating CMake ABI options
2022-12-12 22:47:48 +00:00
Nick Avramoussis b521258be1 Choose different defaults for -j in ci/build depending on the runner
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-12-11 23:09:44 +00:00
Nick Avramoussis f302d781bb Fixed forked repo action runners
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-12-11 20:20:37 +00:00
Dan Bailey 7104f152ff Meeting notes 29th Nov.
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-12-09 16:43:37 -08:00
Nick Avramoussis 9f22545480 Switched to automatically generating ABI options based on the current major version
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-12-06 09:31:59 +00:00
Nick Avramoussis 4dc19b1ef7 Merge pull request #1527 from Idclip/32bit_ax_fix
Fixed a build issue with AX on 32 bit platforms
2022-12-02 16:06:27 +00:00
Nick Avramoussis a3439a03e7 Merge pull request #1537 from Idclip/start_v10.0.2
Start development of 10.0.2
2022-12-02 15:53:09 +00:00
Nick Avramoussis 557eed1d32 Start development of 10.0.2
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-12-02 15:11:44 +00:00
Nick Avramoussis 0b433564b3 Merge pull request #1533 from AcademySoftwareFoundation/v10.0.1_rc
Updated change logs for 10.0.1
2022-12-02 14:38:15 +00:00
Mathieu Malaterre ae5b7663d0 Prefer fixed-width integer types instead of size_t
An implementation is free to use any representation it likes for size_t.
In general you'll have 32-bit size_t on 32-bit programs.

Fixes warnings:

openvdb_ax/openvdb_ax/codegen/StandardFunctions.cc: In instantiation of 'SeedType openvdb::v10_0::ax::codegen::{anonymous}::hashToSeed(size_t) [with SeedType = unsigned int; size_t = unsigned int]':
openvdb_ax/openvdb_ax/codegen/StandardFunctions.cc:978:76:   required from here
openvdb_ax/openvdb_ax/codegen/StandardFunctions.cc:56:19: warning: right shift count >= width of type [-Wshift-count-overflow]
   56 |     } while (hash >>= sizeof(SeedType) * 8);
      |              ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~

and

openvdb_ax/openvdb_ax/test/integration/TestStandardFunctions.cc:1175:23: warning: right shift count >= width of type [-Wshift-count-overflow]
 1175 |         } while (hash >>= sizeof(uint32_t) * 8);
      |                  ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Mathieu Malaterre <mathieu.malaterre@gmail.com>
2022-11-30 12:01:01 +01:00
Mathieu Malaterre ec2a10fbde Use fixed-width integers to remove warnings (32bits)
Removes:

/<<PKGBUILDDIR>>/nanovdb/nanovdb/unittest/TestNanoVDB.cc:1729:16: warning: unsigned conversion from ‘long long int’ to ‘size_t’ {aka ‘unsigned int’} changes value from ‘45634923663’ to ‘2685250703’ [-Woverflow]
 1729 |       offset = 45634923663;
      |                ^~~~~~~~~~~
/<<PKGBUILDDIR>>/nanovdb/nanovdb/unittest/TestNanoVDB.cc:1757:16: warning: unsigned conversion from ‘long long int’ to ‘size_t’ {aka ‘unsigned int’} changes value from ‘45634923663’ to ‘2685250703’ [-Woverflow]
 1757 |       offset = 45634923663;
      |                ^~~~~~~~~~~
/<<PKGBUILDDIR>>/nanovdb/nanovdb/unittest/TestNanoVDB.cc: In member function ‘virtual void TestNanoVDB_BasicGrid_Test::TestBody()’:
/<<PKGBUILDDIR>>/nanovdb/nanovdb/unittest/TestNanoVDB.cc:2286:39: warning: narrowing conversion of ‘nanovdb::Grid<nanovdb::Tree<nanovdb::RootNode<nanovdb::InternalNode<nanovdb::InternalNode<nanovdb::LeafNode<float, nanovdb::Coord, nanovdb::Mask, 3>, 4>, 5> > > >::memUsage()’ from ‘uint64_t’ {aka ‘long long unsigned int’} to ‘size_t’ {aka ‘unsigned int’} [-Wnarrowing]
 2286 |     size_t bytes[6] = {GridT::memUsage(), TreeT::memUsage(), RootT::memUsage(1), NodeT2::memUsage(), NodeT1::memUsage(), LeafT::DataType::memUsage()};
      |                        ~~~~~~~~~~~~~~~^~
/<<PKGBUILDDIR>>/nanovdb/nanovdb/unittest/TestNanoVDB.cc:2286:58: warning: narrowing conversion of ‘nanovdb::Tree<nanovdb::RootNode<nanovdb::InternalNode<nanovdb::InternalNode<nanovdb::LeafNode<float, nanovdb::Coord, nanovdb::Mask, 3>, 4>, 5> > >::memUsage()’ from ‘uint64_t’ {aka ‘long long unsigned int’} to ‘size_t’ {aka ‘unsigned int’} [-Wnarrowing]
 2286 |     size_t bytes[6] = {GridT::memUsage(), TreeT::memUsage(), RootT::memUsage(1), NodeT2::memUsage(), NodeT1::memUsage(), LeafT::DataType::memUsage()};
      |                                           ~~~~~~~~~~~~~~~^~
/<<PKGBUILDDIR>>/nanovdb/nanovdb/unittest/TestNanoVDB.cc:2286:77: warning: narrowing conversion of ‘nanovdb::RootNode<nanovdb::InternalNode<nanovdb::InternalNode<nanovdb::LeafNode<float, nanovdb::Coord, nanovdb::Mask, 3>, 4>, 5> >::memUsage(1)’ from ‘uint64_t’ {aka ‘long long unsigned int’} to ‘size_t’ {aka ‘unsigned int’} [-Wnarrowing]
 2286 |     size_t bytes[6] = {GridT::memUsage(), TreeT::memUsage(), RootT::memUsage(1), NodeT2::memUsage(), NodeT1::memUsage(), LeafT::DataType::memUsage()};
      |                                                              ~~~~~~~~~~~~~~~^~~
/<<PKGBUILDDIR>>/nanovdb/nanovdb/unittest/TestNanoVDB.cc:2286:147: warning: narrowing conversion of ‘nanovdb::LeafData<float, nanovdb::Coord, nanovdb::Mask, 3>::memUsage()’ from ‘uint64_t’ {aka ‘long long unsigned int’} to ‘size_t’ {aka ‘unsigned int’} [-Wnarrowing]
 2286 |     size_t bytes[6] = {GridT::memUsage(), TreeT::memUsage(), RootT::memUsage(1), NodeT2::memUsage(), NodeT1::memUsage(), LeafT::DataType::memUsage()};
      |                                                                                                                          ~~~~~~~~~~~~~~~~~~~~~~~~~^~

Signed-off-by: Mathieu Malaterre <mathieu.malaterre@gmail.com>
2022-11-30 11:14:30 +01:00
Nick Avramoussis 8d02be5eb3 Disable conversion warnings for Half.h
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-11-30 09:10:03 +00:00
Nick Avramoussis d07714b751 Removed unnecessary API exports
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-11-30 09:09:43 +00:00
Nick Avramoussis 4b61a59827 Bumped internal copy of half to Imath 3.1.6
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-11-29 23:19:31 +00:00
Nick Avramoussis ddf922fea9 Updated change logs for 10.0.1
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-11-29 21:33:33 +00:00
Nick Avramoussis 3e59ff83a8 Fixed a lifetime bug which could cause a segfault with a destructed std::function
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-11-29 18:55:13 +00:00
Nick Avramoussis 1e476667b6 Merge branch 'master' into feature/replicate 2022-11-29 17:39:28 +00:00
jlait 001457bfb1 Remove the explicit default assignment operator - if this is
specified, so should the copy constructor and move operators, as per
rule of five.

Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-11-28 15:41:53 -05:00
Nick Avramoussis eb0d21216c Fixed a build issue with AX on 32 bit platforms. IR void* is always i8* regardless
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-11-26 17:59:49 +00:00
Dan Bailey 182d411487 Merge branch 'master' into replicate 2022-11-25 15:57:21 -08:00
Nick Avramoussis 43ecdc28ff Merge pull request #1514 from danrbailey/notes_18_10
Add meeting notes for 18 Oct
2022-11-20 15:45:23 +00:00
Nick Avramoussis f4b980ee99 Merge pull request #1523 from sideeffects/sendupstream_fix_seampoints
Fix uninitialized pointflags
2022-11-20 15:44:24 +00:00
Nick Avramoussis 8bf0463fb3 Merge pull request #1524 from Idclip/various_minor_fixes
Various minor fixes
2022-11-20 15:43:49 +00:00
jlait d4bdeb503a Require (void) so the use doesn't itself trigger a warning.
Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-11-18 17:43:50 -05:00
jlait dd4b6757ef Force interiorTest to be considered used in other path of constexpr
if.

Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-11-18 17:32:27 -05:00
jlait cb1b8e96e7 Remove unused variables and explicitly cast DIM to signed.
Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-11-18 17:04:40 -05:00
jlait 729fcb0e5a Include the UT_Version for the version checks.
Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-11-18 16:21:13 -05:00
jlait 62c1fbf409 (skrivantomas): Support for an oracle in mesh to volume to handle
cases where the sign is known.
LevelSetRebuild is changed to use the input grid as the oracle.
Option to use GU_WindingNumber for future versions of Houdini.

Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-11-18 16:20:59 -05:00
Nick Avramoussis 6772ff1c53 Improved release notes and minor doc fixes
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-11-18 13:38:53 +00:00
Nick Avramoussis 5730746be5 Fixed CXX standard requirement for VDB components in FindOpenVDB.cmake
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-11-18 13:38:53 +00:00
Nick Avramoussis 1233cf9cc6 Added C++20 CI for OpenVDB and OpenVDB AX
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-11-18 13:01:59 +00:00
Nick Avramoussis 85e89b7f9f Merge pull request #1512 from apradhana/prepare_for_v10_0_1
Update CMakeLists, CHANGES, and doc/changes
2022-11-18 12:42:28 +00:00
jlait 9435051bda Version file change.
Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-11-17 14:32:09 -05:00
jlait 57ab90ab51 Fix unitialized seampoint array.
Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-11-17 14:30:53 -05:00
jlait f1a1aae8b3 Switch to using the static asserts.
The comment mentions that they have compiler warnings, but with clang
15 we now get compiler warnings for trying to do differences with
nullptr.

Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-11-16 09:55:59 -05:00
jmlait 65a39c8807 Merge pull request #1518 from sideeffects/send_upstream_tscnotes20221101
Meeting notes for Nov 1st, 2022
2022-11-08 15:09:30 -05:00
apradhana 6432d93662 Merge pull request #1519 from apradhana/Fix_vdb_tool_install
Add install in CMakeLists for vdb_tool.
2022-11-07 21:55:16 -08:00
Andre Pradhana 26b17fad39 Add install in CMakeLists for vdb_tool.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-11-07 10:44:44 -08:00
jlait ec7a67fbc6 Meeting notes for Nov 1st, 2022
Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-11-06 14:26:17 -05:00
jmlait f20fd6741b Merge pull request #1510 from sideeffects/create_detached_group
Use modern GA_Detail::createDetached*Group() API
2022-11-06 14:17:32 -05:00
Dan Bailey bae1424745 Add meeting notes for 18 Oct
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-11-03 10:20:45 -07:00
Andre Pradhana 8fec35c40c Revert release process, add the suggestion to run the files through a spell-check tool.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-11-01 12:13:09 -07:00
Andre Pradhana 179b32d333 Update release process.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-11-01 09:50:01 -07:00
Andre Pradhana a00a61aa67 Update CMakeLists, CHANGES, and doc/changes.txt with VDB 10.0.1.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-11-01 09:47:00 -07:00
Edward Lam 2fec4ffc2a Use modern GA_Detail::createDetached*Group() API
... instead of the unsafe newDetachedPrimitiveGroup() that will
be deprecated in a future Houdini version.

Signed-off-by: Edward Lam <e4lam@yahoo.com>
2022-10-28 15:17:28 -04:00
apradhana f6f9bd8254 Merge pull request #1509 from AcademySoftwareFoundation/v10.0.0_rc
Merge v10.0.0_rc to master
2022-10-27 17:51:22 -07:00
apradhana be0e7a7886 Merge pull request #1508 from apradhana/update_changes_v2
Add vdb_tool in a block announcement.
2022-10-27 16:35:20 -07:00
Andre Pradhana 975742b1d3 Add vdb_tool in a block announcement.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-27 16:32:54 -07:00
apradhana 40a781c3ca Merge pull request #1507 from apradhana/update_changes_v1
Minor fix in the documentation.
2022-10-27 15:07:51 -07:00
Andre Pradhana 5036364ae5 Minor fix.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-27 14:56:48 -07:00
apradhana 9dd8ac376e Merge pull request #1506 from apradhana/update_changes
Update changes
2022-10-27 14:25:59 -07:00
Andre Pradhana d1479099d9 Minor fix.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-27 14:15:46 -07:00
Andre Pradhana 5515c8fe56 Add OpenVDB Link to CHANGES and doc/changes.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-27 14:14:40 -07:00
Andre Pradhana 850e92ab5b Remove files from pendingchanges.txt.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-27 13:58:22 -07:00
Andre Pradhana 36ecd2ac3b Update CHANGES and doc/changes.txt.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-27 13:55:47 -07:00
apradhana 85263596ec Merge pull request #1452 from Idclip/value_accessor_buffer_cache
ValueAccessor Buffer Cache
2022-10-27 11:51:39 -07:00
Nick Avramoussis bd16c70799 Disable epydoc documentation until we have a py3 solution
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-10-27 12:04:28 +01:00
Ken Museth e782a6a790 Merge pull request #1498 from apradhana/vdbtool_ci
Add CI for vdb_tool
2022-10-27 04:03:35 -07:00
Ken Museth c91c2b9cf7 Merge pull request #1505 from kmuseth/nanovdb_fix
cleanup
2022-10-26 16:45:41 -07:00
Ken 597b2d108c cleanup
Signed-off-by: Ken <ken.museth@gmail.com>
2022-10-26 14:25:43 -07:00
Dan Bailey 3c56b3280a Merge pull request #1504 from AcademySoftwareFoundation/feature/abichecker
Fix the abi checker in Weekly CI
2022-10-26 13:56:27 -07:00
Dan Bailey 029a0e3a89 Merge pull request #1503 from AcademySoftwareFoundation/feature/fix_lite_build
Fix Unit Tests when Delayed Loading is Disabled
2022-10-26 13:56:04 -07:00
Dan Bailey 398e310e3e Fix the abi checker
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-26 12:01:56 -07:00
apradhana 2a8f8b5644 Merge pull request #1351 from ghurstunither/feature/openvdb_wolfram
OpenVDBLink -- link between Mathematica and OpenVDB
2022-10-26 11:07:22 -07:00
Andre Pradhana 80198dfb07 Add support to link against a preinstalled nanovdb.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-26 10:39:52 -07:00
Andre Pradhana 1dda67397b Fix component library if we are trying to find nanovdb component in OpenVDB.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-26 10:25:35 -07:00
Dan Bailey 2ebdb24f79 Fix filename bug in Point Count unit test
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-26 08:27:20 -07:00
Nick Avramoussis 89bb7e8b6a Additional improvements to probe methods, fixed addTile and added additional unit tests
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-10-26 12:07:24 +01:00
Dan Bailey b9dfb4a47d Add some missing delayed load guards
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-25 23:45:02 -07:00
Dan Bailey 4efdbfc06e Replace io::TempFile with a local file path
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-25 23:44:59 -07:00
Dan Bailey 1a6128af2f Check for delayed loading in TestCount::testMemUsage()
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-25 23:44:54 -07:00
Andre Pradhana d0c7b0bfaa Uses interface.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-25 19:39:31 -07:00
Andre Pradhana 1ea95f8292 Uses target_compile_options.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-25 16:54:52 -07:00
ghurstunither d3ecfeb8b4 Update OpenVDBLink.m
whitespace

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-25 18:31:13 -04:00
ghurstunither 7e62378513 references to external material
Adds references to external material.

* Logo and docs in the readme
* OpenVDBDocumentation[], which can open the docs in a web browser or download them locally.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-25 18:28:07 -04:00
Ken Museth de7893f674 Merge pull request #1502 from kmuseth/nanovdb_fix
fixed compile warning on Windows
2022-10-25 15:20:36 -07:00
Andre Pradhana 0b765baa68 Change add_compile_definitions to target_compile_definitions.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-25 14:04:46 -07:00
Andre Pradhana 392eccd4e7 Update CI for VDB_TOOL to reflect changes.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-25 13:53:13 -07:00
Andre Pradhana 7e8aa46383 Change the use of VDB_TOOL_USE to OPENVDB_TOOL_USE.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-25 13:44:29 -07:00
Ken 923bc0aa83 fixed compile warning on Windows
Signed-off-by: Ken <ken.museth@gmail.com>
2022-10-25 12:45:54 -07:00
ghurstunither 24aa6a18f5 Update Render.m
Make sure all colors are in RGB.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-25 13:02:55 -04:00
apradhana 6cca30ff59 Merge pull request #1482 from apradhana/fastsweeping_pruneminmaxfloat
Prune SDF value if there is a float max or float min.
2022-10-25 08:42:01 -07:00
Nick Avramoussis 54a66eb1e1 Significant performance improvements and bug fixes to various Accessor methods
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-10-25 16:39:34 +01:00
Dan Bailey 2d4f31c03f Merge pull request #1493 from danrbailey/remove_deprecated_methods
Remove all functionality deprecated prior to VDB 9.0
2022-10-25 08:39:21 -07:00
apradhana a19b08b6f2 Merge pull request #1501 from apradhana/TSC-2022-10-04
Add meeting notes.
2022-10-25 08:30:28 -07:00
Andre Pradhana d8978dafa6 Change word: iterator -> accessor.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-25 07:47:56 -07:00
Rich Jones d5076f60e3 Merge pull request #1497 from richhones/meetingnotes
Adding meeting notes
2022-10-25 15:38:48 +01:00
Andre Pradhana 5a5982d1de Add meeting notes for 2022-06-21 with signoff.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-25 01:53:32 -07:00
Andre Pradhana 3cbc61c190 Add meeting notes 2022-09-06 and 2022-10-04.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-25 01:44:22 -07:00
ghurstunither b0769fa238 C++17
Compile with C++17.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-24 16:19:29 -04:00
Rich Jones 9367f0040a Adding meeting notes
Signed-off-by: Rich Jones <richhones@users.noreply.github.com>
2022-10-24 21:15:31 +01:00
Andre Pradhana 108d879352 Fix root node.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-24 12:11:19 -07:00
Dan Bailey 2e1904ac81 Merge pull request #823 from danrbailey/optionaldelayedload
Make Delayed Loading and Boost IOStreams Optional
2022-10-21 17:58:50 -07:00
Dan Bailey c5a13132df Merge pull request #1492 from danrbailey/remove_string_grids
Remove string grids
2022-10-21 16:12:26 -07:00
Dan Bailey 9ab6fa30be Merge pull request #1490 from danrbailey/remove_deprecated_virtual
Remove deprecated virtual methods from AttributeArray for ABI=10
2022-10-21 16:12:07 -07:00
Dan Bailey 435c4ec049 Merge pull request #1491 from danrbailey/remove_abi
More ABI-related cleanup
2022-10-21 16:11:42 -07:00
Nick Avramoussis a483af1f43 Merge pull request #1499 from AcademySoftwareFoundation/feature/weekly_llvm_fix
Fixed AX/LLVM weekly CI
2022-10-22 00:10:36 +01:00
Andre Pradhana 3f1adf98df Get rid of virtual keyword.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-21 12:17:56 -07:00
ghurstunither 00435c158f Trailing whitespace
Trailing whitespace.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-21 14:03:20 -04:00
ghurstunither ce74a6f24e glue namespace
Places glue tensors inside a namespace.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-21 14:02:32 -04:00
ghurstunither 60fbf13451 update unit tests
Update unit tests to reflect name changes of symbols.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-21 13:21:28 -04:00
Andre Pradhana 6411813be1 Try fix by adding inline.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-21 10:04:35 -07:00
Andre Pradhana 1720ec0dd9 Update CMakelists again.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-21 10:01:50 -07:00
ghurstunither 56a12a0db4 missing functionality
Adds missing functionality that should have been in the link.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-21 12:51:19 -04:00
ghurstunither 1ccd048350 Update Readme.md
Adds note about tested OS's.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-21 08:14:05 -04:00
ghurstunither 25524c71f8 tweak build settings
Adds build settings for linux and remove unnecessary -lHalf flag.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-21 08:05:04 -04:00
Andre Pradhana f5cccf20d1 Get rid of verbose.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-20 22:14:12 -07:00
Andre Pradhana 4a8d78e58a Get rid of virtual.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-20 21:40:13 -07:00
Andre Pradhana 34ac616f55 Try with more verbose cmake.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-20 21:22:11 -07:00
Andre Pradhana 6117dd21ac Revert.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-20 16:26:44 -07:00
Andre Pradhana fb4461d222 Trying to get more info in macos CI.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-20 16:06:05 -07:00
ghurstunither 7e54f609f4 more ifdef guards & namesmapces
Adds ifdef guards in the 'inline' header files.

Places OpenVDBGrid under the namespace openvdbmma.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-20 18:44:00 -04:00
ghurstunither 5eeaf346cc Merge branch 'master' into feature/openvdb_wolfram 2022-10-20 18:05:26 -04:00
ghurstunither 055640ec7d Update BuildSettings.m
Trailing whitespace

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-20 16:00:13 -04:00
Andre Pradhana 9b81e0f887 More static casts.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-20 10:55:31 -07:00
Andre Pradhana a5bb424478 Revert back to collect more tests.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-20 10:32:53 -07:00
Andre Pradhana 2bd2c84987 Unused variable error and cast from const unsigned int* to char* casts away qualifiers.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-20 10:22:12 -07:00
ghurstunither 83c8b1988a license in m files
Add license note in all Mathematica files.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-20 13:09:10 -04:00
ghurstunither 066797e82d license
Includes license at the top of files.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-20 13:04:59 -04:00
ghurstunither 038e293035 #ifdef guards
#pragma once to #ifdef guards per coding standards.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-20 13:03:45 -04:00
ghurstunither ad1d0499ba .inl extension to .h
.inl extension to .h per coding standards.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-20 12:41:48 -04:00
ghurstunither da665f20bc Rename transform.h to Transform.h
Rename transform.h to Transform.h

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-20 12:31:31 -04:00
ghurstunither ffc24acac0 Rename render.h to Render.h
Rename render.h to Render.h

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-20 12:31:17 -04:00
ghurstunither 3c70bc880c Rename metadata.h to Metadata.h
Rename metadata.h to Metadata.h

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-20 12:31:01 -04:00
ghurstunither c25003a442 Rename mesh.h to Mesh.h
Rename mesh.h to Mesh.h

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-20 12:30:45 -04:00
ghurstunither 3fc93fb8ef Rename levelset.h to LevelSet.h
Rename levelset.h to LevelSet.h

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-20 12:30:32 -04:00
ghurstunither 7c4b507b40 Rename image.h to Image.h
Rename image.h to Image.h

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-20 12:30:12 -04:00
ghurstunither 487161f104 Rename distance.h to Distance.h
Rename distance.h to Distance.h

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-20 12:29:09 -04:00
ghurstunither 6ae8a2df07 Rename aggregate.h to Aggregate.h
Rename aggregate.h to Aggregate.h

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-20 12:28:08 -04:00
ghurstunither 412dc529d2 Upper case header files
Upper case header files per the coding standards.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-20 12:21:28 -04:00
ghurstunither e4fbac747b Update IO.m
more trailing space fixes

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-20 12:07:39 -04:00
ghurstunither 722b86d0b5 Update IO.m
tabs to spaces and delete trailing spaces.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-20 12:03:52 -04:00
ghurstunither ffaf38a43d Create Readme.md
Initial pass at openvdb_wolfram readme. Still todo: logo and link to documentation.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-20 12:01:12 -04:00
ghurstunither da9917c25a Update IO.m
Adds support for importing a grid from a url and a zipped grid.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-20 11:38:52 -04:00
Nick Avramoussis 6c78c05e18 Disable fmuladd instructions in some AX tests
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-10-20 14:08:44 +01:00
Nick Avramoussis 7b40331282 Disable fmuladd instructions in some AX tests
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-10-20 12:02:13 +01:00
Nick Avramoussis e585df1e94 Removed blosc install error during CI builds
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-10-20 11:52:53 +01:00
Andre Pradhana 50cb067bf8 Static cast.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-20 00:06:36 -07:00
Andre Pradhana e03d2fc39f Static cast.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-19 23:50:38 -07:00
Andre Pradhana c46acb906a Remove collision with macro from sysmacros: define major gnu_dev_major, etc.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-19 23:14:51 -07:00
Andre Pradhana 5938bae8c3 Turn off using VDB_TOOL_USE_NANO in ci.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-19 22:51:04 -07:00
Andre Pradhana 2e547e482f Fix error when building with OPENVDB_CXX_STRICT=ON.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-19 22:51:04 -07:00
Andre Pradhana a5bcfec329 Fix error when building with OPENVDB_CXX_STRICT=ON.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-19 22:47:45 -07:00
Andre Pradhana 040775eb2f Fix error when building with OPENVDB_CXX_STRICT=ON.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-19 22:45:02 -07:00
Andre Pradhana e2ce54da4a Fix Geometry.h with -DOPENVDB_CXX_STRICT=ON.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-19 22:44:16 -07:00
Andre Pradhana b141579073 Add default destructor to get rid of error in OPENVDB_CXX_STRICT=ON.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-19 22:33:28 -07:00
Andre Pradhana 9c4e022906 Fix clang error in NanoVDB because of the uses of brackets and implicit conversion loses integer precision.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-19 17:57:02 -07:00
ghurstunither 4dc66e8db2 Update Grids.m
Change name of OpenVDBDeleteGrid to OpenVDBClearGrid, which better reflects what it does.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-19 20:55:17 -04:00
ghurstunither 0262fcb316 Update IO.m
Adds missing syntax highlighting for OpenVDBExport options.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-19 19:41:25 -04:00
Andre Pradhana 6f1313ede1 Try to fix compile problems in MacOS.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-19 16:31:40 -07:00
Andre Pradhana 86aebb4f04 Get rid of cmd_tool.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-19 16:30:38 -07:00
Andre Pradhana 5938ceeea2 Remove component cmd_tool, add -DOPENVDB_BUILD_VDB_TOOL=ON.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-19 16:29:26 -07:00
Andre Pradhana 9d21a1200e Remove unused variable.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-19 08:27:35 -07:00
Andre Pradhana 39251d5e0d Add CI for vdb_tool.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-19 00:20:16 -07:00
Andre Pradhana 6f611993a0 Change the use of tools::foreach with NodeManager.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-18 23:58:47 -07:00
Andre Pradhana 1c0e7ad3e2 Merge master.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-18 16:42:42 -07:00
Ken Museth 197ea9190a Merge pull request #1496 from kmuseth/change_IndexGrid
reduced index of IndexGrid by 4
2022-10-18 01:16:40 -07:00
Ken Museth 8075d69287 minor fix
Signed-off-by: Ken Museth <ken.museth@gmail.com>
2022-10-17 21:57:58 -07:00
Ken Museth ded52a5082 reduced index of IndexGrid by 4
Signed-off-by: Ken Museth <ken.museth@gmail.com>
2022-10-17 15:06:29 -07:00
Dan Bailey 36b119b8a9 Use custom StringGrid type (as StringGrids are no longer registered)
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-16 22:24:33 -07:00
Dan Bailey ff41eb595f Remove more StringGrid usage
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-16 21:29:12 -07:00
Dan Bailey 022c62d18d Update changes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-14 16:28:04 -07:00
Dan Bailey 7d339b99b7 Remove unit test from CMake
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-13 11:39:40 -07:00
Nick Avramoussis f323c21a4c Disabled LLVM 15 support
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-10-13 14:02:30 +01:00
Nick Avramoussis 635746989d Fixed a compiler bug with MSVC in ax tests
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-10-13 14:02:27 +01:00
Dan Bailey d011b16adc Remove unit test check
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-12 23:49:05 -07:00
Dan Bailey 9c453097e4 Remove all functionality deprecated prior to VDB 9.0
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-12 23:45:46 -07:00
Dan Bailey 25ad116005 Fix missing macro replacements
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-12 23:28:19 -07:00
Dan Bailey 963065a162 Update changes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-12 23:24:54 -07:00
Dan Bailey 3ba19b139b Remove string grids as native type
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-12 23:21:57 -07:00
Dan Bailey 4fd7d21218 More ABI cleanup
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-12 23:12:56 -07:00
Dan Bailey cac1861088 Update changes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-12 23:07:51 -07:00
Dan Bailey 54b45c32c1 Update docs to remove references to removed methods.
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-12 23:06:29 -07:00
Dan Bailey 65c92bf090 Remove deprecated virtual methods from AttributeArray for ABI=10
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-12 23:01:16 -07:00
Ken Museth 4ffb9bcdf3 Merge pull request #1418 from gaida-exe/angle-brackets 2022-10-12 20:37:50 -07:00
Sebastian Gaida 0efd583dc2 Merge branch 'AcademySoftwareFoundation:master' into angle-brackets 2022-10-12 08:39:30 +02:00
Dan Bailey c1a758fe8c Update Windows LLVM installation to use Visual Studio 2022
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-11 21:35:53 -07:00
jmlait 1feb28e1d5 Merge pull request #1480 from Luc35b/Removed-unnecessary-null-pointer-checks-issue
Removed unnecessary null pointer checks issue
2022-10-11 16:19:36 -04:00
Ken Museth 496b478e46 Merge pull request #1488 from kmuseth/fix_links_README
fixed links in nanovdb/Readme.md
2022-10-11 13:17:13 -07:00
Dan Bailey 567740e604 Add missing delayed load logic to version.h and FindOpenVDB
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-10 23:27:00 -07:00
Ken Museth 27f9e3d98e Merge pull request #1472 from kmuseth/vdb_tool
vdb_tool
2022-10-10 16:10:16 -07:00
Ken Museth 849d38e0da Merge pull request #1457 from malaterre/PointIndexGrid-template-warning
Remove a simple warning about missing template keyword
2022-10-10 16:09:29 -07:00
Ken Museth 4cce9550a2 Merge pull request #1487 from kmuseth/security_fix_in_NanoVDB
replaced sprintf with snprintf to prevent future bufferoverflow
2022-10-10 16:05:23 -07:00
Ken 6178103975 fixed links in nanovdb/Readme.md
Signed-off-by: Ken <ken.museth@gmail.com>
2022-10-10 16:00:24 -07:00
Mathieu Malaterre f861f2d79d Remove a simple warning about missing template keyword
Fixes GCC 12 warning:

openvdb/tools/PointIndexGrid.h:1430:9: error: expected primary-expression before 'template'
 1430 |         template BaseLeaf::merge<Policy>(rhs);
      |         ^~~~~~~~

Signed-off-by: Mathieu Malaterre <mathieu.malaterre@gmail.com>
2022-10-10 09:09:56 +02:00
Ken Museth 1e12efa60c bumping patch version number
Signed-off-by: Ken Museth <ken.museth@gmail.com>
2022-10-09 13:32:28 -07:00
Dan Bailey 9f3376455c Merge branch 'master' into optionaldelayedload 2022-10-09 13:13:39 -07:00
Ken Museth f1719d7be1 updated change notes
Signed-off-by: Ken Museth <ken.museth@gmail.com>
2022-10-09 13:13:25 -07:00
Ken Museth 35fa3d0e32 replaced sprintf with snprintf to prevent future bufferoverflow
Signed-off-by: Ken Museth <ken.museth@gmail.com>
2022-10-09 12:58:21 -07:00
Ken Museth e4bcc519d0 Merge pull request #3 from apradhana/vdb_tool_fix_cmakelists
VDB_tool cmakelists improvement
2022-10-09 11:45:12 -07:00
Andre Pradhana 641431cc7d Update readme.md.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-08 23:53:55 -07:00
Dan Bailey bdad566c58 Merge pull request #1483 from danrbailey/feature/enable_houdini_ci
Enable Houdini CI
2022-10-08 23:21:05 -07:00
Dan Bailey 51765fe0c9 Set up LD_LIBRARY_PATH manually for houdini build and remove build from weekly CI
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-08 23:18:42 -07:00
Andre Pradhana 1d882facf9 Fix compilation of vdb_tool with nanovdb.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-08 23:05:28 -07:00
Andre Pradhana 571dcc7075 Bug fix.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-08 23:05:24 -07:00
Andre Pradhana 3b2f083022 Deal with building vdb core or not.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-08 23:03:21 -07:00
Andre Pradhana 89bc778f26 Don't be too verbose.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-08 23:03:21 -07:00
Andre Pradhana c2e4b4f042 Fix CMakelists.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-08 23:03:21 -07:00
Andre Pradhana 2516e70bf4 Change header of examples to vdb_tool 10.6.1.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-08 23:03:21 -07:00
Ken Museth 64cec7e024 Merge pull request #1477 from kmuseth/offset_RootNode 2022-10-08 21:58:13 -07:00
Nick Avramoussis 25b25cc557 Enable Houdini CI
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-08 17:40:49 -07:00
Ken Museth 10f8df9331 Merge pull request #1454 from apradhana/TSC-2022-07-26 2022-10-07 18:40:33 -07:00
Ken Museth f9859690b1 Merge pull request #1484 from kmuseth/fix_to_Tuple
Fix to tuple
2022-10-07 18:10:32 -07:00
Ken 9905661740 fixed a typo in the previous commit
Signed-off-by: Ken <ken.museth@gmail.com>
2022-10-07 17:37:28 -07:00
Ken 2e718b81d8 added more checks for non-zero root node offsets
Signed-off-by: Ken <ken.museth@gmail.com>
2022-10-07 17:28:11 -07:00
Ken 556b839366 Merge branch 'master' into offset_RootNode 2022-10-07 17:17:25 -07:00
Ken ddd7fb7353 added pendingchanges/vdb_tool.txt
Signed-off-by: Ken <ken.museth@gmail.com>
2022-10-07 17:15:35 -07:00
Ken 8f0b77e8a7 fixed some typos
Signed-off-by: Ken <ken.museth@gmail.com>
2022-10-07 17:05:58 -07:00
Ken 49065eb18c moved private block to end of all class in vdb_tool
Signed-off-by: Ken <ken.museth@gmail.com>
2022-10-07 16:51:49 -07:00
Ken 719ddd5377 Merge branch 'master' into vdb_tool 2022-10-07 16:18:12 -07:00
Ken 8a63fb631d Merge branch 'master' into fix_to_Tuple 2022-10-07 16:15:07 -07:00
Dan Bailey 365f18efa4 Merge pull request #1469 from danrbailey/gha_update_ci
Use Larger GHA instances from ASWF for Linux/Windows
2022-10-07 11:37:25 -07:00
Dan Bailey 90f4feb04c Merge pull request #1473 from danrbailey/tsc_notes
TSC Meeting Notes - 08/30 and 09/13
2022-10-07 10:05:51 -07:00
Dan Bailey 7b37b560a6 Fix numbering
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-07 10:05:28 -07:00
Dan Bailey 667c6d7c19 Fix static openexr cmake bug in vdb render
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-07 09:19:29 -07:00
Dan Bailey d53a283c0c Minimum Cuda version of 11.6 needed for VS 2022 and add thrust package
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-07 09:19:25 -07:00
Dan Bailey e38e4cfa38 Switch CI from VS 2019 to VS 2022
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-07 09:19:15 -07:00
Dan Bailey 520a9d278d Use wider GHA instances
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-07 09:18:53 -07:00
Ken 30b94b8a8b added pendingchanges/tuple.txt
Signed-off-by: Ken <ken.museth@gmail.com>
2022-10-06 20:17:05 -07:00
Ken 11d5bb07b9 fixed VS2017 build issue in Tuple.h
Signed-off-by: Ken <ken.museth@gmail.com>
2022-10-06 20:13:50 -07:00
Ken b172ebf112 Merge branch 'master' into vdb_tool 2022-10-06 12:57:08 -07:00
Ken 66bdfbf193 changed to camel case
Signed-off-by: Ken <ken.museth@gmail.com>
2022-10-06 10:08:34 -07:00
Ken 7b4f1738fb added more checks for non-zero offsets of RootNode
Signed-off-by: Ken <ken.museth@gmail.com>
2022-10-06 08:47:05 -07:00
Ken 47c7da1000 pendingchanges/root_offset.txt
Signed-off-by: Ken <ken.museth@gmail.com>
2022-10-05 20:29:07 -07:00
Dan Bailey 026c02231f Update changes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-04 23:12:40 -07:00
Dan Bailey 903a0e4278 Update Documentation
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-04 23:10:31 -07:00
Dan Bailey ac6cfe877e Fix doxygen
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-04 23:09:20 -07:00
Dan Bailey eaf5b56edb Extend CI to test with delayed-loading disabled
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-04 23:08:54 -07:00
Dan Bailey 79c14e27fb Add OPENVDB_USE_DELAYED_LOAD macro and CMake build flag
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-10-04 23:04:02 -07:00
Ken 6c7c7aa5b4 simplified setOrigin
Signed-off-by: Ken <ken.museth@gmail.com>
2022-10-04 16:47:53 -07:00
Ken d930bd6a69 Merge branch 'master' into offset_RootNode 2022-10-04 15:53:36 -07:00
Ken Museth 14746cfb43 Merge pull request #1463 from kmuseth/nanovdb_improvements
major improvements to nanovdb
2022-10-04 14:00:21 -07:00
ghurstunither b844a66ef6 Update BuildSettings.m
Updates build settings for windows. User must specify the location of vcpkg with $vcpkgDir.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-04 13:58:11 -04:00
Ken a446afd573 improved documentation
Signed-off-by: Ken <ken.museth@gmail.com>
2022-10-04 10:05:06 -07:00
Nick Avramoussis 7ab77c939a Merge pull request #1481 from Idclip/win_fix
Fix for finding versioned TBB libraries as of TBB 2021.5 and Blosc external libs
2022-10-04 15:56:02 +01:00
Andre Pradhana de2fa40e0b Using equality condition when pruning float min and max value.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-04 07:21:17 -07:00
Nick Avramoussis 973a1d270c Added pendingchanges
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-10-04 12:54:34 +01:00
Lucas Baraya ac32a112b5 Reverted .../LeafBuffer.h change to avoid possible negative implacations
Signed-off-by: Lucas Baraya <lucasbarayarw@gmail.com>
2022-10-03 18:05:43 -04:00
Lucas Baraya 4189039a95 Fixed unnecessary null pointer check.
Signed-off-by: Lucas Baraya <lucasbarayarw@gmail.com>
2022-10-03 18:05:43 -04:00
Lucas Baraya eb2a830ddb Fixed unnecessary null pointer check.
Signed-off-by: Lucas Baraya <lucasbarayarw@gmail.com>
2022-10-03 18:05:43 -04:00
ghurstunither b0aedcf5c8 name clashes
Resolves some name clashes

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-03 15:21:06 -04:00
Andre Pradhana 15ffc61dc7 Use equality instead of difference in absolute value.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-10-03 11:05:32 -07:00
ghurstunither e99dafd0d1 Removes using namespace std;
Removes using namespace std;

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-10-03 09:03:55 -04:00
Sebastian Gaida a510c00fab Merge branch 'master' into angle-brackets 2022-10-02 18:37:23 +02:00
Andre Pradhana 8ee8bf8436 Prune SDF value if there is a float max or float min.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-09-30 14:48:18 -07:00
Nick Avramoussis 43f7fc6640 Updated FindBlosc to handle any style of library suffix for its external dependencies
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-09-30 09:15:31 +01:00
Nick Avramoussis 0a9e217758 Fix for finding versioned TBB libraries as of TBB 2021.5
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-09-29 18:48:51 +01:00
jmlait 385516321b Merge pull request #1478 from sideeffects/send_upstream_tscnotes20220927
TSC notes for September 27th.
2022-09-27 20:13:25 -04:00
jmlait 9f87cfb9c5 Merge pull request #1381 from sideeffects/sendupstream_discuss_prune_degenerate
Add a feature flag to the raw CsgDifferenceOp to immediately prune degenerate tiles.
2022-09-27 15:30:38 -04:00
jmlait 43fe97421c Merge pull request #1432 from sideeffects/send_upstream_convexactivate
Code to do convex-hull based activation.
2022-09-27 15:28:55 -04:00
jlait 3d0031d1a4 TSC notes for September 27th.
Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-09-27 15:28:00 -04:00
jlait a143f346fd Use addTile and assignment rather than fill.
Break up the R"() string to avoid # starting a line as that breaks
distributed compiler setups.

Avoid shadowing child.

Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-09-27 11:34:19 -04:00
Ken 6adc1ca9a3 snapshot
Signed-off-by: Ken <ken.museth@gmail.com>
2022-09-25 18:36:45 -07:00
Ken 3d55057f9b snapshot
Signed-off-by: Ken <ken.museth@gmail.com>
2022-09-25 18:31:22 -07:00
Ken eb87dfdfa6 Initial commit of RootNode offset
Signed-off-by: Ken <ken.museth@gmail.com>
2022-09-25 18:26:14 -07:00
Ken d969e47afd fixed two minor typos
Signed-off-by: Ken <ken.museth@gmail.com>
2022-09-21 11:17:53 -07:00
jmlait b2d8e02de8 Merge pull request #1382 from sideeffects/sendupstream_package_placeholder
Add a placeholder in version.h for the URL and revision to be stored
2022-09-20 15:47:45 -04:00
ghurstunither efd3bcc533 autogen trailing spaces
squash autogenerated trailing spaces

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-20 15:47:43 -04:00
jlait 2851b620dc Remove trailing spaces
Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-09-20 15:41:59 -04:00
jmlait 5fb5c3191c Merge pull request #1465 from sideeffects/msvc_conformance
Add MSVC compiler options to improve C++ conformance
2022-09-20 15:38:34 -04:00
ghurstunither cd9a44ca99 trailing tabs
Change few cases of line\t\n to line\n

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-20 15:35:48 -04:00
ghurstunither def58c1a28 tabs -> spaces
tabs -> spaces in the auto generated OpenVDBLink.cpp

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-20 15:28:51 -04:00
ghurstunither 196c0c9c03 trailing spaces 2.0
Removes trailing spaces introduced by tabs -> space

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-20 15:21:40 -04:00
ghurstunither fe6fbbf532 tabs -> spaces
tabs -> spaces in m files.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-20 15:17:55 -04:00
ghurstunither 0b603b223a trailing spaces
Removes trailing spaces in all "m", "h", "cc", "cpp", "inl" files.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-20 15:09:56 -04:00
Dan Bailey bb2d25ceab tsc_notes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-09-19 22:17:02 -07:00
Ken 21f5ff48ce initial commit of entire vdb_tool
Signed-off-by: Ken <ken.museth@gmail.com>
2022-09-19 18:49:58 -07:00
Ken e5ecac025c fixed bug in nanovdb//util/IndexGridBuilder.h
Signed-off-by: Ken <ken.museth@gmail.com>
2022-09-19 17:20:05 -07:00
ghurstunither f06c8c0b0e Merge branch 'master' into feature/openvdb_wolfram
Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-19 13:26:32 -04:00
ghurstunither 33170aa447 Update whitespace.yml
Exclude wlt files from whitespace workflow since they're autogenerated.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-19 13:24:30 -04:00
ghurstunither d02d094185 Update OpenVDBLink.m
Fixes typo.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-13 14:50:12 -04:00
ghurstunither f922f2f5a2 Load only if V11 or higher
Fail to load if Mathematica is not V11 (2016) or higher.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-13 14:33:01 -04:00
ghurstunither b459179d0d CheckArguments -> CheckArgs
Custom version of CheckArguments to push backward compatibility to Mathematica V11 (2016).

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-13 14:27:21 -04:00
ghurstunither 26521f6eb5 File migration
Easier loading through:

* Changes parent directory from openvdb_wolfram/openvdb_wolfram to openvdb_wolfram/OpenVDBLink
* Drops LTemplate into folder

Loading in mma is now

$ContextPath = DeleteDuplicates@Join[$ContextPath, {"OpenVDBLink`"}];
$Path = DeleteDuplicates@Join[$Path, FileNameJoin[{"path", "to", "openvdb", "openvdb_wolfram"}]];
<< OpenVDBLink`

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-13 14:16:34 -04:00
ghurstunither 871785cf24 correct bounds to clip
Pass the transpose of the bounding box to openvdb::tools::clip.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-13 14:16:34 -04:00
ghurstunither 2e9a8053f3 Protected
Protects symbols so that the loader can be run multiple times.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-13 14:16:34 -04:00
ghurstunither fb6530792b Unit tests
Reruns unit tests to account for error messages now being thrown.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-13 14:16:34 -04:00
ghurstunither f67cd57fd7 Update LevelSet.m
Adds explicit support for SphericalShell.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-13 14:16:34 -04:00
ghurstunither 4749230f01 Update LevelSet.m
Make sure nested grid combinations have the same type.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-13 14:16:34 -04:00
ghurstunither ca56845ba5 Update Grids.m
fixes a few typos.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-13 14:16:34 -04:00
ghurstunither fb12cfe451 Update IO.m
Fail gracefully if we can't determine the vdb type.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-13 14:16:34 -04:00
ghurstunither 733cf22bdb WLTToNotebook
Handles 2-arg VerificationTest that is mistaken for 1-arg. If second argument is {}, CheckArguments will see it as an option, not an argument.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-13 14:16:34 -04:00
ghurstunither d5e9ff9945 setReadProtected
Assigns Protected and ReadProtected Attributes to all top level symbols.

Adds missing 0-arg error handling.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-13 14:16:34 -04:00
ghurstunither 64a072d066 more messages
Adds messages for the remaining areas: CSG, grids, and render functionality.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-13 14:16:34 -04:00
ghurstunither c5f231eb09 more messages
Adds messages for mesh, morphology, setters, transform, and values functionality.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-13 14:16:34 -04:00
ghurstunither 451bbf53f5 more messages
Adds messages for IO, LevelSet and Measure functionality.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-13 14:16:34 -04:00
ghurstunither ffc9823167 more messages
Messages for FogVolume, Getters, and Image functionality.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-13 14:16:34 -04:00
ghurstunither 44359992f2 Filter messages
Messages for OpenVDBFilter.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-13 14:16:34 -04:00
ghurstunither 8fa1102a52 Update Messages.m
PackageExport -> PackageScope

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-13 14:16:34 -04:00
ghurstunither 7e7c40cd58 AggregateData messages
Adds messages for OpenVDBActiveVoxelSliceTotals, OpenVDBSlice, OpenVDBData, OpenVDBActiveTiles, OpenVDBActiveVoxels

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-13 14:16:34 -04:00
ghurstunither f65f294d96 move CheckArguments
Moves CheckArguments calls to the beginning of each definition. This prevents unknown options from propagating into internal definitions.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-13 14:16:34 -04:00
ghurstunither 00d9539df9 first take on messages
First pass at throwing messages when users supply incorrect data/syntax.

The idea is to have Messages.m for common messages, and function specific messages defined near the function implementation.

First pass only involves OpenVDBMember, OpenVDBNearest, OpenVDBDistance, OpenVDBSignedDistance, OpenVDBFillWithBalls.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-13 14:16:34 -04:00
ghurstunither 5373345e58 WLTToNotebook
Adds WLTToNotebook in the develooper context. This will allow for editing unit tests in a notebook environment, but saving them in wlt form.

e.g. OpenVDBLink`Developer`WLTToNotebook["Mesh"]

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-13 14:16:34 -04:00
ghurstunither 09c1decbc2 Remove test notebooks
Removes test notebooks in favor of lightweight and programmatic wlt files.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-13 14:16:34 -04:00
ghurstunither 2681f63264 initial commit of OpenVDBLink
Initial commit of OpenVDBLink -- a low level link between Mathematica and OpenVDB.
Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2022-09-13 14:16:34 -04:00
Ken 4b6b9c6929 various fixes and API improvements
Signed-off-by: Ken <ken.museth@gmail.com>
2022-09-13 09:34:32 -07:00
Ken 563428e75e updated pendingchanges/nanovdb.txt
Signed-off-by: Ken <ken.museth@gmail.com>
2022-09-06 18:52:50 -07:00
Ken 2e0158f8a8 forgotseveral filed in the previous commit
Signed-off-by: Ken <ken.museth@gmail.com>
2022-09-06 18:19:02 -07:00
Ken c16fbb2ab8 improved iterators and fixed OSX build issue
Signed-off-by: Ken <ken.museth@gmail.com>
2022-09-06 17:36:16 -07:00
Edward Lam 85665b954f Merge remote-tracking branch 'origin/msvc_conformance' into msvc_conformance 2022-09-05 09:54:41 -04:00
Edward Lam 7e74c7f60e Blind attempt at fixing CUDA Windows build to avoid passing /permissive-
Signed-off-by: Edward Lam <e4lam@yahoo.com>
2022-09-04 20:02:57 -04:00
Edward Lam 0d7ad5287f Add MSVC compiler options to improve C++ conformance
Signed-off-by: Edward Lam <e4lam@yahoo.com>
2022-09-04 20:00:45 -04:00
jmlait ed9e609ce1 Merge pull request #1462 from sideeffects/msvc_pi
Sweep out use of M_PI* constants
2022-09-04 17:58:06 -04:00
jmlait eb95e2d7fe Merge pull request #1460 from sideeffects/msvc_morphology
Fix VS2019/VS2022 compiler error in Morphology.h
2022-09-04 17:55:14 -04:00
jmlait a2e5b01c0a Merge pull request #1461 from sideeffects/msvc_tree
Remove obsolete #ifndef _WIN32 code paths.
2022-09-04 17:54:33 -04:00
jmlait f86372779c Merge pull request #1453 from sideeffects/send_upstream_tsc20220816
Meeting notes for August 16th.
2022-09-04 17:53:52 -04:00
Ken 2cd880f791 added pendingchanges
Signed-off-by: Ken <ken.museth@gmail.com>
2022-08-31 10:21:54 -07:00
Ken c937d85342 removed tab from PNanoVDB.h
Signed-off-by: Ken <ken.museth@gmail.com>
2022-08-31 10:14:40 -07:00
Ken 8d9af0b366 removed tabs
Signed-off-by: Ken <ken.museth@gmail.com>
2022-08-31 09:50:18 -07:00
Edward Lam bc4963ccdd Add MSVC compiler options to improve C++ conformance
Signed-off-by: Edward Lam <e4lam@yahoo.com>
2022-08-31 08:28:39 -04:00
Edward Lam e6bf6e1559 Remove more obsolete #ifndef _WIN32 conditionals.
Although the changes in this commit don't present any problems for
VS2022, they are also not needed anymore on VS2019.

Signed-off-by: Edward Lam <e4lam@yahoo.com>
2022-08-31 00:57:27 -04:00
Ken 8acc42a67c major improvements to nanovdb
Signed-off-by: Ken <ken.museth@gmail.com>
2022-08-30 20:50:43 -07:00
Edward Lam 016f4eb4c9 Add release note for _USE_MATH_DEFINES change
Signed-off-by: Edward Lam <e4lam@yahoo.com>
2022-08-30 16:27:10 -04:00
Edward Lam ac61832d4c Sweep out use of M_PI* constants
Replace M_PI* constants with openvdb::math::pi<T>(). This allows us to
remove the reliance on having the _USE_MATH_DEFINES macro being defined
prior to any inclusion of cmath/math.h on Windows. This was easily
broken by bad include orders inside openvdb or by users of openvdb.

Signed-off-by: Edward Lam <e4lam@yahoo.com>
2022-08-30 15:23:08 -04:00
Edward Lam b18532107a Remove obsolete #ifndef _WIN32 code paths.
This is no longer needed in VS2019, and out right errors with
/permissive- enabled.

Signed-off-by: Edward Lam <e4lam@yahoo.com>
2022-08-29 16:29:15 -04:00
Edward Lam 5624fdb1c1 Fix VS2019/VS2022 compiler error in Morphology.h
For some unknown reason MSVC /permissive- has problems with correctly
inferring the LeafT here due to it being used with different types in
the same function. Changing it from LeafT to auto instead allows it
to compile.

Signed-off-by: Edward Lam <e4lam@yahoo.com>
2022-08-29 14:47:09 -04:00
Dan Bailey 421cfcd4cc Merge pull request #1440 from danrbailey/merge_sum_fix
Fix issues in merge tool when using sum mode
2022-08-29 08:48:16 -07:00
Nick Avramoussis 9d71b96169 Merge pull request #1445 from Idclip/feature/vdb10
Updates to prepare VDB 10
2022-08-24 20:41:54 +01:00
Nick Avramoussis db6717405a Merge branch 'master' into feature/vdb10 2022-08-23 21:48:05 +01:00
Nick Avramoussis fb09b35366 Merge pull request #1388 from Idclip/llvm_deprecations
Fixed llvm deprecation warnings in AX
2022-08-23 21:39:04 +01:00
Nick Avramoussis 567c8b61b3 updated pendingchanges
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-08-23 19:37:55 +01:00
Nick Avramoussis 1dca3a1e94 Added support for LLVM14
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-08-23 19:28:48 +01:00
Nick Avramoussis 140bdd791e Fixed llvm deprecation warnings in AX
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-08-23 19:28:48 +01:00
Dan Bailey c3ee06e581 Merge pull request #1439 from danrbailey/visualize_slice_clamp
Fix clamp bug in VDB Visualize SOP
2022-08-23 10:39:08 -07:00
Nick Avramoussis edc19e2d06 Merge pull request #1448 from Idclip/feature/build_fixes
Various build fixes
2022-08-23 17:37:43 +01:00
Nick Avramoussis d6cb353986 Temporarily disable Houdini builds
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-08-21 19:10:24 +01:00
Nick Avramoussis 0bf7b334da Fixed an issue in the nanovdb CI
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-08-21 19:09:04 +01:00
jlait a8bfcf09a9 Meeting notes for August 16th.
Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-08-18 13:29:15 -04:00
Nick Avramoussis e4f26a83a0 Minor pyopenvdb ax test fix
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-08-18 15:45:21 +01:00
Nick Avramoussis 56d726bff3 Temporarily install blosc 1.17.0 during linux builds
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-08-18 12:27:00 +01:00
Nick Avramoussis c9b5550c0e Adding pending changes
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-08-17 10:47:27 +01:00
Nick Avramoussis b5a657857c Fixed an issue where setting Tbb_INCLUDE_DIR could cause CMake to fail
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-08-17 10:47:25 +01:00
Nick Avramoussis 4311f96884 Documentation fixes
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-08-17 10:47:22 +01:00
Nick Avramoussis 4ca27fb046 - Fixed an issue where OPENVDB_AX_DLL was not being set for shared library builds.
- Fixed some missing export/import specifiers
  - Added /MD and ax.dll windows CI.
  - Added python tests for ax hooks

Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-08-17 10:47:14 +01:00
Andre Pradhana 67810849e6 Add TSC Meeting Notes on 2022-07-26.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2022-08-16 23:31:21 -07:00
Nick Avramoussis cff3eba525 Various minor build fixes
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-08-10 10:41:53 +01:00
Nick Avramoussis 358c6215d1 Various minor build fixes
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-08-08 10:56:52 +01:00
Nick Avramoussis ed250f0134 CI updates for VDB 10
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-08-08 10:56:52 +01:00
Nick Avramoussis 7255e5fdb2 Removed unsupported ABI codepaths
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-08-08 10:56:52 +01:00
Nick Avramoussis bfe4452b23 CMake and documentation updates for VDB 10
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-08-08 10:32:21 +01:00
Nick Avramoussis 75f8976cdc CI improvements - cancel redundant jobs and don't check formatting in pendingchanges
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-08-08 10:30:31 +01:00
Nick Avramoussis 33813dbef8 Merge pull request #1429 from Idclip/feature/axcli
Improved AX CLI
2022-08-03 20:58:46 +01:00
Nick Avramoussis a9496081b7 Added pendingchanges
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-08-03 19:14:06 +01:00
Nick Avramoussis 21bce3a647 Merge branch 'master' into feature/axcli 2022-08-03 10:19:19 +01:00
Nick Avramoussis 95dc1bc056 Added note to cli.h about intended usage
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-08-03 10:18:35 +01:00
Nick Avramoussis 87b0afa462 Merge pull request #1442 from Idclip/ci_fixes
Added CI for NumPy and fixed UBSAN test
2022-07-26 22:09:07 +01:00
Nick Avramoussis b48ebbd5d3 Merge pull request #1441 from AcademySoftwareFoundation/code_coverage
Added code coverage with website deployment
2022-07-26 22:08:40 +01:00
Nick Avramoussis 3714ac6b91 Added ubsan suppression macro
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-07-25 21:53:00 +01:00
Nick Avramoussis c3b8789155 Bump CI image for sanitizer tests and add a CI test for using numpy
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-07-25 15:40:56 +01:00
Nick Avramoussis 1d91061887 Added code coverage jobs. Update documentation publish to publish to OpenVDB website.
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-07-25 11:36:48 +01:00
Dan Bailey 6b0f629644 Merge pull request #1438 from danrbailey/tsc_12_07_22
TSC Meeting Notes 12th July
2022-07-21 18:17:39 -07:00
Nick Avramoussis b86a8af0ba Merge pull request #1430 from Idclip/v2m_compile_fix
Python module VolumeToMesh compile fix
2022-07-18 10:41:46 +01:00
Nick Avramoussis a9d8231225 Merge pull request #1420 from Idclip/cmake_ccache_path
Minor fix to ccache path used when ccache is found
2022-07-18 00:11:09 +01:00
Dan Bailey 3783bab33b Add pending changes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-07-17 12:33:19 -07:00
Dan Bailey 59b4bc9cf1 Fix bug in VDB Visualize SOP where input value is not clamped before evaluating the UT_Ramp
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-07-17 12:32:36 -07:00
Dan Bailey 66a8f4e021 Small refactoring to tidy up prune masks, introduce new stealOrDeepCopyNode() method that allows for providing a custom value type on stealing the node and allow dispatch classes to be used with non-const nodes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-07-17 11:48:52 -07:00
Dan Bailey 1e21fea4e4 Fix various issues related to using non-zero background values and extend unit tests
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-07-17 11:48:24 -07:00
Dan Bailey 58518d0b3d Fix issues related to deep-copying of nodes during merging using the tracking mask with SumMergeOp.
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-07-17 11:33:09 -07:00
Dan Bailey 36f10c6275 Update release notes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-07-16 15:43:10 -07:00
Dan Bailey 80c8cc4865 Meeting notes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-07-16 15:42:57 -07:00
Nick Avramoussis 80441ca0da Merge pull request #1436 from Idclip/tsc_notes
Meeting notes
2022-07-06 09:47:03 +01:00
Nick Avramoussis 0687da8089 Merge pull request #1415 from Idclip/abi-checker-fix
abi compliance checker fix
2022-07-05 15:30:03 +01:00
Nick Avramoussis 725e96729a adding meeting notes
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-07-05 15:15:04 +01:00
Nick Avramoussis eab44ffd98 Merge pull request #1425 from Idclip/win_ci_disable
Disabled windows static debug CI build
2022-07-05 15:03:41 +01:00
jlait a36d215b18 Fix tabs and trailing spaces.
Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-06-29 17:35:40 -04:00
jmlait 3ab85f8c4c Merge pull request #1431 from sideeffects/send_upstream_renameclipmenu
Rename label of menu item for clipping by geometry
2022-06-29 15:19:03 -04:00
jlait 4f9bf8ae9e Code to do convex-hull based activation.
Unfortunately this requires GU_ConvexHull3D changes from future
houdini, so has version guards to restrict use.

Code for faster sdf-activation using dynamic node manager.

Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-06-29 15:17:08 -04:00
jlait 3d63ad0d40 Rename label of menu item for clipping by geometry to make it clear it
is a bounding box clip, not a geometry clip.

Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-06-29 14:41:58 -04:00
Nick Avramoussis 857bd0a6ce Added pending changes for some previous commits
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-06-29 11:28:30 +01:00
Nick Avramoussis 6225f87c83 Fixed a compile bug where the python module would try to instantiate volumeToMesh with non-scalar grid types
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-06-29 11:28:12 +01:00
Nick Avramoussis 36beba4f75 Minor fix to incorrect test
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-06-29 10:37:18 +01:00
Nick Avramoussis a24b100944 Fixed some more compiler errors
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-06-28 22:59:44 +01:00
Nick Avramoussis 9f7efa2e04 Fixed some compiler warnings
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-06-25 17:46:07 +01:00
Nick Avramoussis c558446777 Fixed some strict cxx errors and asserts
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-06-24 21:18:21 +01:00
Nick Avramoussis dc7c7bfbc8 Removed tab delim from cli output
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-06-24 21:18:21 +01:00
Nick Avramoussis 0d08785511 Introduced CLI interface for AX executables and promoted them to the vdb_ax binary
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-06-24 21:18:21 +01:00
Nick Avramoussis 3d4a1bb7d1 PR feedback - minor changes
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-06-22 21:32:16 +01:00
Nick Avramoussis d10f1cc840 Merge pull request #1421 from Idclip/feature/v2m_initial_improvements
Initial round of improvements to volumeToMesh
2022-06-22 20:07:16 +01:00
Nick Avramoussis de837e37da Merge pull request #1400 from Idclip/topology_sdf_fix
TopologyToLevelSet active tile fix
2022-06-22 19:33:51 +01:00
Nick Avramoussis f4883becdb Merge branch 'master' into feature/v2m_initial_improvements 2022-06-21 22:51:19 +01:00
Nick Avramoussis 5c19c8af31 PR feedback - spelling and minor changes
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-06-21 22:50:47 +01:00
Nick Avramoussis eff2a07541 Disabled windows static debug CI build
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-06-21 20:57:00 +01:00
Nick Avramoussis a9cddb4185 Merge pull request #1422 from Idclip/math_improvements
Minor improvements to some methods in Math.h
2022-06-21 20:54:18 +01:00
jmlait 51097943dd Merge pull request #1417 from sideeffects/send_upstream_tsc20220614
TSC Meeting notes June 14th.
2022-06-21 12:47:00 -04:00
jlait ee710832d3 Fix typo.
Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-06-21 12:46:42 -04:00
Nick Avramoussis 9dd2c7bde9 Removed redundant RULE_LINK step for ccache
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-06-19 14:49:52 +01:00
Nick Avramoussis 39a65f86a2 Minor fix to ensure correct tuple [] operator is selected for non-integer types
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-06-19 14:47:04 +01:00
Nick Avramoussis c273857058 Added integral templated [] operator to tuple
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-06-18 21:21:40 +01:00
Nick Avramoussis 2ad5903bfa Minor fix to ccache path used when ccache is found
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-06-18 17:43:14 +01:00
Nick Avramoussis 2b7fcd01f2 Minor improvements to some methods in Math.h
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-06-15 20:55:31 +01:00
jlait 4eb0a42b1d TSC Meeting notes June 14th.
Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-06-14 21:35:30 -04:00
Nick Avramoussis 1364816e74 Merge pull request #1414 from sideeffects/pr_msvc_math
Sweep out use of labs() from openvdb/Math.h
2022-06-14 14:02:53 +01:00
Nick Avramoussis c66bb9784b Merge pull request #1410 from richhones/version_bump
Bump version, update maintainers and update release documentation
2022-06-14 14:02:18 +01:00
Edward Lam 11bdbc72d6 Consistently use std::abs()/Abs() instead of the global namespaced abs()
Signed-off-by: Edward Lam <edward@sidefx.com>
2022-06-13 11:08:46 -04:00
Nick Avramoussis 678b4ff71f abi compliance checker fix
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-06-13 12:25:32 +01:00
Edward Lam 8a78ce5fdd Sweep out use of labs() from openvdb/Math.h
On Windows, labs() uses long which is int32_t instead of int64_t so we
were silently casting down in math::isUlpsEqual(). Since C++11, there
have been proper overloads of std::abs() for both long and long long
provided by <cstdlib> so just use that instead.

Signed-off-by: Edward Lam <edward@sidefx.com>
2022-06-12 14:38:39 -04:00
Sebastian Gaida 978961ca2d remove double include
Signed-off-by: Sebastian Gaida <sebastian-gaida@gmx.de>
2022-06-12 10:51:48 +02:00
Sebastian Gaida 59c14b51c9 change quotes to angle brackets and short relative paths
Signed-off-by: Sebastian Gaida <sebastian-gaida@gmx.de>
2022-06-12 10:50:42 +02:00
jlait 1c307f4654 Add the prune degenerate flag to the SOP.
At the VDB level it is actively pruning tiles that cancel each other
out, thus the pruneCancel nomenclature.  But in the SOP world I went
with describing what the tiles end up being, which is degenerate.

Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-06-10 15:57:46 -04:00
jmlait 80b2b8548f Merge pull request #1411 from sideeffects/sendupstream_19.5gusync
Synchronize with future 19.5 version.
2022-06-10 15:54:27 -04:00
jlait c1bbda3ef7 Synchronize with future 19.5 version.
Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-06-10 13:54:53 -04:00
Rich Jones b27b43ff36 Bump version, update maintainers and update release documentation
Signed-off-by: Rich Jones <richhones@users.noreply.github.com>
2022-06-10 12:43:10 +01:00
Rich Jones 35b97ec1a2 Merge pull request #1408 from AcademySoftwareFoundation/v9.1.0_rc
Merge v9.1.0 changes
2022-06-10 12:24:49 +01:00
Rich Jones ab935574cd Merge pull request #1406 from richhones/v9.1.0_rc
Update release date for v9.1.0
2022-06-09 15:50:40 +01:00
Rich Jones 17f5c51eda Update release date
Signed-off-by: Rich Jones <richhones@users.noreply.github.com>
2022-06-09 15:12:55 +01:00
Rich Jones df42cb6dfa Merge branch 'master' into v9.1.0_rc 2022-06-07 11:22:20 +01:00
Dan Bailey a0b661be4d Merge pull request #1405 from danrbailey/fix_rasterize_atomic
Replace tbb::atomic with std::atomic to fix TBB 2021 issue in PointRasterizeFrustum
2022-06-06 14:09:12 -07:00
Nick Avramoussis 1617e621c8 Initial round of improvements to volumeToMesh
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-06-06 21:09:25 +01:00
Dan Bailey ecf3001483 Replace tbb::atomic with std::atomic
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-06-06 10:51:11 -07:00
Nick Avramoussis c9b1c2e59a Merge pull request #1403 from Idclip/abi_checker_improvements
Improved ABI check
2022-06-05 17:59:41 +01:00
Dan Bailey 02cf597ab3 Merge pull request #1404 from danrbailey/fix_rasterize_tbb
Migrate to thread::cancelGroupExecution
2022-06-04 20:38:27 -07:00
Dan Bailey 2970cd2c44 Migrate to thread::cancelGroupExecution
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-06-04 14:00:18 -07:00
Nick Avramoussis d096b5b6f8 Improved ABI check (skip internal namespace symbols but include everything else)
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-06-04 21:13:03 +01:00
Nick Avramoussis 49247c8b9c Added pending changes
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-06-04 16:01:49 +01:00
Nick Avramoussis 66a0a2abfc Fixed an issue with tools::topologyToLevelSet which wouldn't process active tiles
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-06-04 15:58:04 +01:00
Dan Bailey 0facd2097a Merge pull request #1399 from danrbailey/rasterize_disable_memchecks
Disable frustum rasterization memory tests if blosc or delayed loading not in use
2022-06-02 18:25:19 -07:00
Dan Bailey 8d86f3552e Disable frustum rasterization memory tests if blosc or delayed loading not in use
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-06-02 10:25:49 -07:00
Rich Jones dcebff6176 Changes to documentation for release of 9.1.0
Signed-off-by: Rich Jones <richhones@users.noreply.github.com>
2022-06-01 15:04:46 +01:00
Dan Bailey 763ead878a Merge pull request #1395 from danrbailey/tsc_2405
Meeting Notes 24th May
2022-05-31 11:59:12 -07:00
Dan Bailey 8a09fb4da5 Merge pull request #1313 from danrbailey/vdbrasterizeparticles
VDB Points Rasterize
2022-05-31 11:58:19 -07:00
apradhana fefef7f0f3 Merge pull request #1396 from apradhana/TSC_2022-05-17
Added TSC Meeting Notes from 5-17-2022.
2022-05-31 11:17:33 -07:00
Ken Museth 0e61fecc30 Merge pull request #1389 from kmuseth/nanovdb_update
minor changes that sync up NanoVDB, mostly related to warnings
2022-05-31 10:38:43 -07:00
Dan Bailey aa29006c0d Merge branch 'master' into vdbrasterizeparticles 2022-05-30 23:06:24 -07:00
Dan Bailey 028eb96922 Address feedback
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-05-30 23:05:43 -07:00
Andre Pradhana 7b84b20558 Minor fix.
Signed-off-by: Andre Pradhana <andre.pradhana@dreamworks.com>
2022-05-30 22:26:04 -07:00
Andre Pradhana cc16473f7a Add TSC Meeting Notes from 2022-05-17.
Signed-off-by: Andre Pradhana <andre.pradhana@dreamworks.com>
2022-05-30 22:22:38 -07:00
Dan Bailey bae8c546fd Move implementation into impl subdir
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-05-30 22:15:14 -07:00
Dan Bailey e2877d4112 Address feedback
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-05-30 22:06:06 -07:00
Dan Bailey 69df27d07a Update changes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-05-30 14:35:37 -07:00
Dan Bailey 787340f6b7 Meeting notes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-05-30 14:35:25 -07:00
Nick Avramoussis 9cc0e32f28 Merge pull request #1392 from Idclip/volume_mesh_doc
Improve adaptivity docs on volumeToMesh function
2022-05-29 20:13:31 +01:00
Dan Bailey 59f46eaa7c Merge branch 'master' into vdbrasterizeparticles 2022-05-28 17:39:00 -07:00
Nick Avramoussis 6a84e1bce1 Improve adaptivity docs on volumeToMesh function
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-05-25 11:16:34 +01:00
Nick Avramoussis 3ff9ba3a03 Fixed precision conversions and other warnings
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-05-25 11:15:09 +01:00
Nick Avramoussis f26b2a05af Added point replication tools
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-05-25 11:15:09 +01:00
Nick Avramoussis 57bd50e174 Merge pull request #1391 from Idclip/compress_pdbs
Build options to compress MSVC PDBs
2022-05-25 09:49:44 +01:00
Nick Avramoussis 41b9492f08 Added an option to compress PDB data in MSVC debug builds
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-05-24 22:15:06 +01:00
Nick Avramoussis 9b556e26b7 Cleanup vcpkg temporary files after install
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-05-24 22:14:57 +01:00
Ken 3ecfecfa3a minor changes that sync up NanoVDB, mostly related to warnings
Signed-off-by: Ken <ken.museth@gmail.com>
2022-05-23 18:54:48 -07:00
jmlait 92a9fd3143 Merge pull request #1383 from sideeffects/sendupstream_vdbactivate_continue
VDB Activate SOP for no good reason bailed out as soon as a non-vdb was found
2022-05-21 16:46:57 -04:00
Nick Avramoussis e02173e068 Merge pull request #1380 from Idclip/ax_windows_ci_fix
Various AX Improvements/Fixes
2022-05-21 13:06:40 +01:00
jlait 880267d37f VDB Activate SOP for no good reason bailed out as soon as a non-vdb
was found.  The correct thing is just to ignore these prims.

Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-05-19 15:19:12 -04:00
jlait 5cc4ec4764 Fix the case of the parameter to match coding convention.
Fix explicit instantiation.
Make pruneCancelledTiles only apply if prune is enabled, and document
that fact.

Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-05-19 11:29:38 -04:00
jlait 18d4aefeae Provide change notes for this.
Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-05-18 16:44:47 -04:00
jlait fbca1d511c Add accessors to get the package url/revision.
Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-05-18 16:43:26 -04:00
jlait b88cd1a3d5 Add a hook to inject the actual URL and commit hash that openvdb
was built with.

Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-05-18 16:43:10 -04:00
jlait f293062bad Add support for cancelled tiles to union & intersection. Expose
as optional parameter in Composite API.

Change to using a member flag rather than template parameter to
simplify dispatch and reduce template growth.  The run time tests are
amortized across a full leaf tile.

Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-05-18 15:20:14 -04:00
Dan Bailey 88b56c2ed6 Rename Rasterize Particles to Rasterize Frustum
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-05-16 22:34:53 -07:00
jlait 1b38c6cd07 Add a feature flag to the raw CsgDifferenceOp to immediately prune
any degenerate tiles - ie, the same tile subtracted from itself.  This
greatly reduces the generated ghost borders when similar objects are
differenced.

Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-05-16 15:49:44 -04:00
jmlait eb1cbadb54 Merge pull request #1378 from sideeffects/send_upstream_tscnotes20220512
Meeting notes for May 10th.
2022-05-16 10:01:13 -04:00
Nick Avramoussis cade202a48 Fixed an issue with recent cmd relocations which stopped AX cmd binary tests being run
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-05-15 21:52:15 +01:00
Nick Avramoussis a7e4a00b11 Fixed an issue where msvc interprets UL (unsigned long) as 32 bits and we require 64
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-05-15 21:49:54 +01:00
Nick Avramoussis 29f4a989e8 Minor fix to AX Windows CI
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-05-15 17:12:28 +01:00
Nick Avramoussis 3a38b68fd1 Merge pull request #1376 from Idclip/updates
Various Improvements
2022-05-13 20:02:41 +01:00
jlait 3507a2f50b Fix the table of contents to include this set of notes.
Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-05-13 14:37:55 -04:00
apradhana 3374a58b54 Merge pull request #1375 from apradhana/TSC_2022-04-26
Add TSC Meeting Notes April 26, 2022.
2022-05-12 23:47:28 -07:00
jlait cd578d34f9 Meeting notes for May 10th.
Consolidate pending changes.

Signed-off-by: jlait <jlait@andorra.sidefx.com>
2022-05-12 17:35:02 -04:00
Nick Avramoussis 3d3e0a21aa Added pending changes
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-05-04 23:02:37 +01:00
Andre Pradhana f3c15540d0 Add TSC Meeting Notes April 26, 2022.
Signed-off-by: Andre Pradhana <andre.pradhana@dreamworks.com>
2022-05-03 10:57:03 -07:00
Nick Avramoussis 2561c253d0 Merge pull request #1373 from Idclip/docs_to_website
Auto deploy doxygen to openvdb.org
2022-05-03 15:27:01 +01:00
Nick Avramoussis 67682736a4 Updated FindTBB to prioritise newer TBB versions and print a warning if multiple are found
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-04-30 01:08:21 +01:00
Nick Avramoussis fa4f8ecd43 Silence pragma messages from deprecated code
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-04-30 01:07:52 +01:00
Nick Avramoussis 2dd12bf502 Auto sign off doc update commits
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-04-29 13:58:56 +01:00
Nick Avramoussis 25acbfb49c Merge pull request #1346 from Idclip/ax_improvements
Various AX improvements
2022-04-29 10:53:25 +01:00
Nick Avramoussis 1542fe7ce1 Fixed various doxygen errors
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-04-29 00:01:25 +01:00
Nick Avramoussis 6e751e475e Updated documentation links back to openvdb.com
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-04-28 22:39:28 +01:00
Nick Avramoussis 9d56eec1ca Updated doxygen workflow to publish to the website repo
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-04-28 22:38:53 +01:00
Nick Avramoussis 3ef01fd74a Updating pendingchanges
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-04-28 17:10:59 +01:00
Nick Avramoussis 32fd2e217a Various AX improvements:
- Fixed a regression in ax::run which wouldn't propagate exceptions
 - Improved logger exit handling in the compiler
 - Improved the behaviour of ax::parse for invalid ASTs

Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2022-04-28 17:04:44 +01:00
Dan Bailey 6426c7e542 Fix minor issue where compiler is attempting to use an implicitly declared copy assignment operator
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-04-13 11:35:32 -07:00
Dan Bailey b8efd3fd9c Handle Clang float -> bool conversion warnings
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-04-12 20:35:42 -07:00
Dan Bailey b76c23f20c Remove templated interrupters and redundant function template inline keywords
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-04-12 18:17:14 -07:00
Dan Bailey 68dca6d0fb Add a simple work-around to resolve int-in-bool-context warnings for bool grids
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-04-12 18:17:14 -07:00
Dan Bailey e5e9bb149a Renaming pointRasterize.h to pointRasterizeFrustum.h
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-04-12 18:17:14 -07:00
Dan Bailey 6a20695c78 Merge branch 'master' into vdbrasterizeparticles 2022-04-12 15:42:21 -07:00
Dan Bailey 6afcc1cd87 Adding OpenVDB Points Rasterize API and OpenVDB Rasterize Particles SOP
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2022-02-22 00:36:44 -08:00
675 changed files with 124703 additions and 29712 deletions
+165
View File
@@ -0,0 +1,165 @@
name: AX
on:
push:
branches:
- 'master'
- 'feature/**'
- 'pr/**'
paths-ignore:
- 'CHANGES'
- 'CODEOWNERS'
- 'doc/**'
- 'nanovdb/**'
- 'openvdb_maya/**'
- 'openvdb_houdini/**'
- 'pendingchanges/**'
- '**.md'
pull_request:
branches:
- '**'
paths-ignore:
- 'CHANGES'
- 'CODEOWNERS'
- 'doc/**'
- 'nanovdb/**'
- 'openvdb_maya/**'
- 'openvdb_houdini/**'
- 'pendingchanges/**'
- '**.md'
schedule:
# run this workflow every day 7am UTC
- cron: '0 7 * * *'
workflow_dispatch:
inputs:
type:
description: 'The type of CI to run (all, mac, linux, grammar)'
required: true
default: 'all'
# Allow subsequent pushes to the same PR or REF to cancel any previous jobs.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
linux-ax:
if: |
github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'linux'
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
name: >
linux-ax:${{ matrix.config.image }}-cxx:${{ matrix.config.cxx }}-${{ matrix.config.build }}
container:
image: aswf/ci-openvdb:${{ matrix.config.image }}
env:
CXX: ${{ matrix.config.cxx }}
CCACHE_DIR: /tmp/ccache
strategy:
matrix:
# Only test unified builds (core+ax). weekly CI should test standalone
config:
- { image: '2023-clang15', cxx: 'clang++', build: 'Release', cmake: '' }
- { image: '2023-clang15', cxx: 'g++', build: 'Release', cmake: '' }
- { image: '2023-clang15', cxx: 'clang++', build: 'Debug', cmake: '' }
- { image: '2022-clang11', cxx: 'clang++', build: 'Release', cmake: '' }
- { image: '2022-clang11', cxx: 'g++', build: 'Release', cmake: '' }
- { image: '2021-clang10', cxx: 'clang++', build: 'Release', cmake: '-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON' }
- { image: '2021-clang10', cxx: 'g++', build: 'Release', cmake: '-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON' }
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: pybind11
#if: contains(matrix.config.image, '2023') == false
run: ./ci/install_pybind11.sh 2.10.0
- name: timestamp
id: timestamp
run: echo "timestamp=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
- name: ccache
# don't use ccache for debug builds
if: matrix.config.build == 'Release'
id: ccache
uses: actions/cache@v3
with:
path: /tmp/ccache
key: linux-ax${{ matrix.config.image }}-${{ matrix.config.cxx }}-${{ steps.timestamp.outputs.timestamp }}
restore-keys: linux-ax${{ matrix.config.image }}-${{ matrix.config.cxx }}-
- name: build
run: >
./ci/build.sh -v
--build-type=${{ matrix.config.build }}
--components='core,python,bin,axcore,axbin,axtest'
--cargs=\"
${{ matrix.config.cmake }}
-DOPENVDB_AX_TEST_CMD_DOWNLOADS=ON
-DUSE_EXPLICIT_INSTANTIATION=OFF
-DOPENVDB_CXX_STRICT=ON
\"
- name: test
run: cd build && ctest -V
- name: test_doxygen_examples
run: ./ci/extract_test_examples.sh
# Keep ccache light by stripping out any caches not accessed in the last day
- name: ccache_clean
if: matrix.config.build == 'Release'
run: ccache --evict-older-than 1d
macos-ax:
if: |
github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'mac'
runs-on: ${{ matrix.config.runner }}
name: macos-cxx:${{ matrix.config.cxx }}-llvm:${{ matrix.config.llvm }}-${{ matrix.config.build }}
env:
CXX: ${{ matrix.config.cxx }}
strategy:
matrix:
config:
#@note llvm10 never got its own brew formula...
- { runner: 'macos-latest', cxx: 'clang++', build: 'Release', llvm: '11' }
- { runner: 'macos-latest', cxx: 'clang++', build: 'Release', llvm: '12' }
- { runner: 'macos-latest', cxx: 'clang++', build: 'Release', llvm: '13' }
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: install_deps
run: ./ci/install_macos.sh ${{ matrix.config.llvm }}
- name: build
run: >
./ci/build.sh -v
--build-type=${{ matrix.config.build }}
--components="core,python,bin,axcore,axbin,axtest"
--cargs=\"
-DOPENVDB_AX_TEST_CMD_DOWNLOADS=ON
-DUSE_EXPLICIT_INSTANTIATION=OFF
-DLLVM_DIR=/usr/local/opt/llvm@${{ matrix.config.llvm }}/lib/cmake/llvm
\"
- name: test
run: cd build && ctest -V
- name: test_doxygen_examples
run: ./ci/extract_test_examples.sh
gen-grammar:
if: |
github.event_name == 'workflow_dispatch' &&
github.event.inputs.type == 'grammar'
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
container:
image: aswf/ci-openvdb:2022-clang11
steps:
- uses: actions/checkout@v3
- name: build
run: ./ci/build.sh -v --components=axgr --target=openvdb_ax_grammar --cargs=\"-DOPENVDB_AX_GRAMMAR_NO_LINES=ON\"
- name: upload grammar
uses: actions/upload-artifact@v2
with:
name: ax_grammar
path: ./build/openvdb_ax/openvdb_ax/openvdb_ax/grammar
retention-days: 5
+202
View File
@@ -0,0 +1,202 @@
name: Build
on:
push:
branches:
- 'master'
- 'feature/**'
- 'pr/**'
paths-ignore:
- 'CHANGES'
- 'CODEOWNERS'
- 'doc/**'
- 'openvdb_maya/**'
- 'openvdb_houdini/**'
- 'openvdb_ax/**'
- 'nanovdb/**'
- 'pendingchanges/**'
- '**.md'
pull_request:
branches:
- '**'
paths-ignore:
- 'CHANGES'
- 'CODEOWNERS'
- 'doc/**'
- 'openvdb_maya/**'
- 'openvdb_houdini/**'
- 'openvdb_ax/**'
- 'nanovdb/**'
- 'pendingchanges/**'
- '**.md'
schedule:
# run this workflow every day at 7am UTC except Monday
- cron: '0 7 * * 0,2-6'
# run this workflow Monday 7am UTC
# warning: This pattern is checked in various places below
- cron: '0 7 * * 1'
workflow_dispatch:
inputs:
type:
description: 'The type of CI to run (all, linux, win, mac)'
required: true
default: 'all'
# Allow subsequent pushes to the same PR or REF to cancel any previous jobs.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
linux-vfx:
# VFX platform jobs. These are run on the appropriate CentOS images from
# the provided ASWF docker containers
if: |
github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'linux'
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
name: >
linux-vfx:${{ matrix.config.image }}-
abi:${{ matrix.config.abi }}-
cxx:${{ matrix.config.cxx }}-
type:${{ matrix.config.build }}
container:
image: aswf/ci-openvdb:${{ matrix.config.image }}
env:
CXX: ${{ matrix.config.cxx }}
CCACHE_DIR: /tmp/ccache
strategy:
matrix:
config:
# @note we specifically use clang15.0 (not clang15) here as the newest
# versions of the clang15.X containers have some issues with the GLFW
# installation
- { cxx: clang++, image: '2023-clang15.0', abi: '11', build: 'Release', cmake: '' }
- { cxx: g++, image: '2023-clang15.0', abi: '11', build: 'Release', cmake: '' }
- { cxx: clang++, image: '2022-clang11', abi: '11', build: 'Debug', cmake: '' }
- { cxx: clang++, image: '2022-clang11', abi: '10', build: 'Release', cmake: '' }
- { cxx: g++, image: '2022-clang11', abi: '10', build: 'Release', cmake: '' }
- { cxx: clang++, image: '2022-clang11', abi: '9', build: 'Release', cmake: '-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON' }
- { cxx: g++, image: '2022-clang11', abi: '9', build: 'Release', cmake: '-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON' }
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: pybind11
#if: contains(matrix.config.image, '2023') == false
run: ./ci/install_pybind11.sh 2.10.0
- name: timestamp
id: timestamp
run: echo "timestamp=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
- name: ccache
# don't use ccache for debug builds
if: matrix.config.build == 'Release'
id: ccache
uses: actions/cache@v3
with:
path: /tmp/ccache
key: linux-vfx${{ matrix.config.image }}-abi${{ matrix.config.abi }}-${{ matrix.config.cxx }}-${{ steps.timestamp.outputs.timestamp }}
restore-keys: linux-vfx${{ matrix.config.image }}-abi${{ matrix.config.abi }}-${{ matrix.config.cxx }}-
- name: build
run: >
./ci/build.sh -v
--build-type=${{ matrix.config.build }}
--components=\"core,python,bin,view,render,test\"
--cargs=\"
${{ matrix.config.cmake }}
-DOPENVDB_CXX_STRICT=ON
-DOPENVDB_ABI_VERSION_NUMBER=${{ matrix.config.abi }}
\"
- name: test
# Always run tests on weekly builds but skip Debug on commits as they take a while.
# https://github.community/t/distinct-job-for-each-schedule/17811/2
if: contains(github.event.schedule, '0 7 * * 1') || matrix.config.build == 'Release'
run: |
cd build && ctest -V
cd - && ./ci/test_install.sh
# Keep ccache light by stripping out any caches not accessed in the last day
- name: ccache_clean
if: matrix.config.build == 'Release'
run: ccache --evict-older-than 1d
windows:
# Windows CI. Tests static and dynamic builds with MT and MD respectively.
if: |
github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'win'
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'windows-2022-8c-32g-300h') || 'windows-latest' }}
name: windows-vc:${{ matrix.config.vc }}-type:${{ matrix.config.build }}
env:
VCPKG_DEFAULT_TRIPLET: ${{ matrix.config.vc }}
strategy:
matrix:
config:
# static build of blosc from vcpkg does not build internal sources.
# USE_STATIC_DEPENDENCIES is required for IlmBase/OpenEXR defines and
# Boost as both shared and static libs are installed.
# USE_EXPLICIT_INSTANTIATION is disabled for debug static libraries
# due to disk space constraints
# @note Commented out the static debug build due to linker OOM LNK1102
- { vc: 'x64-windows-static', components: 'core,bin,view,render,test', build: 'Release', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_SHARED=OFF -DUSE_STATIC_DEPENDENCIES=ON -DBLOSC_USE_EXTERNAL_SOURCES=ON' }
#- { vc: 'x64-windows-static', components: 'core,bin,view,render,test', build: 'Debug', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_SHARED=OFF -DUSE_STATIC_DEPENDENCIES=ON -DBLOSC_USE_EXTERNAL_SOURCES=ON -DUSE_EXPLICIT_INSTANTIATION=OFF' }
- { vc: 'x64-windows', components: 'core,bin,view,render,python,test', build: 'Release', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_STATIC=OFF' }
- { vc: 'x64-windows', components: 'core,bin,view,render,python,test', build: 'Debug', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_STATIC=OFF' }
#- { vc: 'x64-windows', build: 'Release', cmake: '-G \"MinGW Makefiles\" -DOPENVDB_CORE_STATIC=OFF' }
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: path
shell: pwsh
run: |
# note: system path must be modified in a previous step to it's use
echo "$Env:VCPKG_INSTALLATION_ROOT\installed\${{ matrix.config.vc }}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "${{github.workspace}}\build\openvdb\openvdb\${{ matrix.config.build }}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: install
run: ./ci/install_windows.sh
- name: build
run: >
./ci/build.sh -v
--config=${{ matrix.config.build }}
--components=${{ matrix.config.components }}
--cargs=\'
${{ matrix.config.cmake }}
-DMSVC_COMPRESS_PDB=ON
-DUSE_EXR=ON
-DUSE_PNG=ON
-DVCPKG_TARGET_TRIPLET=${VCPKG_DEFAULT_TRIPLET}
-DCMAKE_TOOLCHAIN_FILE=\"${VCPKG_INSTALLATION_ROOT}\\scripts\\buildsystems\\vcpkg.cmake\"
\'
- name: size
# Print the build directy size (monitor if we're hitting runner limits)
run: du -h build
- name: test
# Always run tests on weekly builds but skip Debug on commits as they take a while.
# https://github.community/t/distinct-job-for-each-schedule/17811/2
if: contains(github.event.schedule, '0 7 * * 1') || matrix.config.build == 'Release'
run: cd build && ctest -V -C ${{ matrix.config.build }}
macos:
if: |
github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'mac'
runs-on: macos-latest
env:
CXX: clang++
steps:
- uses: actions/checkout@v3
- name: install
run: ./ci/install_macos.sh
- name: build
run: >
./ci/build.sh -v
--build-type=Release
--components=\"core,python,bin,view,render,test\"
- name: test
run: cd build && ctest -V
+86 -13
View File
@@ -23,9 +23,14 @@ on:
workflow_dispatch:
inputs:
deploy:
description: 'Deploy docs?'
description: 'Deploy to openvdb-website (docs/coverage)?'
required: true
default: 'false'
default: 'none'
# Allow subsequent pushes to the same PR or REF to cancel any previous jobs.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
doxygen:
@@ -33,17 +38,20 @@ jobs:
env:
CXX: g++
container:
image: aswf/ci-openvdb:2019
# @note We can't update this as epydoc doesn't support python3. We'll
# need to re-write the python docs to use sphinx
image: aswf/ci-openvdb:2022
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: install_doxygen
run: ./ci/install_doxygen.sh 1_8_11
- name: install_epydoc
run: pip install epydoc
- name: pybind11
#if: contains(matrix.config.image, '2023') == false
run: ./ci/install_pybind11.sh 2.10.0
# - name: install_epydoc
# run: pip install epydoc
- name: install_latex
run: yum -y install texlive-latex-bin texlive-dvips texlive-collection-fontsrecommended texlive-collection-latexrecommended
- name: install_cmake
run: ./ci/install_cmake.sh 3.15.0
- name: build
run: >
./ci/build.sh -v
@@ -56,11 +64,13 @@ jobs:
-DUSE_EXPLICIT_INSTANTIATION=OFF
-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON
\"
- name: epydoc
run: |
epydoc --html -o /usr/local/share/doc/OpenVDB/html/python pyopenvdb
# - name: epydoc
# run: |
# epydoc --html -o /usr/local/share/doc/OpenVDB/html/python pyopenvdb
- name: pre_deploy
# Overwrite global SSH configuration
# https://github.com/peaceiris/actions-gh-pages/issues/719
# https://linuxhint.com/ssh-stricthostkeychecking/
run: >
echo "Host *
StrictHostKeyChecking no
@@ -71,15 +81,78 @@ jobs:
if: |
github.repository_owner == 'AcademySoftwareFoundation' &&
github.event_name == 'workflow_dispatch' &&
github.event.inputs.deploy == 'true'
github.event.inputs.deploy == 'docs'
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: /usr/local/share/doc/OpenVDB/html
destination_dir: documentation/doxygen
external_repository: AcademySoftwareFoundation/openvdb-website
publish_branch: doxygen
publish_branch: master
full_commit_message: "Automatic doxygen documentation update
- Deployed from: AcademySoftwareFoundation/openvdb ${{ github.sha }}
Signed-off-by: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
#############################################################################
################################ Coverage ###################################
#############################################################################
linux-coverage:
if: |
github.repository_owner == 'AcademySoftwareFoundation' &&
github.event_name == 'workflow_dispatch' &&
github.event.inputs.deploy == 'coverage'
runs-on: ubuntu-latest
container:
image: aswf/ci-openvdb:2023
env:
CXX: g++
steps:
- uses: actions/checkout@v3
- name: install_gcovr
run: pip install gcovr
- name: build
run: >
./ci/build.sh -v
--build-type=coverage
--components="core,axcore,test,axtest"
--cargs=\"-DOPENVDB_CORE_STATIC=OFF -DOPENVDB_AX_STATIC=OFF\"
- name: test_and_gcov
run: |
cd build
ctest -V
make gcov_html
cd -
- name: zip_large_html
# The index.function list is > 100mb. Just zip it and provide it as a
# download (could instead use LFS to host but not really worth it).
run: |
cd build/gcov_html
tar -czvf index.functions.html.tar.gz index.functions.html
sed -i -e 's/index.functions.html/index.functions.html.tar.gz/g' index.html
sed -i -e 's/List of functions/Download function index/g' index.html
rm index.functions.html
cd -
- name: pre_deploy
# Overwrite global SSH configuration
# https://github.com/peaceiris/actions-gh-pages/issues/719
# https://linuxhint.com/ssh-stricthostkeychecking/
run: >
echo "Host *
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
" > /etc/ssh/ssh_config
- name: deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: ./build/gcov_html
destination_dir: documentation/code_coverage
external_repository: AcademySoftwareFoundation/openvdb-website
publish_branch: master
full_commit_message: "Automatic code coverage update
- Deployed from: AcademySoftwareFoundation/openvdb ${{ github.sha }}
Signed-off-by: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
+181
View File
@@ -0,0 +1,181 @@
name: Houdini
on:
push:
branches:
- 'master'
- 'feature/**'
- 'pr/**'
paths-ignore:
- 'CHANGES'
- 'CODEOWNERS'
- 'doc/**'
- 'nanovdb/**'
- 'openvdb_maya/**'
- 'pendingchanges/**'
- '**.md'
pull_request:
branches:
- '**'
paths-ignore:
- 'CHANGES'
- 'CODEOWNERS'
- 'doc/**'
- 'nanovdb/**'
- 'openvdb_maya/**'
- 'pendingchanges/**'
- '**.md'
schedule:
# run this workflow every day 7am UTC
- cron: '0 7 * * *'
workflow_dispatch:
# Allow subsequent pushes to the same PR or REF to cancel any previous jobs.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
checksecret:
# Check that valid github secrets have been set. This isn't needed to retrieve
# the cache, but ensures that the job doens't start with an empty cache
name: Verify Houdini Secrets
runs-on: ubuntu-latest
outputs:
HOUDINI_SECRETS: ${{ steps.check.outputs.HOUDINI_SECRETS }}
steps:
- id: check
env:
HOUDINI_CLIENT_ID: ${{ secrets.HOUDINI_CLIENT_ID }}
HOUDINI_SECRET_KEY: ${{ secrets.HOUDINI_SECRET_KEY }}
run: echo "HOUDINI_SECRETS=${{ env.HOUDINI_CLIENT_ID != '' && env.HOUDINI_SECRET_KEY != '' }}" >> $GITHUB_OUTPUT
- name: Skip Next Jobs
if: steps.check.outputs.HOUDINI_SECRETS != 'true'
run: echo "HOUDINI_CLIENT_ID and HOUDINI_SECRET_KEY GitHub Action Secrets needs to be set to install Houdini builds"
linux-vfx-houdini:
needs: [checksecret]
if: >
${{ needs.checksecret.outputs.HOUDINI_SECRETS == 'true' ||
github.repository_owner == 'AcademySoftwareFoundation' }}
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
name: hou:${{ matrix.config.hou_hash }}-vfx:${{ matrix.config.image }}-cxx:${{ matrix.config.cxx }}
container:
image: aswf/ci-base:${{ matrix.config.image }}
env:
CXX: ${{ matrix.config.cxx }}
CCACHE_DIR: /tmp/ccache
strategy:
matrix:
config:
- { cxx: clang++, image: '2023.0', hou_hash: '20_0-newabi', build: 'Release', components: 'core,hou,bin,view,render,python,test,axcore,axbin,axtest' }
- { cxx: clang++, image: '2022', hou_hash: '20_0-oldabi', build: 'Release', components: 'core,hou' }
- { cxx: clang++, image: '2021', hou_hash: '19_5', build: 'Release', components: 'core,hou' }
- { cxx: clang++, image: '2023.0', hou_hash: '20_0-newabi', build: 'Debug', components: 'core,hou,bin,view,render,python,test,axcore,axbin,axtest' }
- { cxx: g++, image: '2023.0', hou_hash: '20_0-newabi', build: 'Release', components: 'core,hou,bin,view,render,python,test,axcore,axbin,axtest' }
- { cxx: g++, image: '2022', hou_hash: '20_0-oldabi', build: 'Release', components: 'core,hou' }
fail-fast: false
steps:
# See note on this step in the Houdini weekly.yml job
# We can remove this when we no longer use < 2023 images
- name: remove zstd
run: yum -y remove zstd
- uses: actions/checkout@v3
- name: pybind11
#if: contains(matrix.config.image, '2023') == false
run: ./ci/install_pybind11.sh 2.10.0
- name: timestamp
id: timestamp
run: echo "timestamp=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
- name: ccache
# don't use ccache for debug builds
if: matrix.config.build == 'Release'
id: ccache
uses: actions/cache@v3
with:
path: /tmp/ccache
key: linux-vfx-hou${{ matrix.config.hou_hash }}-${{ matrix.config.image }}-${{ matrix.config.cxx }}-${{ steps.timestamp.outputs.timestamp }}
restore-keys: linux-vfx-hou${{ matrix.config.hou_hash }}-${{ matrix.config.image }}-${{ matrix.config.cxx }}-
- name: fetch_houdini
uses: actions/cache/restore@v3
with:
path: hou
key: dummy-houdini${{ matrix.config.hou_hash }}-${{ steps.timestamp.outputs.timestamp }}
restore-keys: vdb-v5-houdini${{ matrix.config.hou_hash }}-
- name: validate_houdini
run: test -f "hou/hou.tar.gz"
# Make sure that the unpacked install is NOT in the root of the OpenVDB checkout
# otherwise CMake's install RPATHs wil not work correctly.
- name: install_houdini
run: |
mkdir $HOME/houdini_install
cp hou/hou.tar.gz $HOME/houdini_install/hou.tar.gz
cd $HOME/houdini_install && tar -xzf hou.tar.gz && cd -
- name: build
run: |
./ci/build.sh -v \
--build-type=Release \
--components="${{ matrix.config.components }}" \
--cargs=\" \
-DHOUDINI_ROOT=$HOME/houdini_install/hou \
-DOPENVDB_BUILD_HOUDINI_ABITESTS=OFF \
-DOPENVDB_HOUDINI_INSTALL_PREFIX=/tmp \
-DDISABLE_CMAKE_SEARCH_PATHS=ON \
-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON \
\"
- name: test
run: cd build && ctest -V
# Keep ccache light by stripping out any caches not accessed in the last day
- name: ccache_clean
if: matrix.config.build == 'Release'
run: ccache --evict-older-than 1d
macos-houdini:
needs: [checksecret]
if: >
${{ needs.checksecret.outputs.HOUDINI_SECRETS == 'true' ||
github.repository_owner == 'AcademySoftwareFoundation' }}
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: fetch_houdini
uses: actions/cache/restore@v3
with:
path: hou
key: dummy-houdini
restore-keys: vdb-v5-houdini-macos-
- name: validate_houdini
run: test -f "hou/hou.tar.gz"
# Make sure that the unpacked install is NOT in the root of the OpenVDB checkout
# otherwise CMake's install RPATHs wil not work correctly.
- name: install_houdini
run: |
mkdir $HOME/houdini_install
cp hou/hou.tar.gz $HOME/houdini_install/hou.tar.gz
cd $HOME/houdini_install && tar -xzf hou.tar.gz && cd -
- name: install_deps
run: |
brew update
brew install bash gnu-getopt cmake boost glfw googletest openexr pybind11 llvm@15 cppunit
echo "/usr/local/opt/gnu-getopt/bin" >> $GITHUB_PATH
- name: build
run: |
./ci/build.sh -v \
--build-type=Release \
--components="core,hou,bin,view,render,python,test,axcore,axbin,axtest" \
--cargs=\" \
-DHOUDINI_ROOT=$HOME/houdini_install/hou \
-DOPENVDB_BUILD_HOUDINI_ABITESTS=OFF \
-DOPENVDB_HOUDINI_INSTALL_PREFIX=/tmp \
-DDISABLE_CMAKE_SEARCH_PATHS=ON \
-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON \
-DUSE_EXPLICIT_INSTANTIATION=OFF \
-DLLVM_DIR=/usr/local/opt/llvm@15/lib/cmake/llvm \
\"
- name: test
run: cd build && ctest -V
+193
View File
@@ -0,0 +1,193 @@
name: NanoVDB
on:
push:
branches:
- 'master'
- 'feature/**'
- 'pr/**'
paths-ignore:
- 'CHANGES'
- 'CODEOWNERS'
- 'doc/**'
- 'openvdb_ax/**'
- 'openvdb_maya/**'
- 'openvdb_houdini/**'
- 'pendingchanges/**'
- '**.md'
pull_request:
branches:
- '**'
paths-ignore:
- 'CHANGES'
- 'CODEOWNERS'
- 'doc/**'
- 'openvdb_ax/**'
- 'openvdb_maya/**'
- 'openvdb_houdini/**'
- 'pendingchanges/**'
- '**.md'
schedule:
# run this workflow every day 7am UTC
- cron: '0 7 * * *'
workflow_dispatch:
inputs:
type:
description: 'The type of CI to run (all, linux, win, mac)'
required: true
default: 'all'
# Allow subsequent pushes to the same PR or REF to cancel any previous jobs.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
linux-nanovdb:
if: |
github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'linux'
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
name: >
linux-nanovdb:cxx:${{ matrix.config.cxx }}-${{ matrix.config.build }}
container:
image: aswf/ci-openvdb:${{ matrix.config.image }}
env:
CXX: ${{ matrix.config.cxx }}
strategy:
matrix:
config:
- { cxx: g++, image: '2022-clang11', build: 'Release' }
- { cxx: g++, image: '2022-clang11', build: 'Debug' }
- { cxx: clang++, image: '2022-clang11', build: 'Release' }
- { cxx: clang++, image: '2022-clang11', build: 'Debug' }
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: install_cuda_11
run: |
yum -y install yum-utils
yum-config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo
echo "Installing cuda toolkit"
yum --enablerepo=epel -y install cuda-toolkit-11-6
echo "/usr/local/cuda-11.6/bin" >> $GITHUB_PATH
echo "LD_LIBRARY_PATH=/usr/local/cuda-11.6/lib64:$LD_LIBRARY_PATH" >> $GITHUB_ENV
- name: build
run: >
./ci/build.sh -v
--build-type=${{ matrix.config.build }}
--components=core,nano,nanotest,nanoexam,nanobench,nanotool
--cargs=\'
-DUSE_EXPLICIT_INSTANTIATION=OFF
-DNANOVDB_USE_CUDA=ON
-DNANOVDB_USE_OPENVDB=ON
-DCMAKE_INSTALL_PREFIX=`pwd`
-DUSE_BLOSC=OFF
\'
- name: test
run: cd build && sudo ctest -V -E ".*cuda.*"
windows-nanovdb:
if: |
github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'win'
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'windows-2022-8c-32g-300h') || 'windows-latest' }}
env:
VCPKG_DEFAULT_TRIPLET: ${{ matrix.config.vc }}
visual_studio: "Visual Studio 17 2022"
cuda: "11.6.2"
strategy:
matrix:
config:
# static build of blosc from vcpkg does not build internal sources.
# USE_STATIC_DEPENDENCIES is required for IlmBase/OpenEXR defines and
# Boost as both shared and static libs are installed.
- { vc: 'x64-windows-static', build: 'Release', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_SHARED=OFF -DUSE_STATIC_DEPENDENCIES=ON -DBLOSC_USE_EXTERNAL_SOURCES=ON -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded' }
- { vc: 'x64-windows-static', build: 'Debug', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_SHARED=OFF -DUSE_STATIC_DEPENDENCIES=ON -DBLOSC_USE_EXTERNAL_SOURCES=ON -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebug' }
- { vc: 'x64-windows', build: 'Release', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_STATIC=OFF' }
- { vc: 'x64-windows', build: 'Debug', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_STATIC=OFF' }
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: path
run: |
# note: system path must be modified in a previous step to it's use
echo "$Env:VCPKG_INSTALLATION_ROOT\installed\${{ matrix.config.vc }}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "${{github.workspace}}\build\openvdb\openvdb\${{ matrix.config.build }}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: install_cuda
shell: powershell
run: .\ci\install_windows_cuda.ps1
- name: install_deps
shell: bash
run: |
vcpkg update
vcpkg install zlib tbb gtest blosc boost-iostreams boost-system boost-any boost-uuid boost-interprocess boost-algorithm
- name: build
shell: bash
run: >
./ci/build.sh -v
--config=${{ matrix.config.build }}
--components=core,nano,nanotest,nanoexam,nanobench,nanotool
--cargs=\'
${{ matrix.config.cmake }}
-DMSVC_COMPRESS_PDB=ON
-DUSE_EXPLICIT_INSTANTIATION=OFF
-DNANOVDB_USE_CUDA=ON
-DNANOVDB_USE_OPENVDB=ON
-DVCPKG_TARGET_TRIPLET=${VCPKG_DEFAULT_TRIPLET}
-DCMAKE_TOOLCHAIN_FILE=\"${VCPKG_INSTALLATION_ROOT}\\scripts\\buildsystems\\vcpkg.cmake\"
\'
- name: test
shell: bash
run: cd build && ctest -V -E ".*cuda.*"
macos-nanovdb:
if: |
github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'mac'
runs-on: ${{ matrix.config.runner }}
env:
CXX: ${{ matrix.config.cxx }}
strategy:
matrix:
config:
- { runner: 'macos-11', cxx: 'clang++', build: 'Release' }
- { runner: 'macos-11', cxx: 'clang++', build: 'Debug' }
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: install_deps
run: ./ci/install_macos.sh
- name: build
run: >
./ci/build.sh -v
--build-type=${{ matrix.config.build }}
--components=core,nano,nanotest,nanoexam,nanobench,nanotool
--cargs=\'-DUSE_EXPLICIT_INSTANTIATION=OFF -DNANOVDB_USE_CUDA=OFF -DNANOVDB_USE_OPENVDB=ON\'
- name: test
run: cd build && ctest -V -E ".*cuda.*"
nanovdb-lite:
if: |
github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'linux'
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v3
- name: install_gtest
run: |
sudo apt-get update
sudo apt-get -q install -y libgtest-dev
- name: build_and_test
run: |
cd nanovdb/nanovdb
sudo mkdir .build
cd .build
sudo cmake -DUSE_EXPLICIT_INSTANTIATION=OFF -DNANOVDB_BUILD_UNITTESTS=ON ../
sudo make -j8 install
sudo ctest -V
+486
View File
@@ -0,0 +1,486 @@
# This workflow runs once a week and tests a variety of configurations,
# dependencies and other specific or expensive checkes (sanitizers).
# It also contains the Houdini Cache jobs which update the CI cache
# with new Houdini releases.
name: Weekly
on:
schedule:
# run this workflow Sunday 00:00 UTC
- cron: '0 0 * * 0'
workflow_dispatch:
inputs:
type:
description: 'The type of CI to run (all, houdini, latest, extra, ax, blosc, abi)'
required: true
default: 'all'
# Allow subsequent pushes to the same PR or REF to cancel any previous jobs.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
#############################################################################
################################## Houdini ##################################
#############################################################################
# Check that valid github secrets have been set for the ability to
# download Houdini and cache it. The secrets are used in download_houdini.py
checksecret:
name: Verify Houdini Secrets
runs-on: ubuntu-latest
outputs:
HOUDINI_SECRETS: ${{ steps.check.outputs.HOUDINI_SECRETS }}
steps:
- id: check
env:
HOUDINI_CLIENT_ID: ${{ secrets.HOUDINI_CLIENT_ID }}
HOUDINI_SECRET_KEY: ${{ secrets.HOUDINI_SECRET_KEY }}
run: echo "HOUDINI_SECRETS=${{ env.HOUDINI_CLIENT_ID != '' && env.HOUDINI_SECRET_KEY != '' }}" >> $GITHUB_OUTPUT
- name: Skip Next Jobs
if: steps.check.outputs.HOUDINI_SECRETS != 'true'
run: echo "HOUDINI_CLIENT_ID and HOUDINI_SECRET_KEY GitHub Action Secrets needs to be set to install Houdini builds"
# Explicitly error on the ASWF repo, we expect this secret to always exist
- name: Error ASWF
if: steps.check.outputs.HOUDINI_SECRETS != 'true' && github.repository_owner == 'AcademySoftwareFoundation'
run: exit 1
# download the latest production version of Houdini X, strip out headers,
# libraries and binaries required for building OpenVDB and put it into
# the GitHub Actions cache
linux_houdini:
needs: [checksecret]
if: |
(needs.checksecret.outputs.HOUDINI_SECRETS == 'true') &&
(github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'houdini')
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
name: linux-houdini:${{ matrix.config.hou_hash }}
env:
CXX: clang++
HOUDINI_CLIENT_ID: ${{ secrets.HOUDINI_CLIENT_ID }}
HOUDINI_SECRET_KEY: ${{ secrets.HOUDINI_SECRET_KEY }}
strategy:
matrix:
config:
- { houdini_version: '19.5', platform: 'linux_x86_64_gcc9.3', hou_hash: '19_5' }
- { houdini_version: '20.0', platform: 'linux_x86_64_gcc9.3', hou_hash: '20_0-oldabi' }
- { houdini_version: '20.0', platform: 'linux_x86_64_gcc11.2', hou_hash: '20_0-newabi' }
fail-fast: false
container:
image: aswf/ci-base:2023
steps:
- uses: actions/checkout@v3
# We bumped from the 2021 CI image to 2023 here to fix some OpenSSL issues
# with the Houdini download script. In so doing we broke some of the caching
# between this job and the jobs in houdini.yml which _don't_ use the 2023
# image yet. The issue is that the cache action will use zstd if it's
# available to zip the cache and this causes it to be inserted with a unique
# hash which images without zstd (i.e. the 2021/2022 images don't have
# access to). For now, uninstall zstd here instead of installing it
# everywhere and ask the LF to add zstd to the older base images.
- name: remove zstd
run: yum -y remove zstd
- name: timestamp
id: timestamp
run: echo "timestamp=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
- name: download_houdini
run: ./ci/download_houdini.sh ${{ matrix.config.houdini_version }} ${{ matrix.config.platform }} --prod
- name: install_houdini
run: |
mkdir $HOME/houdini_install
cp hou/hou.tar.gz $HOME/houdini_install/hou.tar.gz
cd $HOME/houdini_install && tar -xzf hou.tar.gz && cd -
- name: write_houdini_cache
uses: actions/cache/save@v3
with:
path: hou
key: vdb-v5-houdini${{ matrix.config.hou_hash }}-${{ steps.timestamp.outputs.timestamp }}
macos_houdini:
needs: [checksecret]
if: |
(needs.checksecret.outputs.HOUDINI_SECRETS == 'true') &&
(github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'houdini')
runs-on: macos-latest
name: macos-houdini-20
env:
HOUDINI_CLIENT_ID: ${{ secrets.HOUDINI_CLIENT_ID }}
HOUDINI_SECRET_KEY: ${{ secrets.HOUDINI_SECRET_KEY }}
steps:
- uses: actions/checkout@v3
- name: timestamp
id: timestamp
run: echo "timestamp=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
- name: download_houdini
run: ./ci/download_houdini.sh 20.0 macosx_x86_64_clang12.0_11 --prod
- name: install_houdini
run: |
mkdir $HOME/houdini_install
cp hou/hou.tar.gz $HOME/houdini_install/hou.tar.gz
cd $HOME/houdini_install && tar -xzf hou.tar.gz && cd -
- name: write_houdini_cache
uses: actions/cache/save@v3
with:
path: hou
key: vdb-v5-houdini-macos-${{ steps.timestamp.outputs.timestamp }}
#############################################################################
########################### Core Library Extras #############################
#############################################################################
# Extra configuration tests for the OpenVDB Core library. These test a
# variety of options with newer compilers.
linux-extra:
if: |
github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'extra'
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
name: linux-extra:${{ matrix.config.name }}
container:
# @note we specifically use clang15.0 (not clang15) here as the newest
# versions of the clang15.X containers have some issues with the GLFW
# installation
image: aswf/ci-openvdb:2023-clang15.0
env:
CXX: clang++
strategy:
matrix:
config:
- { name: 'all', build: 'Release', components: 'core,python,bin,view,render,test', cmake: '-DUSE_BLOSC=ON -DUSE_ZLIB=ON -DUSE_EXR=ON -DUSE_PNG=ON' }
- { name: 'lite', build: 'Release', components: 'core,python,bin,view,render,test', cmake: '-DUSE_BLOSC=OFF -DUSE_ZLIB=OFF -DUSE_EXR=OFF -DUSE_PNG=OFF -DOPENVDB_USE_DELAYED_LOADING=OFF' }
- { name: 'half', build: 'Release', components: 'core,python,bin,view,render,test', cmake: '-DUSE_BLOSC=OFF -DUSE_IMATH_HALF=ON' }
- { name: 'sse', build: 'Release', components: 'core,python,bin,view,render,test', cmake: '-DOPENVDB_SIMD=SSE42' }
- { name: 'avx', build: 'Release', components: 'core,python,bin,view,render,test', cmake: '-DOPENVDB_SIMD=AVX' }
- { name: 'numpy', build: 'Release', components: 'core,python,bin,view,render,test', cmake: '-DUSE_NUMPY=ON -DOPENVDB_PYTHON_WRAP_ALL_GRID_TYPES=ON' }
- { name: 'asan', build: 'asan', components: 'core,test,axcore,axtest', cmake: '-DNANOVDB_USE_OPENVDB=ON -DOPENVDB_AX_STATIC=OFF -DOPENVDB_CORE_STATIC=OFF -DUSE_BLOSC=OFF' } # We never called blosc_destroy(), so disable blosc to silence these errors
- { name: 'ubsan', build: 'ubsan', components: 'core,test,axcore,axtest', cmake: '' }
- { name: 'c++20', build: 'Release', components: 'core,test,axcore,axtest', cmake: '-DCMAKE_CXX_STANDARD=20' }
- { name: 'conf', build: 'Release', components: 'core,python,bin,view,render,test,axcore,axtest', cmake: '-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON' }
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: pybind11
#if: contains(container.image, '2023') == false
run: ./ci/install_pybind11.sh 2.10.0
- name: build
run: >
./ci/build.sh -v
--build-type=${{ matrix.config.build }}
--components="${{ matrix.config.components }}"
--cargs=\"-DOPENVDB_CXX_STRICT=ON ${{ matrix.config.cmake }}\"
- name: test
run: cd build && ctest -V
# Test latest dependencies, latest compilers and options
latest:
if: |
github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'latest'
runs-on: ${{ matrix.config.runson }}
env:
CXX: ${{ matrix.config.cxx }}
strategy:
matrix:
config:
- { runson: ubuntu-latest, cxx: g++, cmake: '' }
# Disable the clang job for now. See https://github.com/actions/runner-images/issues/8659
# - { runson: ubuntu-latest, cxx: clang++, cmake: '' }
# @todo gcc on macos
- { runson: macos-latest, cxx: '', cmake: '-D CMAKE_CXX_COMPILER=/usr/local/opt/llvm@15/bin/clang++' }
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: install_deps
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get -q install -y libboost-dev libboost-iostreams-dev libtbb-dev libblosc-dev llvm-dev libgtest-dev libcppunit-dev pybind11-dev
elif [ "$RUNNER_OS" == "macOS" ]; then
./ci/install_macos.sh 15
else
echo "$RUNNER_OS not supported"; exit 1
fi
- name: build
run: >
./ci/build.sh -v
--build-type=Release
--components=\"core,axcore,python,bin,render,test,axtest,axbin\"
--cargs=\"-DCMAKE_CXX_STANDARD=20 -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install ${{ matrix.config.cmake }}\"
- name: test
run: cd build && ctest -V
#############################################################################
############################ AX Library Extras ##############################
#############################################################################
linux-ax:
if: |
github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'ax'
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
name: >
linux-ax:${{ matrix.config.image }}-cxx:${{ matrix.config.cxx }}-${{ matrix.config.build }}
container:
image: aswf/ci-openvdb:${{ matrix.config.image }}
env:
CXX: ${{ matrix.config.cxx }}
strategy:
matrix:
config:
# Unified
- { image: '2022-clang14', cxx: 'clang++', build: 'Release', components: 'core,bin,axcore,axbin,axtest', cmake: '' }
- { image: '2022-clang14', cxx: 'g++', build: 'Release', components: 'core,bin,axcore,axbin,axtest', cmake: '' }
- { image: '2022-clang13', cxx: 'clang++', build: 'Release', components: 'core,bin,axcore,axbin,axtest', cmake: '' }
- { image: '2022-clang13', cxx: 'g++', build: 'Release', components: 'core,bin,axcore,axbin,axtest', cmake: '' }
# Standalone
- { image: '2021-clang10', cxx: 'clang++', build: 'Release', components: 'core', cmake: '-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON' }
- { image: '2022-clang11', cxx: 'clang++', build: 'Debug', components: 'core', cmake: '' }
- { image: '2022-clang11', cxx: 'clang++', build: 'Release', components: 'core', cmake: '' }
- { image: '2022-clang11', cxx: 'g++', build: 'Release', components: 'core', cmake: '' }
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: pybind11
#f: contains(matrix.config.image, '2023') == false
run: ./ci/install_pybind11.sh 2.10.0
- name: build
run: >
./ci/build.sh -v
--build-type=${{ matrix.config.build }}
--components=${{ matrix.config.components }}
--cargs=\"
${{ matrix.config.cmake }}
-DOPENVDB_AX_TEST_CMD_DOWNLOADS=ON
-DUSE_EXPLICIT_INSTANTIATION=OFF
-DOPENVDB_CXX_STRICT=ON
\"
- name: clean
if: matrix.config.components == 'core'
run: rm -rf build
- name: build
if: matrix.config.components == 'core'
run: >
./ci/build.sh -v
--build-type=${{ matrix.config.build }}
--components="bin,axcore,axbin,axtest,python"
--cargs=\"
${{ matrix.config.cmake }}
-DOPENVDB_AX_TEST_CMD_DOWNLOADS=ON
-DUSE_EXPLICIT_INSTANTIATION=OFF
-DOPENVDB_CXX_STRICT=ON
\"
- name: test
run: cd build && ctest -V
- name: test_doxygen_examples
run: ./ci/extract_test_examples.sh
macos-ax:
if: |
github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'ax'
runs-on: macos-latest
name: macos-cxx:${{ matrix.config.cxx }}-llvm:${{ matrix.config.llvm }}-${{ matrix.config.build }}
env:
CXX: ${{ matrix.config.cxx }}
strategy:
matrix:
config:
- { cxx: 'clang++', build: 'Release', llvm: '14' }
- { cxx: 'clang++', build: 'Release', llvm: '15' }
#- { cxx: 'clang++', build: 'Release', llvm: '16' } - not supported yet
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: install_deps
run: ./ci/install_macos.sh ${{ matrix.config.llvm }}
- name: build
run: >
./ci/build.sh -v
--build-type=${{ matrix.config.build }}
--components="core,python,bin,axcore,axbin,axtest"
--cargs=\"
-DOPENVDB_AX_TEST_CMD_DOWNLOADS=ON
-DUSE_EXPLICIT_INSTANTIATION=OFF
-DLLVM_DIR=/usr/local/opt/llvm@${{ matrix.config.llvm }}/lib/cmake/llvm
\"
- name: test
run: cd build && ctest -V
- name: test_doxygen_examples
run: ./ci/extract_test_examples.sh
windows-ax:
if: |
github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'ax'
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'windows-2022-8c-32g-300h') || 'windows-latest' }}
name: windows-vc:${{ matrix.config.vc }}-type:${{ matrix.config.build }}
env:
VCPKG_DEFAULT_TRIPLET: ${{ matrix.config.vc }}
# Export this with '' avoid bash treating \ as escape
VDB_INSTALL_PREFIX: '${{ github.workspace }}\\install'
strategy:
matrix:
config:
# static build of blosc from vcpkg does not build internal sources.
# USE_STATIC_DEPENDENCIES is required for IlmBase/OpenEXR defines and
# Boost as both shared and static libs are installed.
# @todo We don't currently run the axtests with shared builds of ax
# due to symbol issues using LLVM as a static lib (which is the only
# option on Windows).
- { vc: 'x64-windows', crt: 'MD', components: 'core,bin,axcore,axbin,python', build: 'Release', cmake: '-DOPENVDB_CORE_STATIC=OFF -DOPENVDB_AX_STATIC=OFF' }
- { vc: 'x64-windows-static', crt: 'MT', components: 'core,bin,axcore,axbin,axtest', build: 'Release', cmake: '-DOPENVDB_CORE_SHARED=OFF -DOPENVDB_AX_SHARED=OFF -DUSE_STATIC_DEPENDENCIES=ON -DBLOSC_USE_EXTERNAL_SOURCES=ON' }
- { vc: 'x64-windows-static', crt: 'MTd', components: 'core,bin,axcore,axbin,axtest', build: 'Debug', cmake: '-DOPENVDB_CORE_SHARED=OFF -DOPENVDB_AX_SHARED=OFF -DUSE_STATIC_DEPENDENCIES=ON -DBLOSC_USE_EXTERNAL_SOURCES=ON' }
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: llvm
run: ./ci/install_llvm_windows.sh ${{ matrix.config.crt }}
- name: install
run: ./ci/install_windows.sh
- name: build
run: >
./ci/build.sh -v
--config=${{ matrix.config.build }}
--components="${{ matrix.config.components }}"
--cargs=\'
-A x64 -G \"Visual Studio 17 2022\"
-DVCPKG_TARGET_TRIPLET=${VCPKG_DEFAULT_TRIPLET}
-DCMAKE_TOOLCHAIN_FILE=\"${VCPKG_INSTALLATION_ROOT}\\scripts\\buildsystems\\vcpkg.cmake\"
-DMSVC_COMPRESS_PDB=ON
-DOPENVDB_AX_TEST_CMD_DOWNLOADS=ON
-DUSE_EXPLICIT_INSTANTIATION=OFF
-DLLVM_DIR=\"${HOME}\\llvm_install\\lib\\cmake\\llvm\"
-DCMAKE_INSTALL_PREFIX=\"${VDB_INSTALL_PREFIX}\"
${{ matrix.config.cmake }}
\'
- name: runtime_path
shell: pwsh
run: |
# note: system path must be modified in a previous step to it's use
echo "$Env:VCPKG_INSTALLATION_ROOT\installed\${{ matrix.config.vc }}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "$Env:VDB_INSTALL_PREFIX\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: test
run: cd build && ctest -V -C ${{ matrix.config.build }}
#############################################################################
################################## Blosc ####################################
#############################################################################
linux-blosc:
if: |
github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'blosc'
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
name: linux-blosc:${{ matrix.blosc }}
container:
image: aswf/ci-base:2023
strategy:
matrix:
blosc: ['1.18.0','1.19.0','1.20.0','1.21.0']
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: install_blosc
run: sudo ./ci/install_blosc.sh ${{ matrix.blosc }}
- name: build
run: >
sudo ./ci/build.sh -v
--build-type=Release
--components=\"core,test\"
- name: test
run: cd build && sudo ctest -V
#############################################################################
################################## ABI ######################################
#############################################################################
linux-abi-checker:
if: |
github.event_name == 'workflow_dispatch' &&
(github.event.inputs.type == 'all' ||
github.event.inputs.type == 'abi')
runs-on: ubuntu-22.04
env:
# The 'abicheck' build type sets these, but older versions of the library
# may not have this build type. See OpenVDBCXX.cmake
CXXFLAGS: "-gdwarf-4 -g3 -ggdb -Og"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-tags: true
# Compute the latest major version - that is used as our baseline
# note: For CI forks, make sure you have your tags synced
- name: get_major_version
run: |
LATEST_VERSION_TAG=$(git tag --merged | sort --version-sort | tail -n1)
echo "Computed latest VDB tag: ${LATEST_VERSION_TAG}"
VDB_MAJOR_VERSION=$(echo ${LATEST_VERSION_TAG} | cut -f1 -d '.' | tr -d -c 0-9)
echo "Using major version: ${VDB_MAJOR_VERSION}"
echo "VDB_MAJOR_VERSION=${VDB_MAJOR_VERSION}" >> "$GITHUB_ENV"
- name: install_deps
run: sudo apt-get -q install -y libboost-iostreams-dev libtbb-dev libblosc-dev elfutils
- name: install_abi_checker
run: sudo apt-get -q install -y abi-dumper abi-compliance-checker
- name: build_new
run: >
./ci/build.sh -v
--build-dir=build_new
--build-type=abicheck
--target=openvdb_shared
--components=\"core\"
--cargs=\'-DUSE_EXPLICIT_INSTANTIATION=OFF -DDISABLE_DEPENDENCY_VERSION_CHECKS=ON\'
- name: checkout_baseline
run: git checkout v${VDB_MAJOR_VERSION}.0.0
- name: build_old
run: >
./ci/build.sh -v
--build-dir=build_old
--build-type=abicheck
--target=openvdb_shared
--components=\"core\"
--cargs=\'-DUSE_EXPLICIT_INSTANTIATION=OFF -DDISABLE_DEPENDENCY_VERSION_CHECKS=ON\'
- name: abi_dump
run: |
abi-dumper build_new/openvdb/openvdb/libopenvdb.so -o ABI-NEW.dump -lver 1
abi-dumper build_old/openvdb/openvdb/libopenvdb.so -o ABI-OLD.dump -lver 2
# Replace the version namespace in the latest ABI dump with the baseline
# version we're comparing against. We should probably instead build the
# latest with the baseline version number but no CMake/defines allow us to
# do this.
- name: replace_symbols
run: sed -i -E 's/openvdb([^v]*)v[0-9]*_[0-9]/openvdb\1v'${VDB_MAJOR_VERSION}'_0/g' ABI-NEW.dump
- name: abi_check
# -strict treats warnings as errors
# -extended checks all member data
# we check everything _not_ in openvdb::**::internal namespace
run: >
abi-compliance-checker -l OPENVDB
-old ABI-OLD.dump
-new ABI-NEW.dump
-skip-internal-symbols "\d(openvdb.*internal)"
-skip-internal-types "(openvdb.*internal)::"
-strict
-extended
- name: upload_report
uses: actions/upload-artifact@v3
if: always()
with:
name: abi_report
path: ./compat_reports/OPENVDB/2_to_1/compat_report.html
retention-days: 5
+40
View File
@@ -0,0 +1,40 @@
name: Whitespace
on:
push:
paths-ignore:
- 'pendingchanges/**'
- 'tsc/meetings/**'
pull_request:
paths-ignore:
- 'pendingchanges/**'
- 'tsc/meetings/**'
# Allow subsequent pushes to the same PR or REF to cancel any previous jobs.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
# Search the git repository for any trailing spaces excluding meeting notes and auto-generated wlt files
trailingspaces:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: test
run: |
set +e
git grep -n -I -E '^.+[ ]+$' -- ':!tsc/meetings/*' ':!pendingchanges/*' ':!*.wlt'
test $? -eq 1
# Search for any tabs excluding meeting notes, image files and a few others
spacesnottabs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: test
run: |
set +e
git grep -n " " -- ':!*/whitespace.yml' ':!tsc/meetings/*' ':!*.svg' ':!*.cmd' ':!*.png' ':!pendingchanges/*' ':!*.wlt'
test $? -eq 1
+1
View File
@@ -1 +1,2 @@
/build/*
.DS_Store
+419 -13
View File
@@ -1,36 +1,442 @@
OpenVDB Version History
=======================
Version 9.0.1 - In development
Version 11.0.1 - In development
Version 11.0.0 - November 1, 2023
This version introduces ABI changes relative to older major releases,
so to preserve ABI compatibility it might be necessary to define the
macro OPENVDB_ABI_VERSION_NUMBER=N, where, for example, N is 9 for
Houdini 19.5 and 10 for Houdini 20.0.
OpenEXR 2 and Python 2 are no longer supported.
OpenVDB:
Improvements:
- Removed use of boost::any in favor of std::any.
[Contributed by Brian McKinnon]
Bug Fixes:
- Fix potential crash reading corrupt .vdb files with invalid
blosc or zip chunks.
[Contributed by Matthias Ueberheide]
NanoVDB:
Highlights:
- Several new tools to generate and modify NanoVDB grids on the GPU.
- New file format that supports streaming of raw grid buffers.
New Features:
- New memory efficient GridClass::IndexGrid that separates values from tree
- 4 new GridTypes (Index, OnIndex, IndexMask, OnIndexMask) used by IndexGrid
- Added createNanoGrid that replaces older conversion methods in GridBuilder.h,
IndexGridBuilder.h and OpenToNanoVDB.h
- Added cudaPointsToGrid that constructs a point device grid from a list of
points.
- Added cudaVoxelsToGrid that constructs a voxel device grid from a list of
voxels.
- Added cuda/CudaUtils.h with several cuda utility functions.
- Added GpuTimer for timing of kernels in a specific cuda stream.
- Added cudaIndexToGrid that converts IndexGrids into regular Grids.
- Added cudaSignedFloodFill that performs signed-flood filling on the GPU.
- Added cudaAddBlindData that adds blind data to an existing grid on the GPU.
- Added cudaGridChecksum that computes checksums of device grids.
- Added cudaGridHandle that handles grids on the GPU.
- Added cudaNodeManager that constructs a NodeManager on the GPU.
- Added build type Points and GridType::PointIndex for point grids.
- Added GridType::Vec3u16 and GridType::Vec3u8 for compressed coordinates.
- Added PrefixSum.h for concurrent computation of prefix sum on the CPU.
API Changes:
- Version 32.6.0 (ABI is unchanged).
- Transition from C++11 to C++17
- Vec3R is deprecated, please use Vec3d instead.
- nanoToOpenVDB now takes the index of a NanoVDB in a GridHandle.
- GridData, InternalData and LeafData are now public.
- GridMetaData can be copied.
- Improvements to GridBuilder.h that allows construction of grids on CPU.
- GridHandle's move c-tor now requires the GridBuffer to contain a valid grid.
- Moved CudaDeviceBuffer.h to cuda/CudaDeviceBuffer.h.
- New API for acceleration of custom random-access with ValueAccessors.
- Added BitFlags class for convenient bit-mask operations.
- Added Vec2/3::min/maxComponentAtomic GPU methods.
- Added BBox::expandAtomic and BBox::intersectAtomic.
- Added Coord::expandAtomic.
- Added Map constructors.
- Added Mask::DenseIterator, Mask::setOnAtomic, and Mask::setOffAtomic.
- InternalNode::ChildIterator is now const-correct.
- Added several new NanoVDB Build Traits.
- Syncing PNanoVDB.h with NanoVDB.h.
Build:
- Support for OpenEXR 2.X has been removed.
- Better support for building with external package configurations
with CMAKE_FIND_PACKAGE_PREFER_CONFIG=ON.
Python:
- Removed Python 2 support.
[Contributed by Matthew Cong]
- Removed explicit bindings for Math types.
[Contributed by Matthew Cong]
- Improved type casting for TypedMetadata.
[Contributed by Matthew Cong]
Version 10.1.0 - October 11, 2023
Highlights:
- OpenVDB Python bindings are now implemented using pybind11 instead of
Boost.Python.
[Contributed by Matthew Cong]
OpenVDB:
New features:
- Added points::replicate() for the replication of PointDataGrid points
and attributes.
Improvements:
- Upgraded OpenVDBs internal half representation to IMath 3.1.6. Brings
conversion support using F16C instructions (if enabled using -mf16c) and
the removal of the exponent lookup table in favor of bit shifting.
- OpenVDBs copy of Half.h is no longer built with an internal lookup table,
but explicitly selects the non-LUT version and disables the creation of
the LUT. This is required to avoid symbol conflicts with different
namespaced OpenVDB builds.
- Removed boost::uuid from Archive, instead std::random_device is used
directly to generate UUID-like objects.
- Moved all cases of file static/global variables which relied on non-trivial
construction into function scopes as static locals. These would previously
initialize themselves on start-up in a non-deterministic, compiler-dictated
order(static-initialization-order-fiasco). This order is now defined by the
program's execution.
- Fixed the constants used in openvdb::math::Coord::hash() and
nanovdb::Coord::hash() to correctly be prime numbers (note that this
changes the result of these methods).
[Contributed by Benedikt Mersch]
- Updated tools::meshToVolume to take two new optional arguments to provide
an interior test oracle and an interior testing method. These allow the
default outside-flood-fill to be replaced if the actual sidedness can be
known.
[Contributed by Tomas Skrivan]
- LevelSetRebuild now includes example code that demonstrates the intended
use of the new meshToVolume interior testing parameters for the
resampling of level sets, where the original grid is used as the true
sign value. However, due to differences between polygonalization and
trilinear interpolation, this behaviour is disabled and exists as a
reference.
- Introduced openvdb::TupleList to wrap std::tuple and provide interface
interop methods with openvdb::TypeList.
- Added OPENVDB_FORCE_INLINE, OPENVDB_LIKELY and OPENVDB_UNLIKELY macros.
- Introduced openvdb::make_index_sequence to solve clang compilations
issues with compiler built-in index_sequence implementations.
API changes:
- Significant infrastructural change to the ValueAccessor header and
implementation. All ValueAccessor specializations have been consolidated
into a single class which supports all possible ValueAccessor configurations
using index_sequences. Backward compatible declarations have been provided.
The new ValueAccessor implementation is marked as final.
- PagedArray iterators no longer derive from std::iterator
(but remains standard compliant).
Bug Fixes:
- Internal counters in tree::RangeIterator were limited to 32bit precision.
They are now extended to size_t.
[Reported by SpaceX]
- Fixed a bug when compiling with -fvisibility=hidden and GCC 11 which
would cause a crash in openvdb::initialize().
- Fixed a bug with LeafManager which wouldn't correctly
initialize its LeafNode array for single level Tree configurations
i.e. RootNode<LeafNode> (bug introduced in 7.2.0).
[Reported by @lanwatch]
- Fixed a bug with LeafNodeBool Topology constructor with designated
on/off values which wouldn't apply them correctly.
[Reported by @hozhaoea]
OpenVDB AX:
Improvements:
- Added support for LLVM 15.
Bug Fixes:
- Fixed a bug in AX on older X86 hardware which could cause a crash when
accessing point attributes with half compression (bug introduced in 9.1.0).
- Fixed an incorrect option in the `vdb_ax` command line tool where the default
optimization level was set to NONE instead of O3 (issue introduced in 10.0.0).
Houdini:
Improvements:
- Added Preserve Holes option to VDB From Polygons that uses the
fast winding oracle to not collapse holes in polygonal geometry.
Bug Fixes:
- Fix a bug in the projection mode of the Advect Points SOP that was causing
a segfault.
Build:
- Fixed a build issue where Boost was not being pulled in when
OPENVDB_USE_DELAYED_LOADING was set to OFF.
- Fixed a build issue with AX on 32-bit platforms.
[Reported by Mathieu Malaterre]
- Fixed a compilation issue with the min() and max() methods on Stencils
in openvdb/math/Stencils.h.
[Reported by Samuel Mauch]
- Fixed a compilation error that would be encountered when attempting to
enable the SSE4.2 or AVX SIMD options on non-x86 based platforms.
- Improved support for compiling with C++20.
[Contributed by Denys Maletskyy and Jérémie Dumas]
- OpenVDB's CMake no longer modifies the BUILD_SHARED_LIBS variable.
[Reported by Maksim Shabunin]
- Fix int-in-bool-context GCC9+ warnings by switching to use constexpr if.
Version 10.0.1 - November 30, 2022
Bug Fixes:
- Fix uninitialized point flags in tools::VolumeToMesh which could result in
non-deterministic results (bug introduced in 10.0.0).
Build:
- Fixed CXX standard requirement for VDB components in FindOpenVDB.cmake
Version 10.0.0 - October 27, 2022
This version introduces ABI changes relative to older major releases,
so to preserve ABI compatibility it might be necessary to define the
macro OPENVDB_ABI_VERSION_NUMBER=N, where, for example, N is 8 for
Houdini 19.0 and 9 for Houdini 19.5.
Highlights:
- Introducing OpenVDBLink, which provides a Mathematica interface to
OpenVDB. This link ports over access to various grid containers including
level sets, fog volumes, vector grids, integer grids, Boolean grids,
and mask grids. Construction, modification, combinations, visualisations,
queries, import, export, etc. can be achieved over grids too. Any
Mathematica 3D region that's ConstantRegionQ and BoundedRegionQ can
be represented as a level set grid, providing a more seamless integration
with OpenVDB.
- Introducing a new command-line tool, dubbed vdb_tool, that can combine any
number of the high-level tools available in openvdb/tools. For
instance, it can convert a sequence of polygon meshes and particles to
level sets, perform a large number of operations on these level set
surfaces and export them as adaptive polygon meshes.
OpenVDB:
Improvements:
- Significantly improved the performance of all ValueAccessor methods which
access LeafNode value buffer data. This improvement applies to any type
which is delay load compatible (all default types except for bool and mask
grids) and improves the performance of many OpenVDB tools.
- Improved the performance of volumeToMesh by 10-15%.
ABI changes:
- ABI change to openvdb::RootNode, which now has a new member that defines
the origin of the node. For now this origin is set to a default value of
(0,0,0), but in the near future we will allow for offsets to improve
access performance and reduce the memory footprints.
- Removed deprecated virtual methods from AttributeArray.
API changes:
- Removed PagedArray::push_back().
- Removed Tree visitor methods from Tree, RootNode, InternalNode and
LeafNode classes - visit(), visit2(), visitActiveBBox().
- Removed LeafManager::getNodes().
- Removed tools::dilateVoxels() and tools::erodeVoxels() in favor of
tools::dilateActiveValues() and tools::erodeActiveValues().
- Removed tools::FindActiveValues::any() and
tools::FindActiveValues::none().
- StringGrid and StringTrees have been removed.
Bug Fixes:
- Fixed an issue with tools::topologyToLevelSet which would previously
ignore active tiles in the input topology.
[Reported by Tobias Rittig]
- Fixed a bug with ValueAccessor::addLeaf and ValueAccessor::addTile which
wouldn't add the provided leaf nodes to the underlying tree. This bug did
NOT affect the specialized accessors which are used by the default tree
configuration.
[Contributed by Andrey Zakirov]
- Fixed a bug where ValueAccessor::probeNode<NodeT> and
ValueAccessor:probeConstNode<NodeT> would return a nullptr if the NodeT
type was not explicitly being cached by the accessor but the node existed
in the tree.
- Fixed a bug on Windows where math::Abs could truncate 64bit integer values.
[Contributed by Edward Lam]
- Fixed an occurrence of undefined behaviour with math::floatToInt32 and
math::doubleToInt64.
[Reported by Vojtěch Bubník]
- Fixed bugs in the sum merge that produced incorrect merged grids when
deep-copying the input nodes or when non-zero background grids were being
used.
- Fixed a bug in FastSweeping where voxels/tiles are left with min/max float
values.
- Fixed a bug in math/Tuple.h that prevented compilation with VS2017.
OpenVDB AX:
Improvements:
- Major updates to the command line interface of the vdb_ax binary, exposing
more controls such as tile streaming, value iterator types and attribute
bindings.
OpenVDB Houdini:
New Features:
- Add convex hull activation for VDB Activate SOP (requires 19.5).
Improvements:
- Improved SDF activation to use dynamic node manager.
Bug Fixes:
- Fixed a bug in VDB Visualize SOP where color values that exceed
the range wrap around instead of being clamped.
NanoVDB:
New Features:
- Added nanovdb::IndexGrid that allows for arbitrary voxel values and even
multiple channels to be associated with NanoVDB grids. They are more
flexible and memory efficient than regular grids at a small cost of
random-access performance. IndexGrids are constructed with the new
nanovdb::IndexGridBuilder and accessed with the new
nanovdb::ChannelAccessor.
- Added iterators to all tree node classes for visiting inactive, active, or
all values and child nodes.
- NanoVDB.h now includes standalone implementations of reading and writing
uncompressed nanovdb grids buffers.
- Added Stats::getExtrema, which computes the min/max values of all voxels
in a NanoVDB grid that intersects with a user-defined bounding-box.
- Added nanovdb::Mask::countOn(int) which is essential to the new
nanovdb::IndexGrid.
- Added RootNode::probeChild and InternalNode::probeChild.
Improvements:
- Added a new much improved nanovdb::NodeManager, that is both faster and
more memory efficient, and that works on both the CPU and GPU. Note, it
uses a handle for allocation (just like nanovdb::Grid) and replaces the
old nanovdb::LeafManager which is now deprecated.
- NanoToOpenVDB is extended to work with grids templated on Fp4, Fp8, Fp16,
FpN, bool and ValueMask.
- Renamed RootNode::findTile to RootNode::probeTile and made it public.
- Made Mask::getWord return both a const and non-const reference.
- Improved unit-tests to use explicit 32B alignment (see alignment bug-fix
below).
- PNanoVDB.h (a C99 port of NanoVDB.h) has been updated.
Bug Fixes:
- Fixed a bug in nanovdb::HostBuffer that could produce crashes due to
misaligned CPU memory allocations.
- Fixed bug related to uninitialized memory in nanovdb::Grid which could
confuse CRC32 checksum validation.
- Fixed bugs related to the use of intrinsic functions for fast bit-counting
in nanovdb.
- Fixed a potential security vulnerability in NanoVDB.h related to buffer
overflow exploits.
Build:
- Added OPENVDB_USE_DELAYED_LOAD flag that enables delayed loading and
defaults to on.
- Add a placeholder to inject the specific revision and URL used
to build OpenVDB, useful for 3rd party build scripts to publish
their exact versions.
- Fixed an issue where OPENVDB_AX_DLL was not being defined on shared
library builds of AX, resulting in symbols not being exported.
[Reported by Ray Molenkamp]
- Fixed an issue where setting Tbb_INCLUDE_DIR could cause CMake failures.
- Updated FindTBB.cmake to support newer library ABI suffixing in
TBB 2021.5.
- Updated FindBlosc.cmake to better handle cases where blosc is built with
external sources.
- Resolved LLVM deprecation warnings in AX and added support for LLVM 14.
- On Windows (MSVC), OpenVDB is now built with extra compiler options to
ensure stricter C++ conformance: /permissive- /Zc:throwingNew /Zc:inline.
- On Windows (MSVC), the _USE_MATH_DEFINES macro is no longer defined when
including <openvdb/Platform.h> (or any dependent headers). If you were
relying on this in your own project for M_PI, M_PI_2, etc. you can add
-D_USE_MATH_DEFINES to your own project compiler options. See
https://docs.microsoft.com/en-us/cpp/c-runtime-library/math-constants
for more info.
Version 9.1.0 - June 9, 2022
Bug Fixes:
- Minor fix to move assignment operator in nanovdb/util/HostBuffer.h.
This could potentially be a problem on Windows debug builds (unconfirmed).
- Minor fix to range in openvdb/tools/LevelSetSphere.h. This could result
in data races for multi-threaded execution (unconfirmed) [Reported by Tommy Hinks]
- Fixed a bug with Tree::combineExtended which wouldn't propagate the resulting active state when a destination tile overlapped a source child node. [Reported by @frapit]
in data races for multi-threaded execution (unconfirmed)
[Reported by Tommy Hinks]
- Fixed a bug with Tree::combineExtended which wouldn't propagate the
resulting active state when a destination tile overlapped a source child node.
[Reported by @frapit]
- Fix unit tests failures with Blosc versions >= 1.19.0.
- Fixed a regression in ax::run which wouldn't propagate exceptions
- Fixed a bug where ax::ast::parse could return a partially constructed but
invalid AST on failure
- Fixed AX logger exit handling in ax::Compiler::compile and ax::ast::parse
- Fixed an issue which could result in significant compilation times when
instantiating TypeList<>::Unique<>
New features:
- Added support for AMD's HIP API in NanoVDB [Contributed by Blender Foundation]
- Added bindings mechanism to AX to allow differing data and AX attribute names (@) in Point and Volume executables.
- Added support for AMD's HIP API in NanoVDB
[Contributed by Blender Foundation]
- Added bindings mechanism to AX to allow differing data and AX attribute
names (@) in Point and Volume executables.
- Added support for OpenVDB AX on Windows.
- Added tools::memUsageIfLoaded() which returns the memory consumption of
a deserialized VDB tree, useful if delay-loading is enabled.
- Added points::rasterizeSpheres() and points::rasterizeSmoothSpheres()
variants, new kernels and improved performance for OpenVDB points to
surface rasterization.
- Added points::rasterizeTrilinear() for OpenVDB points, fast staggered
or colocated trilinear rasterization for scalar and vector attributes.
- Exposed TypeList declarations in openvdb.h which denote the default set
of types supported by OpenVDB.
- Added points::FrustumRasterizer for efficient rasterization of OpenVDB
points to frustum volumes with optional motion blur.
Improvements:
- Added a --thread [n] argument to the vdb_ax binary.
- Added a --copy-file-metadata option to vdb_ax. This behaviour is now off by default.
- Added support for multiple input files with the vdb_ax binary using -i. Positional arguments as input files are deprecated.
- Added tools::minMax() which supports multithreaded evaluation of active minimum and maximum values. Grid::evalMinMax() has been deprecated. [Contributed by Greg Hurst]
- Added a --copy-file-metadata option to vdb_ax. This behaviour is now
off by default.
- Added support for multiple input files with the vdb_ax binary using -i.
Positional arguments as input files are deprecated.
- Added tools::minMax() which supports multithreaded evaluation of active
minimum and maximum values. Grid::evalMinMax() has been deprecated.
[Contributed by Greg Hurst]
- Significant performance improvements to AX point kernels, primarily due to
providing AX access to attribute buffers for superior code generation.
- vdb_print now prints both the in-core memory and total memory usage for
VDB grids.
- Improved build support for MinGW
[Contributed by Mehdi Chinoune]
- Added a new foreach method to TypeList for iterating over types without
constructing them.
- Added TypeList::Transform declaration for transforming TypeLists into new
types.
- Moved Grid::apply implementation to TypeList::apply to allow for other
polymorphic types to invoke it.
- Minor updates to NanoVDB to remove compiler warnings.
Build:
- Regenerated AX grammar with Flex 2.6.4 and Bison 3.8.2.
- Improved locating NumPy in CMake when multiple python versions are installed.
- Fixed an issue which could report Python as missing when using CMake 3.18 and later on some systems. [Reported by Sam James]
- Fixed an issue which could report Python as missing when using CMake 3.18
and later on some systems.
[Reported by Sam James]
- Changed the way boost_python and boost_numpy are located. Both components
must match the major/minor version of python in use. This can be
circumvented by providing Boost_PYTHON_VERSION or
Boost_PYTHON_VERSION_MAJOR.
- Relocated OpenVDB binaries to a new openvdb_cmd root directory.
- FindTBB.cmake now prioritises newer TBB installations.
- Added option to compress PDB data in MSVC debug builds.
Houdini:
- Added Attribute Bindings to AX SOP to allow differently named AX attributes (@) and target point attributes/volumes.
- Fix race condition in OpenVDB Merge SOP that could cause crashes
or merged VDBs to not be deleted.
- Added Attribute Bindings to AX SOP to allow differently named AX
attributes (@) and target point attributes/volumes.
- Fix race condition in OpenVDB Merge SOP that could cause crashes or
merged VDBs to not be deleted.
- VDB Activate SOP no longer stops at the first non-VDB primitive, but
instead just skips such primitives.
- Added VDB Rasterize Frustum SOP for efficient rasterization of OpenVDB
points into frustum volumes with optional motion blur.
Version 9.0.0 - October 29, 2021
@@ -422,7 +828,7 @@ Version 8.0.0 - December 23, 2020
providing users with a new way of interacting with OpenVDB data. AX is
tailored towards writing highly parallelizable and customizable OpenVDB
volume and point kernel operations. See the documentation for more:
https://academysoftwarefoundation.github.io/openvdb/openvdbax.html
https://www.openvdb.org/documentation/openvdbax.html
New features:
- Added tools::anyActiveVoxels and tools::anyActiveTiles that check
+58 -59
View File
@@ -18,12 +18,12 @@
and required dependencies are expected. See the dependency documentation
for more information:
https://academysoftwarefoundation.github.io/openvdb/dependencies.html
https://www.openvdb.org/documentation/doxygen/dependencies.html
And the documentation on building OpenVDB for more in depth installation
instructions:
https://academysoftwarefoundation.github.io/openvdb/build.html
https://www.openvdb.org/documentation/doxygen/build.html
This CMakeLists file provides most available options for configuring the
build and installation of all OpenVDB components. By default the core
@@ -42,7 +42,7 @@
# note: cmake_minimum_required must be called before project commands to
# ensure policy scope is set up correctly
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.18)
# CMP0091 allows for MSVC ABI targetting via CMAKE_MSVC_RUNTIME_LIBRARY
# from CMake 3.15 and above. Must come before project().
@@ -52,7 +52,7 @@ endif()
###### Version
set(OpenVDB_MAJOR_VERSION 9)
set(OpenVDB_MAJOR_VERSION 11)
set(OpenVDB_MINOR_VERSION 0)
set(OpenVDB_PATCH_VERSION 1)
set(OpenVDB_VERSION "${OpenVDB_MAJOR_VERSION}.${OpenVDB_MINOR_VERSION}.${OpenVDB_PATCH_VERSION}")
@@ -64,7 +64,7 @@ project(OpenVDB LANGUAGES CXX VERSION ${OpenVDB_VERSION})
include(CMakeDependentOption)
include(GNUInstallDirs)
# todo epydoc and pdflatex
# Components
option(OPENVDB_BUILD_CORE "Enable the core OpenVDB library. Both static and shared versions are enabled by default" ON)
option(OPENVDB_BUILD_BINARIES "Enable the vdb binaries. Only vdb_print is enabled by default" ON)
option(OPENVDB_BUILD_PYTHON_MODULE "Build the pyopenvdb Python module" OFF)
@@ -72,24 +72,38 @@ option(OPENVDB_BUILD_UNITTESTS "Build the OpenVDB unit tests" OFF)
option(OPENVDB_BUILD_DOCS "Build the OpenVDB documentation" OFF)
option(OPENVDB_BUILD_HOUDINI_PLUGIN "Build the Houdini plugin" OFF)
option(OPENVDB_BUILD_HOUDINI_ABITESTS "Build the Houdini ABI tests" OFF)
option(OPENVDB_BUILD_MAYA_PLUGIN "Build the Maya plugin" OFF)
option(OPENVDB_BUILD_AX "Build the OpenVDB AX library. Turns ON if USE_AX is ON." ${USE_AX})
option(OPENVDB_BUILD_AX_UNITTESTS "Build the OpenVDB AX unit tests" OFF)
option(OPENVDB_BUILD_NANOVDB "Build the NanoVDB library. Turns ON if USE_NANOVDB is ON." ${USE_NANOVDB})
option(OPENVDB_BUILD_MAYA_PLUGIN "Build the Maya plugin" OFF)
# Global options
option(OPENVDB_ENABLE_RPATH "Build with RPATH information" ON)
option(OPENVDB_ENABLE_ASSERTS "Build with asserts in OpenVDB code enabled" OFF)
option(OPENVDB_USE_DELAYED_LOADING "Build the core OpenVDB library with delayed-loading." ON)
option(OPENVDB_CXX_STRICT "Enable or disable pre-defined compiler warnings" OFF)
cmake_dependent_option(OPENVDB_INSTALL_CMAKE_MODULES
"Install the provided OpenVDB CMake modules when building the core library"
ON "OPENVDB_BUILD_CORE" OFF)
option(USE_CCACHE "Build using Ccache if found on the path" ON)
# Disable this on Windows due to linker OOM issues:
# LNK1248: image size (XXX) exceeds maximum allowable size (FFFFFFFF)
# https://github.com/AcademySoftwareFoundation/openvdb/issues/1718
# https://github.com/AcademySoftwareFoundation/openvdb/issues/1624
cmake_dependent_option(USE_EXPLICIT_INSTANTIATION "Use explicit instantiation for all supported classes
and methods against a pre-defined list of OpenVDB trees. This makes the core library larger and slower
to compile, but speeds up the compilation of all dependent code by bypassing the expensive template
instantation." ON "NOT WIN32" OFF)
option(OPENVDB_FUTURE_DEPRECATION "Generate messages for upcoming deprecation" ON)
option(OPENVDB_ENABLE_UNINSTALL "Adds a CMake uninstall target." ON)
option(USE_COLORED_OUTPUT "Always produce ANSI-colored output (GNU/Clang only)." OFF)
# Component dependency options
cmake_dependent_option(USE_PKGCONFIG "Use pkg-config to search for dependent libraries." ON "NOT WIN32" OFF)
option(USE_HOUDINI [=[
Build the library against a Houdini installation. Turns on automatically if OPENVDB_BUILD_HOUDINI_PLUGIN is enabled.
When enabled, you do not need to provide dependency locations for TBB, Blosc, IlmBase and OpenEXR. Boost must be
provided. IlmBase/OpenEXR can optionally be provided if Houdini Version >= 17.5.]=] OFF)
When enabled, you do not need to provide dependency locations for TBB, Blosc, Imath and OpenEXR. Boost must be
provided. Imath/OpenEXR can optionally be provided.]=] OFF)
option(USE_MAYA [=[
Build the library against a Maya installation. Turns on automatically if OPENVDB_BUILD_MAYA_PLUGIN is enabled.
When enabled, you do not need to provide dependency locations for TBB. All other dependencies must be provided.]=] OFF)
@@ -120,7 +134,6 @@ option(USE_NANOVDB "Use NanoVDB while building openvdb components." ${OPENVDB_BU
cmake_dependent_option(OPENVDB_DISABLE_BOOST_IMPLICIT_LINKING
"Disable the implicit linking of Boost libraries on Windows" ON "WIN32" OFF)
option(USE_CCACHE "Build using Ccache if found on the path" ON)
option(USE_STATIC_DEPENDENCIES [=[
Only search for and use static libraries. If OFF the shared versions of requried libraries are prioritised, falling
back to static libraries. Forcing individual static dependencies can be enabled by setting XXX_USE_STATIC_LIBS
@@ -134,17 +147,6 @@ Disable CMakes default system search paths when locating dependencies. When enab
its default system search routine if it cannot find a dependency with the provided settings. When disabled, only
paths provided through the Xxx_ROOT, supported XXX_INCLUDEDIR/XXX_LIBRARYDIR variables or the SYSTEM_LIBRARY_PATHS
list will be searched.]=] OFF)
option(OPENVDB_USE_DEPRECATED_ABI_7 "Bypass minimum ABI requirement checks" OFF)
option(OPENVDB_USE_DEPRECATED_ABI_8 "Bypass minimum ABI requirement checks" OFF)
option(OPENVDB_USE_FUTURE_ABI_10 "Bypass future ABI check" OFF)
option(OPENVDB_FUTURE_DEPRECATION "Generate messages for upcoming deprecation" ON)
option(OPENVDB_ENABLE_UNINSTALL "Adds a CMake uninstall target." ON)
option(USE_COLORED_OUTPUT "Always produce ANSI-colored output (GNU/Clang only)." OFF)
cmake_dependent_option(USE_PKGCONFIG "Use pkg-config to search for dependent libraries." ON "NOT WIN32" OFF)
option(USE_EXPLICIT_INSTANTIATION "Use explicit instantiation for all supported classes and methods against a
pre-defined list of OpenVDB trees. This makes the core library larger and slower to compile, but speeds up
the compilation of all dependent code by bypassing the expensive template instantation." ON)
set(SYSTEM_LIBRARY_PATHS "" CACHE STRING [=[
A global list of library paths to additionally use into when searching for dependencies.]=])
@@ -152,6 +154,7 @@ set(MSVC_MP_THREAD_COUNT "" CACHE STRING [=[
The number of threads to use when invoking MSVC builds with cmake --build. CMake defaults to 1. Note that
cmake --parallel and CMAKE_BUILD_PARALLEL_LEVEL only change the number of PROJECTS that are built in parallel,
NOT the number of TU's ]=])
option(MSVC_COMPRESS_PDB "Whether to attempt to compress PDB symbol data in MSVC debug builds." OFF)
set(_CONCURRENT_MALLOC_OPTIONS None Auto Jemalloc Tbbmalloc)
if(NOT CONCURRENT_MALLOC)
@@ -246,11 +249,9 @@ mark_as_advanced(
OPENVDB_BUILD_HOUDINI_ABITESTS
OPENVDB_CXX_STRICT
OPENVDB_ENABLE_RPATH
OPENVDB_USE_DELAYED_LOADING
OPENVDB_FUTURE_DEPRECATION
OPENVDB_SIMD
OPENVDB_USE_DEPRECATED_ABI_7
OPENVDB_USE_DEPRECATED_ABI_8
OPENVDB_USE_FUTURE_ABI_10
SYSTEM_LIBRARY_PATHS
USE_CCACHE
USE_COLORED_OUTPUT
@@ -258,6 +259,7 @@ mark_as_advanced(
USE_IMATH_HALF
USE_LOG4CPLUS
USE_MAYA
MSVC_COMPRESS_PDB
)
#########################################################################
@@ -266,6 +268,13 @@ mark_as_advanced(
include(cmake/config/OpenVDBVersions.cmake)
foreach(DEPRECATED_ABI ${OPENVDB_DEPRECATED_ABI_LIST})
option(OPENVDB_USE_DEPRECATED_ABI_${DEPRECATED_ABI} "Bypass minimum ABI requirement checks" OFF)
mark_as_advanced(OPENVDB_USE_DEPRECATED_ABI_${DEPRECATED_ABI})
endforeach()
option(OPENVDB_USE_FUTURE_ABI_${FUTURE_OPENVDB_ABI_VERSION} "Bypass future ABI check" OFF)
mark_as_advanced(OPENVDB_USE_FUTURE_ABI_${FUTURE_OPENVDB_ABI_VERSION})
#########################################################################
enable_testing()
@@ -275,13 +284,11 @@ enable_testing()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
# Add cmake modules to installation command
# @todo fix our glew cmake module
if(OPENVDB_INSTALL_CMAKE_MODULES)
set(OPENVDB_CMAKE_MODULES
cmake/FindBlosc.cmake
cmake/FindJemalloc.cmake
cmake/FindIlmBase.cmake
cmake/FindLog4cplus.cmake
cmake/FindOpenEXR.cmake
cmake/FindOpenVDB.cmake
@@ -340,8 +347,7 @@ endif()
if(USE_CCACHE)
find_program(CCACHE_PATH ccache)
if(CCACHE_PATH)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_PATH})
message(STATUS "Using ccache: ${CCACHE_PATH}")
endif()
endif()
@@ -354,39 +360,32 @@ include(cmake/config/OpenVDBCXX.cmake)
#########################################################################
# Configure malloc library. Use Jemalloc for Linux and non-Maya, otherwise Tbbmalloc.
# * On Mac OSX, linking against Jemalloc < 4.3.0 seg-faults with this error:
# malloc: *** malloc_zone_unregister() failed for 0xaddress
# Houdini 17.5 and older ships with Jemalloc 3.6.0, so we make Tbbmalloc the default
# on Mac OSX (https://github.com/jemalloc/jemalloc/issues/420). Later versions of
# Jemalloc are thought to work, but haven't been tested.
# * On Windows, we follow SideFX's example in using Tbbmalloc due to the challenges
# of injecting into the Windows runtime to replace the system allocator.
# Configure malloc library. Use Jemalloc if available, tbbmalloc otherwise
if((OPENVDB_BUILD_BINARIES OR OPENVDB_BUILD_UNITTESTS) AND CONCURRENT_MALLOC STREQUAL "Auto")
if(WIN32 OR APPLE OR USE_MAYA)
if(CONCURRENT_MALLOC STREQUAL "Auto")
find_package(Jemalloc QUIET)
if(NOT TARGET Jemalloc::jemalloc)
message(WARNING "Unable to find Jemalloc, attempting to fall back to TBB malloc.
It is recommended to use Jemalloc for optimum performance.")
set(CONCURRENT_MALLOC "Tbbmalloc")
else()
find_package(Jemalloc QUIET)
if(NOT TARGET Jemalloc::jemalloc)
message(WARNING "Unable to find Jemalloc, attempting to fall back to TBB malloc.
It is recommended to use Jemalloc for optimum performance.")
set(CONCURRENT_MALLOC "Tbbmalloc")
else()
set(CONCURRENT_MALLOC "Jemalloc")
endif()
set(CONCURRENT_MALLOC "Jemalloc")
endif()
endif()
# Configure SIMD. AVX implies SSE 4.2.
if(OPENVDB_SIMD STREQUAL "AVX")
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-mavx>")
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-msse4.2>")
if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)")
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-mavx>")
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-msse4.2>")
endif()
add_compile_definitions("$<$<COMPILE_LANGUAGE:CXX>:OPENVDB_USE_AVX>")
add_compile_definitions("$<$<COMPILE_LANGUAGE:CXX>:OPENVDB_USE_SSE42>")
elseif(OPENVDB_SIMD STREQUAL "SSE42")
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-msse4.2>")
if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)")
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-msse4.2>")
endif()
add_compile_definitions("$<$<COMPILE_LANGUAGE:CXX>:OPENVDB_USE_SSE42>")
endif()
@@ -397,7 +396,6 @@ endif()
if(USE_STATIC_DEPENDENCIES)
set(BLOSC_USE_STATIC_LIBS ON)
set(OPENEXR_USE_STATIC_LIBS ON)
set(ILMBASE_USE_STATIC_LIBS ON)
set(TBB_USE_STATIC_LIBS ON)
set(LOG4CPLUS_USE_STATIC_LIBS ON)
set(JEMALLOC_USE_STATIC_LIBS ON)
@@ -483,14 +481,14 @@ if(OpenVDB_ABI LESS MINIMUM_OPENVDB_ABI_VERSION)
"no longer supported.")
endif()
if(FUTURE_MINIMUM_OPENVDB_ABI_VERSION AND OpenVDB_ABI LESS FUTURE_MINIMUM_OPENVDB_ABI_VERSION)
if(OpenVDB_ABI IN_LIST OPENVDB_DEPRECATED_ABI_LIST)
if(NOT OPENVDB_USE_DEPRECATED_ABI_${OpenVDB_ABI})
message(FATAL_ERROR "OpenVDB ABI versions earlier than ${FUTURE_MINIMUM_OPENVDB_ABI_VERSION} "
message(FATAL_ERROR "OpenVDB ABI versions earlier than ${OpenVDB_MAJOR_VERSION} "
"are deprecated. Set CMake option OPENVDB_USE_DEPRECATED_ABI_${OpenVDB_ABI} to ON to "
"suppress this error.")
endif()
message(DEPRECATION "OpenVDB ABI versions earlier than ${FUTURE_MINIMUM_OPENVDB_ABI_VERSION} "
message(DEPRECATION "OpenVDB ABI versions earlier than ${OpenVDB_MAJOR_VERSION} "
"are deprecated and will soon be removed.")
# global target definition
add_definitions(-DOPENVDB_USE_DEPRECATED_ABI_${OpenVDB_ABI})
@@ -527,10 +525,6 @@ if(OPENVDB_BUILD_AX)
add_subdirectory(openvdb_ax/openvdb_ax)
endif()
if(OPENVDB_BUILD_AX_UNITTESTS)
add_subdirectory(openvdb_ax/openvdb_ax/test)
endif()
if(OPENVDB_BUILD_PYTHON_MODULE)
add_subdirectory(openvdb/openvdb/python)
endif()
@@ -543,6 +537,11 @@ if(OPENVDB_BUILD_UNITTESTS)
add_subdirectory(openvdb/openvdb/unittest)
endif()
# Tests the vdb_ax binary so needs to come after openvdb_cmd
if(OPENVDB_BUILD_AX_UNITTESTS)
add_subdirectory(openvdb_ax/openvdb_ax/test)
endif()
if(OPENVDB_BUILD_HOUDINI_PLUGIN)
add_subdirectory(openvdb_houdini/openvdb_houdini)
endif()
+1 -1
View File
@@ -10,7 +10,7 @@ The contributor role is the starting role for anyone participating in the projec
### Process for becoming a contributor
* Review the [coding standards](https://academysoftwarefoundation.github.io/openvdb/codingStyle.html) to ensure your contribution is in line with the project's coding and styling guidelines.
* Review the [coding standards](https://www.openvdb.org/documentation/doxygen/codingStyle.html) to ensure your contribution is in line with the project's coding and styling guidelines.
* Have a signed CLA on file ( see [below](#contributor-license-agreements) )
* Submit your code as a PR with the appropriate [DCO sign-off](#commit-sign-off).
* Have your submission approved by the [committer(s)](#committer) and merged into the codebase.
+2 -2
View File
@@ -12,5 +12,5 @@ The current OpenVDB maintainers are:
| Dan Bailey | danbailey@ilm.com
| Nick Avramoussis | navramoussis@wetafx.co.nz
| Ken Museth | ken.museth@gmail.com
| Andre Pradhana | andre.pradhana@dreamworks.com
| Richard Jones | rhj@dneg.com
| Andre Pradhana | andre.pradhana@gmail.com
| Richard Jones | richardj@ilm.com
+61 -75
View File
@@ -1,66 +1,74 @@
![OpenVDB](https://www.openvdb.org/images/openvdb_logo.png)
![OpenVDB](doc/img/banner.png)
[![License](https://img.shields.io/github/license/AcademySoftwareFoundation/openvdb)](LICENSE)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/2774/badge)](https://bestpractices.coreinfrastructure.org/projects/2774)
[![Slack](https://slack.aswf.io/badge.svg)](https://slack.aswf.io/)
| OpenVDB | AX | Nano | Houdini | License | CII |
| :----: | :----: | :----: | :----: | :-----: | :-: |
| [![core](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/build.yml/badge.svg)](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/build.yml) | [![ax](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/ax.yml/badge.svg)](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/ax.yml) | [![nano](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/nanovdb.yml/badge.svg)](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/nanovdb.yml) | [![hou](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/houdini.yml/badge.svg)](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/houdini.yml) | [![License](https://img.shields.io/github/license/AcademySoftwareFoundation/openvdb)](LICENSE) | [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/2774/badge)](https://bestpractices.coreinfrastructure.org/projects/2774) |
| OpenVDB | AX | Nano | Houdini |
| :----: | :----: | :----: | :----: |
| [![core](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/build.yml/badge.svg)](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/build.yml) | [![ax](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/ax.yml/badge.svg)](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/ax.yml) | [![nano](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/nanovdb.yml/badge.svg)](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/nanovdb.yml) | [![hou](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/houdini.yml/badge.svg)](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/houdini.yml) |
-------------------------------------------------------------------------------
[Website](https://www.openvdb.org) |
[Discussion Forum](https://github.com/AcademySoftwareFoundation/openvdb/discussions) |
[Documentation](https://academysoftwarefoundation.github.io/openvdb)
OpenVDB is an open source C++ library comprising a novel hierarchical data structure and a large suite of tools for the efficient storage and manipulation of sparse volumetric data discretized on three-dimensional grids. It was developed by DreamWorks Animation for use in volumetric applications typically encountered in feature film production.
[Documentation](https://www.openvdb.org/documentation/doxygen) |
[Releases](https://github.com/AcademySoftwareFoundation/openvdb/releases) |
[License](https://www.mozilla.org/MPL/2.0) |
[Slack](https://slack.aswf.io/)
OpenVDB is an open source C++ library comprising a novel hierarchical data
structure and a large suite of tools for the efficient storage and manipulation
of sparse volumetric data discretized on three-dimensional grids. It was
developed by DreamWorks Animation for use in volumetric applications typically
encountered in feature film production.
### Development Repository
This GitHub repository hosts the trunk of the OpenVDB development. This implies that it is the newest public version with the latest features and bug fixes. However, it also means that it has not undergone a lot of testing and is generally less stable than the [production releases](https://github.com/AcademySoftwareFoundation/openvdb/releases).
This GitHub repository hosts the trunk of the OpenVDB development. This implies
that it is the newest public version with the latest features and bug fixes.
However, it also means that it has not undergone a lot of testing and is
generally less stable than the [production releases](https://github.com/AcademySoftwareFoundation/openvdb/releases).
### License
OpenVDB is released under the [Mozilla Public License Version 2.0](https://www.mozilla.org/MPL/2.0/), which is a free, open source software license developed and maintained by the Mozilla Foundation.
OpenVDB is released under the [Mozilla Public License Version 2.0](https://www.mozilla.org/MPL/2.0/),
which is a free, open source software license developed and maintained by the
Mozilla Foundation.
The trademarks of any contributor to this project may not be used in association with the project without the contributor's express permission.
The trademarks of any contributor to this project may not be used in
association with the project without the contributor's express permission.
### Contributing
OpenVDB welcomes contributions to the OpenVDB project. Please refer to the [contribution guidelines](CONTRIBUTING.md) for details on how to make a contribution.
OpenVDB welcomes contributions to the OpenVDB project. Please refer to the
[contribution guidelines](CONTRIBUTING.md) for details on how to make a
contribution.
-------------------------------------------------------------------------------
### Developer Quick Start
The following provides basic installation examples for the core OpenVDB library. Other components, such as the python module, OpenVDB AX, NanoVDB and various executables, may require additional dependencies. See the [build documentation](https://academysoftwarefoundation.github.io/openvdb/build.html) for help with installations.
The following provides basic installation examples for the core OpenVDB library.
Other components, such as the python module, OpenVDB AX, NanoVDB and various
executables, may require additional dependencies. See the
[build documentation](https://www.openvdb.org/documentation/doxygen/build.html)
for help with installations.
#### Linux
##### Installing Dependencies (Boost, TBB, Blosc)
##### Linux/MacOS
```bash
# Linux
# @note If your distribution does not have required versions, consider using
# apt pinning. See the dependency documentation for more details.
apt-get install -y libboost-iostreams-dev
apt-get install -y libtbb-dev
apt-get install -y libblosc-dev
```
##### Building OpenVDB
```bash
git clone git@github.com:AcademySoftwareFoundation/openvdb.git
cd openvdb
mkdir build
cd build
cmake ..
make -j4 && make install
```
#### macOS
##### Installing Dependencies (Boost, TBB, Blosc)
```bash
# MacOS
# @note We are using homebrew in this example to install requried dependencies
# https://brew.sh/
brew install boost
brew install tbb
brew install c-blosc
```
##### Building OpenVDB
```bash
git clone git@github.com:AcademySoftwareFoundation/openvdb.git
cd openvdb
@@ -69,14 +77,16 @@ cd build
cmake ..
make -j4 && make install
```
#### Windows
##### Installing Dependencies (Boost, TBB, Blosc)
##### Windows
Note that the following commands have only been tested for 64bit systems/libraries.
It is recommended to set the `VCPKG_DEFAULT_TRIPLET` environment variable to
`x64-windows` to use 64-bit libraries by default. You will also require
[Git](https://git-scm.com/downloads), [vcpkg](https://github.com/microsoft/vcpkg)
and [CMake](https://cmake.org/download/) to be installed.
[Visual Studio](https://visualstudio.microsoft.com/downloads/) (for the MSVC C++
runtime and compiler toolchains), [CMake](https://cmake.org/download/) and optionally
[vcpkg](https://github.com/microsoft/vcpkg) for the installation of OpenVDB's
dependencies.
```bash
vcpkg install zlib:x64-windows
@@ -85,10 +95,9 @@ vcpkg install tbb:x64-windows
vcpkg install boost-iostreams:x64-windows
vcpkg install boost-any:x64-windows
vcpkg install boost-algorithm:x64-windows
vcpkg install boost-uuid:x64-windows
vcpkg install boost-interprocess:x64-windows
```
##### Building OpenVDB
```bash
git clone git@github.com:AcademySoftwareFoundation/openvdb.git
cd openvdb
@@ -98,42 +107,19 @@ cmake -DCMAKE_TOOLCHAIN_FILE=<PATH_TO_VCPKG>\scripts\buildsystems\vcpkg.cmake -D
cmake --build . --parallel 4 --config Release --target install
```
#### Building OpenVDB AX
#### Building OpenVDB AX and NanoVDB
OpenVDB AX depends on the core OpenVDB library. See the [build documentation](https://academysoftwarefoundation.github.io/openvdb/build.html) for all available AX component options:
OpenVDB AX depends on the core OpenVDB library. NanoVDB can be built with and
without OpenVDB support. Note that NanoVDB has its own build instructions, see
the [NanoVDB build documentation](https://www.openvdb.org/documentation/doxygen/NanoVDB_HowToBuild.html)
for details.
```bash
git clone git@github.com:AcademySoftwareFoundation/openvdb.git
cd openvdb
mkdir build
cd build
cmake -DOPENVDB_BUILD_AX=ON ..
make -j4 && make install
```
The following variables can be passed to the `cmake` configure command. There
are more optional VDB components, see the [build documentation](https://www.openvdb.org/documentation/doxygen/build.html)
for a complete list.
#### Building NanoVDB
NanoVDB can be built with and without OpenVDB support. To see full build instructions
see the [NanoVDB build documentation](https://academysoftwarefoundation.github.io/openvdb/NanoVDB_HowToBuild.html)
#### Building Without OpenVDB Support
```bash
git clone git@github.com:AcademySoftwareFoundation/openvdb.git
cd openvdb/nanovdb/nanovdb # Build from the subdirectory
mkdir build
cd build
cmake ..
make -j4 && make install
```
#### Building With OpenVDB Support
```bash
git clone git@github.com:AcademySoftwareFoundation/openvdb.git
cd openvdb
mkdir build
cd build
cmake -DOPENVDB_BUILD_NANOVDB=ON ..
make -j4 && make install
```
| Option | Details |
| :---- | :----- |
| `-D OPENVDB_BUILD_AX=ON` | to enable OpenVDB AX |
| `-D OPENVDB_BUILD_NANOVDB=ON` | to enable NanoVDB |
| `-D NANOVDB_USE_OPENVDB=ON` | to use OpenVDB in NanoVDB |
+33 -7
View File
@@ -2,6 +2,8 @@
set -e
CI_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
# print versions
bash --version
if [ ! -z "$CXX" ]; then $CXX -v; fi
@@ -27,9 +29,20 @@ declare -A PARMS
PARMS[--components]=core,bin
PARMS[--target]=install
PARMS[--build-dir]=build
# github actions runners have 2 threads
# https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
PARMS[-j]=2
if [[ $RUNNER_NAME == *"8c-32g-300h"* ]]; then
# ASWF github actions runners have 8 threads
PARMS[-j]=8
else
# Github actions runners have 2 threads
# https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
if [[ $CXX == "g++" ]]; then
# GCC hits memory limits on runners, build in serial
PARMS[-j]=1
else
PARMS[-j]=2
fi
fi
# Available options for --components
declare -A COMPONENTS
@@ -108,7 +121,15 @@ if HAS_PARM -v || HAS_PARM --verbose; then
# support older versions of CMake.
CMAKE_EXTRA+=("-DCMAKE_VERBOSE_MAKEFILE=ON")
fi
if HAS_PARM --build-type; then CMAKE_EXTRA+=("-DCMAKE_BUILD_TYPE=${PARMS[--build-type]}"); fi
if HAS_PARM --build-type; then
CMAKE_EXTRA+=("-DCMAKE_BUILD_TYPE=${PARMS[--build-type]}")
build_type="${PARMS[--build-type]}"
debug="Debug"
# Ignore case - if the build-type is Debug, we enable asserts
if [ "${build_type,,}" = "${debug,,}" ]; then
CMAKE_EXTRA+=("-DOPENVDB_ENABLE_ASSERTS=ON")
fi
fi
# Available components. If a component is not provided it is
# explicitly set to OFF.
@@ -132,7 +153,7 @@ done
################################################
# github actions runners have 2 threads
# github actions runners have 8 threads
# https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
export CMAKE_BUILD_PARALLEL_LEVEL=${PARMS[-j]}
echo "Build using ${CMAKE_BUILD_PARALLEL_LEVEL} threads"
@@ -160,11 +181,16 @@ set -x
# Note:
# - print and lod binary options are always on and can be toggles with: OPENVDB_BUILD_BINARIES=ON/OFF
# - always enabled the python tests with OPENVDB_BUILD_PYTHON_UNITTESTS if the python module is in use,
# regardless of the 'test' component being enabled or not (see the OPENVDB_BUILD_PYTHON_UNITTESTS option).
cmake \
-DOPENVDB_USE_DEPRECATED_ABI_7=ON \
-DOPENVDB_USE_DEPRECATED_ABI_8=ON \
-DOPENVDB_USE_DEPRECATED_ABI_9=ON \
-DOPENVDB_USE_DEPRECATED_ABI_10=ON \
-DOPENVDB_BUILD_VDB_PRINT=ON \
-DOPENVDB_BUILD_VDB_LOD=ON \
-DOPENVDB_BUILD_VDB_TOOL=ON \
-DOPENVDB_TOOL_USE_NANO=OFF \
-DOPENVDB_BUILD_PYTHON_UNITTESTS=ON \
-DMSVC_MP_THREAD_COUNT=${PARMS[-j]} \
"${CMAKE_EXTRA[@]}" \
..
Regular → Executable
+86 -36
View File
@@ -1,4 +1,4 @@
#!/usr/local/bin/python
#!/usr/bin/env python3
#
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: MPL-2.0
@@ -19,16 +19,16 @@ import base64
import requests
import hashlib
import os
import argparse
import copy
# this argument is for the major.minor version of Houdini to download (such as 15.0, 15.5, 16.0)
version = sys.argv[1]
only_production = True if sys.argv[2] == 'ON' else False
user_client_id = os.getenv('HOUDINI_CLIENT_ID')
user_client_secret_key = os.getenv('HOUDINI_SECRET_KEY')
if not re.match('[0-9][0-9]\.[0-9]$', version):
raise IOError('Invalid Houdini Version "%s", expecting in the form "major.minor" such as "16.0"' % version)
# For progress bar printing
try:
from tqdm import tqdm
has_tqdm = True
except:
has_tqdm = False
pass
# Code that provides convenient Python wrappers to call into the API:
@@ -94,7 +94,7 @@ def get_access_token_and_expiry_time(
),
})
if response.status_code != 200:
raise AuthorizationError(response.status_code, reponse.text)
raise AuthorizationError(response.status_code, response.text)
response_json = response.json()
access_token_expiry_time = time.time() - 2 + response_json["expires_in"]
@@ -138,33 +138,83 @@ class APIError(Exception):
self.http_code = http_code
service = service(
access_token_url="https://www.sidefx.com/oauth2/application_token",
client_id=user_client_id,
client_secret_key=user_client_secret_key,
endpoint_url="https://www.sidefx.com/api/",
)
if __name__ == "__main__":
releases_list = service.download.get_daily_builds_list(
product='houdini', version=version, platform='linux', only_production=only_production)
parser = argparse.ArgumentParser(description='Download a Houdini Installation')
parser.add_argument('version', type=str, help='Major.Minor version of Houdini to download')
parser.add_argument('platform', type=str, help='Platform target')
parser.add_argument('--prod', action='store_true', help='Only download production builds')
parser.add_argument('--list', action='store_true', help='Just list the available builds and exit.')
args = parser.parse_args()
latest_release = service.download.get_daily_build_download(
product='houdini', version=version, platform='linux', build=releases_list[0]['build'])
version = args.version
platform = args.platform
only_production = args.prod
# Download the file as hou.tar.gz
local_filename = 'hou.tar.gz'
response = requests.get(latest_release['download_url'], stream=True)
if response.status_code == 200:
with open(local_filename, 'wb') as f:
user_client_id = os.getenv('HOUDINI_CLIENT_ID')
user_client_secret_key = os.getenv('HOUDINI_SECRET_KEY')
if not re.match('[0-9][0-9]\.[0-9]$', version):
raise IOError('Invalid Houdini Version "%s", expecting in the form "major.minor" such as "16.0"' % version)
service = service(
access_token_url="https://www.sidefx.com/oauth2/application_token",
client_id=user_client_id,
client_secret_key=user_client_secret_key,
endpoint_url="https://www.sidefx.com/api/",
)
releases_list = service.download.get_daily_builds_list(
product='houdini', version=version, platform=platform, only_production=only_production)
print('Available builds:')
for rel in releases_list:
rel = copy.deepcopy(rel)
if 'third_party_libraries' in rel:
# Don't print these
del rel['third_party_libraries']
print(rel)
if args.list:
sys.exit(0)
print('Selecting build: ' + releases_list[0]['build'])
latest_release = service.download.get_daily_build_download(
product='houdini', version=version, platform=platform, build=releases_list[0]['build'])
print(latest_release)
# Can't do this procedurally as latest_release['filename'] can contain
# multiple periods and may have multiple trailing extensions...
extension = ''
if 'linux' in platform: extension = 'tar.gz'
elif 'macos' in platform: extension = 'dmg'
elif 'win64' in platform: extension = 'exe'
assert(extension in latest_release['filename'])
# Download the file and save it as hou.extension
local_filename = 'hou.' + extension
print('Writing to "' + local_filename + '"')
response = requests.get(latest_release['download_url'], stream=True)
if response.status_code == 200:
response.raw.decode_content = True
shutil.copyfileobj(response.raw, f)
else:
raise Exception('Error downloading file!')
if has_tqdm:
file_size = int(response.headers.get('Content-Length', 0))
desc = "(Unknown total file size)" if file_size == 0 else ""
with tqdm.wrapattr(response.raw, "read", total=file_size, desc=desc) as r_raw:
with open(local_filename, 'wb') as f:
shutil.copyfileobj(r_raw, f)
else:
with open(local_filename, 'wb') as f:
shutil.copyfileobj(response.raw, f)
else:
raise Exception('Error downloading file!')
# Verify the file checksum is matching
file_hash = hashlib.md5()
with open(local_filename, 'rb') as f:
for chunk in iter(lambda: f.read(4096), b''):
file_hash.update(chunk)
if file_hash.hexdigest() != latest_release['hash']:
raise Exception('Checksum does not match!')
# Verify the file checksum is matching
file_hash = hashlib.md5()
with open(local_filename, 'rb') as f:
for chunk in iter(lambda: f.read(4096), b''):
file_hash.update(chunk)
if file_hash.hexdigest() != latest_release['hash']:
raise Exception('Checksum does not match!')
+104 -36
View File
@@ -3,52 +3,120 @@
set -ex
HOUDINI_MAJOR="$1"
GOLD="$2"
PLATFORM="$2"
OTHER_ARGS="$3"
pip install --user requests
python ci/download_houdini.py $HOUDINI_MAJOR $PLATFORM $OTHER_ARGS
python ci/download_houdini.py $HOUDINI_MAJOR $GOLD
if [[ $PLATFORM =~ "linux" ]]; then
# create dir hierarchy
mkdir -p hou/bin
mkdir -p hou/houdini
mkdir -p hou/toolkit
mkdir -p hou/dsolib
# create dir hierarchy
mkdir -p hou/bin
mkdir -p hou/houdini
mkdir -p hou/toolkit
mkdir -p hou/dsolib
# unpack hou.tar.gz and cleanup
tar -xzf hou.tar.gz
rm -rf hou.tar.gz
cd houdini*
tar -xzf houdini.tar.gz
# unpack hou.tar.gz and cleanup
tar -xzf hou.tar.gz
rm -rf hou.tar.gz
cd houdini*
tar -xzf houdini.tar.gz
# copy required files into hou dir
cp houdini_setup* ../hou/.
# copy required files into hou dir
cp houdini_setup* ../hou/.
cp -r toolkit/cmake ../hou/toolkit/.
cp -r toolkit/include ../hou/toolkit/.
cp -r dsolib/libHoudini* ../hou/dsolib/.
cp -r dsolib/libopenvdb_sesi* ../hou/dsolib/.
cp -r dsolib/libblosc* ../hou/dsolib/.
cp -r dsolib/libhboost* ../hou/dsolib/.
cp -r dsolib/libz* ../hou/dsolib/.
cp -r dsolib/libbz2* ../hou/dsolib/.
cp -r dsolib/libtbb* ../hou/dsolib/.
cp -r dsolib/libHalf* ../hou/dsolib/.
cp -r dsolib/libjemalloc* ../hou/dsolib/.
cp -r dsolib/liblzma* ../hou/dsolib/.
cp -r dsolib/libIex* ../hou/dsolib/.
cp -r dsolib/libImath* ../hou/dsolib/.
cp -r dsolib/libIlmThread* ../hou/dsolib/.
cp -r dsolib/libIlmImf* ../hou/dsolib/.
# report library names
ls -al dsolib/
# needed for < H18.0 (due to sesitag)
if [ "$HOUDINI_MAJOR" == "17.0" ] || [ "$HOUDINI_MAJOR" == "17.5" ]; then
cp -r bin/app_init* ../hou/bin/.
cp -r bin/sesitag* ../hou/bin/.
cp -r dsolib/lib* ../hou/dsolib/.
# copy required libraries
cp -r toolkit/cmake ../hou/toolkit/.
cp -r toolkit/include ../hou/toolkit/.
cp -r dsolib/libHoudini* ../hou/dsolib/.
cp -r dsolib/libopenvdb_sesi* ../hou/dsolib/.
cp -r dsolib/libblosc* ../hou/dsolib/.
cp -r dsolib/libhboost* ../hou/dsolib/.
cp -r dsolib/libz* ../hou/dsolib/.
cp -r dsolib/libbz2* ../hou/dsolib/.
cp -r dsolib/libtbb* ../hou/dsolib/.
cp -r dsolib/libjemalloc* ../hou/dsolib/.
cp -r dsolib/liblzma* ../hou/dsolib/.
cp -r dsolib/libIex* ../hou/dsolib/.
cp -r dsolib/libImath* ../hou/dsolib/.
cp -r dsolib/libIlmThread* ../hou/dsolib/.
cd ..
elif [[ $PLATFORM =~ "macos" ]]; then
# Exract files by mounting the downloaded dmg (we only really want to
# expand Houdini.framework)
hdiutil attach hou.dmg
pkgutil --expand-full /Volumes/Houdini/Houdini.pkg Houdini
hdiutil detach /Volumes/Houdini
rm hou.dmg
# Move the required Frameworks and delete the extracted src
mkdir -p hou/Frameworks
mv Houdini/Framework.pkg/Payload/Houdini.framework hou/Frameworks/Houdini.framework
rm -rf Houdini
# Report library names
ls -al hou/Frameworks/Houdini.framework/Libraries
# Remove unused resources
cd hou/Frameworks/Houdini.framework/Resources/
rm -rf $(ls | grep -e toolkit -v)
cd -
# Handle libraries. On some versions of MacOS with older versions of ld,
# ld will complain (error) if shared libraries contain missing files which
# are referenced with LC_LOAD_DYLIB or LC_RPATH entries (even though they
# are not explicitly required at link time). We still want to delete these
# unused libs as they occupt ~1-2GB. To handle this, we generate a unique
# list of libs that our direct dependencies reference and create an empty
# shared dylib in their place.
cd hou/Frameworks/Houdini.framework/Libraries
# Remove any folders here, they aren't needed
rm -rf $(ls -p | grep /)
# Remove any library that does not match the -e patterns (inverse grep with -v)
unused_libraries=$(ls | \
grep -e libHoudini \
-e libopenvdb_sesi \
-e libblosc \
-e libhboost \
-e libz \
-e libbz2 \
-e libtbb \
-e libjemalloc \
-e liblzma \
-e libIex \
-e libImath \
-e libIlmThread \
-v)
rm -rf ${unused_libraries}
# Create an empty valid shared lib
echo '' | clang -x c -shared -o libempty.dylib -
# Generate a unique list of libs that our remaining libs reference
for i in $(ls); do otool -LX $i >> libnames; done
sort -u libnames | grep @rpath | cut -f1 -d' ' | xargs > rpaths
# Recreate unused libraries that have been deleted as empty shared dylibs
# to keep ld happy
for libpath in $(cat rpaths); do
libpath=${libpath#"@rpath/"}
echo "Checking $libpath"
if [ ! -f $libpath ]; then
echo "Creating empty library at $libpath"
mkdir -p $(dirname $libpath)
cp libempty.dylib $libpath
fi
done
rm libempty.dylib
cd -
fi
# write hou into hou.tar.gz and cleanup
cd ..
tar -czvf hou.tar.gz hou
# move hou.tar.gz into hou subdirectory
+1 -1
View File
@@ -32,5 +32,5 @@ cmake \
"${CMAKE_EXTRA[@]}" \
..
make -j4
make -j8
make install
-15
View File
@@ -1,15 +0,0 @@
#!/usr/bin/env bash
set -ex
CMAKE_VERSION="$1"
CMAKE_PACKAGE=cmake-${CMAKE_VERSION}-Linux-x86_64
wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_PACKAGE}.tar.gz
tar -xf ${CMAKE_PACKAGE}.tar.gz
cp ${CMAKE_PACKAGE}/bin/* /usr/local/bin/
cp -r ${CMAKE_PACKAGE}/share/* /usr/local/share/
rm -rf ${CMAKE_PACKAGE}
rm -rf ${CMAKE_PACKAGE}.tar.gz
+1 -1
View File
@@ -14,5 +14,5 @@ fi
mkdir build
cd build
cmake ../.
make -j4
make -j8
make install
-18
View File
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
set -ex
GTEST_VERSION="$1"
git clone https://github.com/google/googletest.git
cd googletest
if [ "$GTEST_VERSION" != "latest" ]; then
git checkout release-${GTEST_VERSION} -b v${GTEST_VERSION}
fi
mkdir build
cd build
cmake ../.
make -j4
make install
+2 -3
View File
@@ -11,7 +11,7 @@ mkdir .build
cd .build
# @note currently only test static builds with MT
cmake -S ../llvm -A x64 -G "Visual Studio 16 2019" -Thost=x64 \
cmake -B . -S ../llvm -A x64 -G "Visual Studio 17 2022" -Thost=x64 \
-DCMAKE_INSTALL_PREFIX="${HOME}/llvm_install" \
-DLLVM_TARGETS_TO_BUILD="host" \
-DLLVM_BUILD_TOOLS=OFF \
@@ -19,8 +19,7 @@ cmake -S ../llvm -A x64 -G "Visual Studio 16 2019" -Thost=x64 \
-DLLVM_INCLUDE_EXAMPLES=OFF \
-DLLVM_INCLUDE_TESTS=OFF \
-DLLVM_INCLUDE_TOOLS=OFF \
-DLLVM_USE_CRT_RELEASE=${LLVM_CRT} \
..
-DLLVM_USE_CRT_RELEASE=${LLVM_CRT}
cmake --build . --config Release --target install
+19 -17
View File
@@ -4,34 +4,36 @@ set -x
brew update
brew install bash gnu-getopt # for CI scripts
brew install cmake
brew install ilmbase
brew install openexr@2
brew install boost
brew install boost-python3 # also installs the dependent python version
brew install tbb@2020
brew install zlib
brew install c-blosc
brew install cmake
brew install glfw
brew install googletest
brew install jq # for trivial parsing of brew json
brew install openexr
brew install pybind11 # also installs the dependent python version
brew install tbb
brew install zlib
brew install jemalloc
# Alias python version installed by boost-python3 to path
py_version=$(brew info boost-python3 --json | \
# Alias python version installed by pybind11 to path
py_version=$(brew info pybind11 --json | \
jq -cr '.[].dependencies[] | select(. | startswith("python"))')
echo "Using python $py_version"
# export for subsequent action steps (note, not exported for this env)
echo "Python_ROOT_DIR=/usr/local/opt/$py_version" >> $GITHUB_ENV
echo "/usr/local/opt/$py_version/bin" >> $GITHUB_PATH
# Export OpenEXR paths which are no longer installed to /usr/local (as v2.x is deprecated)
echo "IlmBase_ROOT=/usr/local/opt/ilmbase" >> $GITHUB_ENV
echo "OpenEXR_ROOT=/usr/local/opt/openexr@2" >> $GITHUB_ENV
echo "/usr/local/opt/openexr@2/bin" >> $GITHUB_PATH
# Export TBB paths which are no longer installed to /usr/local (as v2020 is deprecated)
echo "TBB_ROOT=/usr/local/opt/tbb@2020" >> $GITHUB_ENV
echo "/usr/local/opt/tbb@2020/bin" >> $GITHUB_PATH
# use gnu-getopt
echo "/usr/local/opt/gnu-getopt/bin" >> $GITHUB_PATH
LLVM_VERSION=$1
if [ ! -z "$LLVM_VERSION" ]; then
if [ "$LLVM_VERSION" == "latest" ]; then
brew install llvm
brew install cppunit
else
brew install llvm@$LLVM_VERSION
brew install cppunit
fi
fi
-26
View File
@@ -1,26 +0,0 @@
#!/usr/bin/env bash
# Download and install deps from homebrew on macos
LLVM_VERSION=$1
if [ -z $LLVM_VERSION ]; then
echo "No LLVM version provided for LLVM installation"
exit -1
fi
brew update
brew install bash gnu-getopt # for CI scripts
brew install cmake
brew install boost
brew install cppunit
brew install c-blosc
brew install tbb@2020
brew install llvm@$LLVM_VERSION
brew install zlib
# Export TBB paths which are no longer installed to /usr/local (as v2020 is deprecated)
echo "TBB_ROOT=/usr/local/opt/tbb@2020" >> $GITHUB_ENV
echo "/usr/local/opt/tbb@2020/bin" >> $GITHUB_PATH
# use gnu-getopt
echo "/usr/local/opt/gnu-getopt/bin" >> $GITHUB_PATH
+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
set -ex
PYBIND11_VERSION="$1"
INSTALL_ROOT="$2"
CMAKE_EXTRA=()
if [ ! -z "${INSTALL_ROOT}" ]; then
CMAKE_EXTRA+=("-DCMAKE_INSTALL_PREFIX=${INSTALL_ROOT}")
fi
git clone https://github.com/pybind/pybind11.git
cd pybind11
if [ "$PYBIND11_VERSION" != "latest" ]; then
git checkout tags/v${PYBIND11_VERSION} -b v${PYBIND11_VERSION}
fi
mkdir build
cd build
cmake \
-DPYBIND11_TEST=OFF \
"${CMAKE_EXTRA[@]}" \
..
make -j8
make install
+3 -2
View File
@@ -3,5 +3,6 @@
set -ex
vcpkg update
vcpkg install zlib libpng openexr tbb gtest blosc glfw3 glew \
boost-iostreams boost-any boost-uuid boost-interprocess boost-algorithm
vcpkg install zlib libpng openexr tbb gtest cppunit blosc glfw3 glew python3 jemalloc \
boost-iostreams boost-interprocess boost-algorithm pybind11 \
--clean-after-build
+4 -1
View File
@@ -25,11 +25,13 @@ $CUDA_KNOWN_URLS = @{
"11.2.0" = "https://developer.download.nvidia.com/compute/cuda/11.2.0/network_installers/cuda_11.2.0_win10_network.exe";
"11.2.1" = "https://developer.download.nvidia.com/compute/cuda/11.2.1/network_installers/cuda_11.2.1_win10_network.exe";
"11.2.2" = "https://developer.download.nvidia.com/compute/cuda/11.2.2/network_installers/cuda_11.2.2_win10_network.exe";
"11.3.0" = "https://developer.download.nvidia.com/compute/cuda/11.3.0/network_installers/cuda_11.3.0_win10_network.exe"
"11.3.0" = "https://developer.download.nvidia.com/compute/cuda/11.3.0/network_installers/cuda_11.3.0_win10_network.exe";
"11.6.2" = "https://developer.download.nvidia.com/compute/cuda/11.6.2/network_installers/cuda_11.6.2_windows_network.exe"
}
# @todo - change this to be based on _MSC_VER intead, or invert it to be CUDA keyed instead?
$VISUAL_STUDIO_MIN_CUDA = @{
"2022" = "11.6";
"2019" = "10.1";
"2017" = "10.0"; # Depends on which version of 2017! 9.0 to 10.0 depending on version
"2015" = "8.0"; # might support older, unsure.
@@ -43,6 +45,7 @@ $CUDA_PACKAGES_IN = @(
"curand_dev";
"nvrtc_dev";
"cudart";
"thrust";
)
+1 -1
View File
@@ -8,7 +8,7 @@ set -e
# the expected VDB installation
cmakelists="
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.18)
project(TestInstall LANGUAGES CXX)
find_package(OpenVDB REQUIRED COMPONENTS openvdb)
add_executable(test_vdb_print \"../openvdb_cmd/vdb_print/main.cc\")
+73 -4
View File
@@ -88,7 +88,7 @@ may be provided to tell this module where to look.
#]=======================================================================]
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.18)
include(GNUInstallDirs)
mark_as_advanced(
@@ -191,10 +191,12 @@ list(APPEND _BLOSC_LIBRARYDIR_SEARCH_DIRS
# Library suffix handling
set(_BLOSC_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(_BLOSC_ORIG_CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES})
if(MSVC)
if(BLOSC_USE_STATIC_LIBS)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
set(CMAKE_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES};lib")
endif()
else()
if(BLOSC_USE_STATIC_LIBS)
@@ -247,7 +249,9 @@ endforeach()
# Reset library suffix
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_BLOSC_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
set(CMAKE_FIND_LIBRARY_PREFIXES ${_BLOSC_ORIG_CMAKE_FIND_LIBRARY_PREFIXES})
unset(_BLOSC_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES)
unset(_BLOSC_ORIG_CMAKE_FIND_LIBRARY_PREFIXES)
if(Blosc_LIBRARY_DEBUG AND Blosc_LIBRARY_RELEASE)
# if the generator is multi-config or if CMAKE_BUILD_TYPE is set for
@@ -376,9 +380,74 @@ if(NOT TARGET Blosc::blosc)
set_target_properties(Blosc::blosc PROPERTIES
INTERFACE_LINK_DIRECTORIES
"\$<\$<CONFIG:Release>:${Blosc_RELEASE_LIBRARY_DIRS}>;\$<\$<CONFIG:Debug>:${Blosc_DEBUG_LIBRARY_DIRS}>")
target_link_libraries(Blosc::blosc INTERFACE
$<$<CONFIG:Release>:lz4;snappy;zlib;zstd>
$<$<CONFIG:Debug>:lz4d;snappyd;zlibd;zstd>)
set(BLOSC_EXTERNAL_LIBRARIES lz4 snappy zlib zstd)
foreach(BLOSC_EXTERNAL_LIB ${BLOSC_EXTERNAL_LIBRARIES})
foreach(BUILD_TYPE ${BLOSC_BUILD_TYPES})
set(_BLOSC_CMAKE_IGNORE_PATH ${CMAKE_IGNORE_PATH})
if(VCPKG_TOOLCHAIN)
if(BUILD_TYPE STREQUAL RELEASE)
list(APPEND CMAKE_IGNORE_PATH ${Blosc_DEBUG_LIBRARY_DIRS})
else()
list(APPEND CMAKE_IGNORE_PATH ${Blosc_RELEASE_LIBRARY_DIRS})
endif()
endif()
find_library(${BLOSC_EXTERNAL_LIB}_LIBRARY_${BUILD_TYPE} ${BLOSC_EXTERNAL_LIB}
${_FIND_BLOSC_ADDITIONAL_OPTIONS}
PATHS ${_BLOSC_LIBRARYDIR_SEARCH_DIRS}
PATH_SUFFIXES ${CMAKE_INSTALL_LIBDIR} lib64 lib)
if(NOT ${BLOSC_EXTERNAL_LIB}_LIBRARY_${BUILD_TYPE})
if(BUILD_TYPE STREQUAL DEBUG)
find_library(${BLOSC_EXTERNAL_LIB}_LIBRARY_${BUILD_TYPE} "${BLOSC_EXTERNAL_LIB}d"
${_FIND_BLOSC_ADDITIONAL_OPTIONS}
PATHS ${_BLOSC_LIBRARYDIR_SEARCH_DIRS}
PATH_SUFFIXES ${CMAKE_INSTALL_LIBDIR} lib64 lib)
endif()
endif()
set(CMAKE_IGNORE_PATH ${_BLOSC_CMAKE_IGNORE_PATH})
endforeach()
if(${BLOSC_EXTERNAL_LIB}_LIBRARY_DEBUG AND ${BLOSC_EXTERNAL_LIB}_LIBRARY_RELEASE)
# if the generator is multi-config or if CMAKE_BUILD_TYPE is set for
# single-config generators, set optimized and debug libraries
get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(_isMultiConfig OR CMAKE_BUILD_TYPE)
set(${BLOSC_EXTERNAL_LIB}_LIBRARY optimized ${${BLOSC_EXTERNAL_LIB}_LIBRARY_RELEASE} debug ${${BLOSC_EXTERNAL_LIB}_LIBRARY_DEBUG})
else()
# For single-config generators where CMAKE_BUILD_TYPE has no value,
# just use the release libraries
set(${BLOSC_EXTERNAL_LIB}_LIBRARY ${${BLOSC_EXTERNAL_LIB}_LIBRARY_RELEASE})
endif()
# FIXME: This probably should be set for both cases
set(${BLOSC_EXTERNAL_LIB}_LIBRARIES optimized ${${BLOSC_EXTERNAL_LIB}_LIBRARY_RELEASE} debug ${${BLOSC_EXTERNAL_LIB}_LIBRARY_DEBUG})
endif()
# if only the release version was found, set the debug variable also to the release version
if(${BLOSC_EXTERNAL_LIB}_LIBRARY_RELEASE AND NOT ${BLOSC_EXTERNAL_LIB}_LIBRARY_DEBUG)
set(${BLOSC_EXTERNAL_LIB}_LIBRARY_DEBUG ${${BLOSC_EXTERNAL_LIB}_LIBRARY_RELEASE})
set(${BLOSC_EXTERNAL_LIB}_LIBRARY ${${BLOSC_EXTERNAL_LIB}_LIBRARY_RELEASE})
set(${BLOSC_EXTERNAL_LIB}_LIBRARIES ${${BLOSC_EXTERNAL_LIB}_LIBRARY_RELEASE})
endif()
# if only the debug version was found, set the release variable also to the debug version
if(${BLOSC_EXTERNAL_LIB}_LIBRARY_DEBUG AND NOT ${BLOSC_EXTERNAL_LIB}_LIBRARY_RELEASE)
set(${BLOSC_EXTERNAL_LIB}_LIBRARY_RELEASE ${${BLOSC_EXTERNAL_LIB}_LIBRARY_DEBUG})
set(${BLOSC_EXTERNAL_LIB}_LIBRARY ${${BLOSC_EXTERNAL_LIB}_LIBRARY_DEBUG})
set(${BLOSC_EXTERNAL_LIB}_LIBRARIES ${${BLOSC_EXTERNAL_LIB}_LIBRARY_DEBUG})
endif()
target_link_libraries(Blosc::blosc INTERFACE
$<$<CONFIG:Release>:${${BLOSC_EXTERNAL_LIB}_LIBRARY_RELEASE}>
$<$<CONFIG:Debug>:${${BLOSC_EXTERNAL_LIB}_LIBRARY_DEBUG}>)
endforeach()
endif()
endif()
+1 -1
View File
@@ -83,7 +83,7 @@ may be provided to tell this module where to look.
#]=======================================================================]
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.18)
include(GNUInstallDirs)
-447
View File
@@ -1,447 +0,0 @@
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: MPL-2.0
#
#[=======================================================================[.rst:
FindIlmBase
-----------
Find IlmBase include dirs and libraries
Use this module by invoking find_package with the form::
find_package(IlmBase
[version] [EXACT] # Minimum or EXACT version
[REQUIRED] # Fail with error if IlmBase is not found
[COMPONENTS <libs>...] # IlmBase libraries by their canonical name
# e.g. "Half" for "libHalf"
)
IMPORTED Targets
^^^^^^^^^^^^^^^^
``IlmBase::Half``
The Half library target.
``IlmBase::Iex``
The Iex library target.
``IlmBase::IexMath``
The IexMath library target.
``IlmBase::IlmThread``
The IlmThread library target.
``IlmBase::Imath``
The Imath library target.
Result Variables
^^^^^^^^^^^^^^^^
This will define the following variables:
``IlmBase_FOUND``
True if the system has the IlmBase library.
``IlmBase_VERSION``
The version of the IlmBase library which was found.
``IlmBase_INCLUDE_DIRS``
Include directories needed to use IlmBase.
``IlmBase_RELEASE_LIBRARIES``
Libraries needed to link to the release version of IlmBase.
``IlmBase_RELEASE_LIBRARY_DIRS``
IlmBase release library directories.
``IlmBase_DEBUG_LIBRARIES``
Libraries needed to link to the debug version of IlmBase.
``IlmBase_DEBUG_LIBRARY_DIRS``
IlmBase debug library directories.
``IlmBase_{COMPONENT}_FOUND``
True if the system has the named IlmBase component.
Deprecated - use [RELEASE|DEBUG] variants:
``IlmBase_LIBRARIES``
Libraries needed to link to IlmBase.
``IlmBase_LIBRARY_DIRS``
IlmBase library directories.
Cache Variables
^^^^^^^^^^^^^^^
The following cache variables may also be set:
``IlmBase_INCLUDE_DIR``
The directory containing ``IlmBase/config-auto.h``.
``IlmBase_{COMPONENT}_LIBRARY``
Individual component libraries for IlmBase. may include target_link_libraries() debug/optimized keywords.
``IlmBase_{COMPONENT}_LIBRARY_RELEASE``
Individual component libraries for IlmBase release
``IlmBase_{COMPONENT}_LIBRARY_DEBUG``
Individual component libraries for IlmBase debug
Hints
^^^^^
Instead of explicitly setting the cache variables, the following variables
may be provided to tell this module where to look.
``IlmBase_ROOT``
Preferred installation prefix.
``ILMBASE_INCLUDEDIR``
Preferred include directory e.g. <prefix>/include
``ILMBASE_LIBRARYDIR``
Preferred library directory e.g. <prefix>/lib
``ILMBASE_DEBUG_SUFFIX``
Suffix of the debug version of ilmbase libs. Defaults to "_d".
``SYSTEM_LIBRARY_PATHS``
Global list of library paths intended to be searched by and find_xxx call
``ILMBASE_USE_STATIC_LIBS``
Only search for static ilmbase libraries
``DISABLE_CMAKE_SEARCH_PATHS``
Disable CMakes default search paths for find_xxx calls in this module
#]=======================================================================]
cmake_minimum_required(VERSION 3.15)
include(GNUInstallDirs)
mark_as_advanced(
IlmBase_INCLUDE_DIR
IlmBase_LIBRARY
)
set(_FIND_ILMBASE_ADDITIONAL_OPTIONS "")
if(DISABLE_CMAKE_SEARCH_PATHS)
set(_FIND_ILMBASE_ADDITIONAL_OPTIONS NO_DEFAULT_PATH)
endif()
set(_ILMBASE_COMPONENT_LIST
Half
Iex
IexMath
IlmThread
Imath
)
if(IlmBase_FIND_COMPONENTS)
set(ILMBASE_COMPONENTS_PROVIDED TRUE)
set(_IGNORED_COMPONENTS "")
foreach(COMPONENT ${IlmBase_FIND_COMPONENTS})
if(NOT ${COMPONENT} IN_LIST _ILMBASE_COMPONENT_LIST)
list(APPEND _IGNORED_COMPONENTS ${COMPONENT})
endif()
endforeach()
if(_IGNORED_COMPONENTS)
message(STATUS "Ignoring unknown components of IlmBase:")
foreach(COMPONENT ${_IGNORED_COMPONENTS})
message(STATUS " ${COMPONENT}")
endforeach()
list(REMOVE_ITEM IlmBase_FIND_COMPONENTS ${_IGNORED_COMPONENTS})
endif()
else()
set(ILMBASE_COMPONENTS_PROVIDED FALSE)
set(IlmBase_FIND_COMPONENTS ${_ILMBASE_COMPONENT_LIST})
endif()
# Set _ILMBASE_ROOT based on a user provided root var. Xxx_ROOT and ENV{Xxx_ROOT}
# are prioritised over the legacy capitalized XXX_ROOT variables for matching
# CMake 3.12 behaviour
# @todo deprecate -D and ENV ILMBASE_ROOT from CMake 3.12
if(IlmBase_ROOT)
set(_ILMBASE_ROOT ${IlmBase_ROOT})
elseif(DEFINED ENV{IlmBase_ROOT})
set(_ILMBASE_ROOT $ENV{IlmBase_ROOT})
elseif(ILMBASE_ROOT)
set(_ILMBASE_ROOT ${ILMBASE_ROOT})
elseif(DEFINED ENV{ILMBASE_ROOT})
set(_ILMBASE_ROOT $ENV{ILMBASE_ROOT})
endif()
# Additionally try and use pkconfig to find IlmBase
if(USE_PKGCONFIG)
if(NOT DEFINED PKG_CONFIG_FOUND)
find_package(PkgConfig)
endif()
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_IlmBase QUIET ilmbase)
endif()
endif()
# ------------------------------------------------------------------------
# Search for IlmBase include DIR
# ------------------------------------------------------------------------
set(_ILMBASE_INCLUDE_SEARCH_DIRS "")
list(APPEND _ILMBASE_INCLUDE_SEARCH_DIRS
${ILMBASE_INCLUDEDIR}
${_ILMBASE_ROOT}
${PC_IlmBase_INCLUDEDIR}
${SYSTEM_LIBRARY_PATHS}
)
# Look for a standard IlmBase header file.
find_path(IlmBase_INCLUDE_DIR IlmBaseConfig.h
${_FIND_ILMBASE_ADDITIONAL_OPTIONS}
PATHS ${_ILMBASE_INCLUDE_SEARCH_DIRS}
PATH_SUFFIXES ${CMAKE_INSTALL_INCLUDEDIR}/OpenEXR include/OpenEXR OpenEXR
)
if(EXISTS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h")
# Get the ILMBASE version information from the config header
file(STRINGS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h"
_ilmbase_version_major_string REGEX "#define ILMBASE_VERSION_MAJOR "
)
string(REGEX REPLACE "#define ILMBASE_VERSION_MAJOR" ""
_ilmbase_version_major_string "${_ilmbase_version_major_string}"
)
string(STRIP "${_ilmbase_version_major_string}" IlmBase_VERSION_MAJOR)
file(STRINGS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h"
_ilmbase_version_minor_string REGEX "#define ILMBASE_VERSION_MINOR "
)
string(REGEX REPLACE "#define ILMBASE_VERSION_MINOR" ""
_ilmbase_version_minor_string "${_ilmbase_version_minor_string}"
)
string(STRIP "${_ilmbase_version_minor_string}" IlmBase_VERSION_MINOR)
unset(_ilmbase_version_major_string)
unset(_ilmbase_version_minor_string)
set(IlmBase_VERSION ${IlmBase_VERSION_MAJOR}.${IlmBase_VERSION_MINOR})
endif()
# ------------------------------------------------------------------------
# Search for ILMBASE lib DIR
# ------------------------------------------------------------------------
if(NOT DEFINED ILMBASE_DEBUG_SUFFIX)
set(ILMBASE_DEBUG_SUFFIX _d)
endif()
set(_ILMBASE_LIBRARYDIR_SEARCH_DIRS "")
# Append to _ILMBASE_LIBRARYDIR_SEARCH_DIRS in priority order
list(APPEND _ILMBASE_LIBRARYDIR_SEARCH_DIRS
${ILMBASE_LIBRARYDIR}
${_ILMBASE_ROOT}
${PC_IlmBase_LIBDIR}
${SYSTEM_LIBRARY_PATHS}
)
set(IlmBase_LIB_COMPONENTS "")
list(APPEND ILM_BUILD_TYPES RELEASE DEBUG)
foreach(COMPONENT ${IlmBase_FIND_COMPONENTS})
foreach(BUILD_TYPE ${ILM_BUILD_TYPES})
set(_TMP_SUFFIX "")
if(BUILD_TYPE STREQUAL DEBUG)
set(_TMP_SUFFIX ${ILMBASE_DEBUG_SUFFIX})
endif()
set(_IlmBase_Version_Suffix "-${IlmBase_VERSION_MAJOR}_${IlmBase_VERSION_MINOR}")
set(_ILMBASE_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
if(WIN32)
if(ILMBASE_USE_STATIC_LIBS)
set(CMAKE_FIND_LIBRARY_SUFFIXES "${_TMP_SUFFIX}.lib")
endif()
list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES "${_IlmBase_Version_Suffix}${_TMP_SUFFIX}.lib")
else()
if(ILMBASE_USE_STATIC_LIBS)
set(CMAKE_FIND_LIBRARY_SUFFIXES "${_TMP_SUFFIX}.a")
else()
if(APPLE)
list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES "${_IlmBase_Version_Suffix}${_TMP_SUFFIX}.dylib")
else()
list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES "${_IlmBase_Version_Suffix}${_TMP_SUFFIX}.so")
endif()
endif()
list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES "${_IlmBase_Version_Suffix}${_TMP_SUFFIX}.a")
endif()
# Find the lib
find_library(IlmBase_${COMPONENT}_LIBRARY_${BUILD_TYPE} ${COMPONENT}
${_FIND_ILMBASE_ADDITIONAL_OPTIONS}
PATHS ${_ILMBASE_LIBRARYDIR_SEARCH_DIRS}
PATH_SUFFIXES ${CMAKE_INSTALL_LIBDIR} lib64 lib
)
if(EXISTS ${IlmBase_${COMPONENT}_LIBRARY_${BUILD_TYPE}})
list(APPEND IlmBase_LIB_COMPONENTS ${IlmBase_${COMPONENT}_LIBRARY_${BUILD_TYPE}})
list(APPEND IlmBase_LIB_COMPONENTS_${BUILD_TYPE} ${IlmBase_${COMPONENT}_LIBRARY_${BUILD_TYPE}})
endif()
# Reset library suffix
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_ILMBASE_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
unset(_ILMBASE_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES)
unset(_IlmBase_Version_Suffix)
unset(_TMP_SUFFIX)
endforeach()
if(IlmBase_${COMPONENT}_LIBRARY_DEBUG AND IlmBase_${COMPONENT}_LIBRARY_RELEASE)
# if the generator is multi-config or if CMAKE_BUILD_TYPE is set for
# single-config generators, set optimized and debug libraries
get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(_isMultiConfig OR CMAKE_BUILD_TYPE)
set(IlmBase_${COMPONENT}_LIBRARY optimized ${IlmBase_${COMPONENT}_LIBRARY_RELEASE} debug ${IlmBase_${COMPONENT}_LIBRARY_DEBUG})
else()
# For single-config generators where CMAKE_BUILD_TYPE has no value,
# just use the release libraries
set(IlmBase_${COMPONENT}_LIBRARY ${IlmBase_${COMPONENT}_LIBRARY_RELEASE})
endif()
# FIXME: This probably should be set for both cases
set(IlmBase_${COMPONENT}_LIBRARIES optimized ${IlmBase_${COMPONENT}_LIBRARY_RELEASE} debug ${IlmBase_${COMPONENT}_LIBRARY_DEBUG})
endif()
# if only the release version was found, set the debug variable also to the release version
if(IlmBase_${COMPONENT}_LIBRARY_RELEASE AND NOT IlmBase_${COMPONENT}_LIBRARY_DEBUG)
set(IlmBase_${COMPONENT}_LIBRARY_DEBUG ${IlmBase_${COMPONENT}_LIBRARY_RELEASE})
set(IlmBase_${COMPONENT}_LIBRARY ${IlmBase_${COMPONENT}_LIBRARY_RELEASE})
set(IlmBase_${COMPONENT}_LIBRARIES ${IlmBase_${COMPONENT}_LIBRARY_RELEASE})
endif()
# if only the debug version was found, set the release variable also to the debug version
if(IlmBase_${COMPONENT}_LIBRARY_DEBUG AND NOT IlmBase_${COMPONENT}_LIBRARY_RELEASE)
set(IlmBase_${COMPONENT}_LIBRARY_RELEASE ${IlmBase_${COMPONENT}_LIBRARY_DEBUG})
set(IlmBase_${COMPONENT}_LIBRARY ${IlmBase_${COMPONENT}_LIBRARY_DEBUG})
set(IlmBase_${COMPONENT}_LIBRARIES ${IlmBase_${COMPONENT}_LIBRARY_DEBUG})
endif()
# If the debug & release library ends up being the same, omit the keywords
if("${IlmBase_${COMPONENT}_LIBRARY_RELEASE}" STREQUAL "${IlmBase_${COMPONENT}_LIBRARY_DEBUG}")
set(IlmBase_${COMPONENT}_LIBRARY ${IlmBase_${COMPONENT}_LIBRARY_RELEASE} )
set(IlmBase_${COMPONENT}_LIBRARIES ${IlmBase_${COMPONENT}_LIBRARY_RELEASE} )
endif()
if(IlmBase_${COMPONENT}_LIBRARY)
set(IlmBase_${COMPONENT}_FOUND TRUE)
else()
set(IlmBase_${COMPONENT}_FOUND FALSE)
endif()
endforeach()
# ------------------------------------------------------------------------
# Cache and set ILMBASE_FOUND
# ------------------------------------------------------------------------
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(IlmBase
FOUND_VAR IlmBase_FOUND
REQUIRED_VARS
IlmBase_INCLUDE_DIR
IlmBase_LIB_COMPONENTS
VERSION_VAR IlmBase_VERSION
HANDLE_COMPONENTS
)
if(NOT IlmBase_FOUND)
if(IlmBase_FIND_REQUIRED)
message(FATAL_ERROR "Unable to find IlmBase")
endif()
return()
endif()
# Partition release/debug lib vars
set(IlmBase_RELEASE_LIBRARIES "")
set(IlmBase_RELEASE_LIBRARY_DIRS "")
set(IlmBase_DEBUG_LIBRARIES "")
set(IlmBase_DEBUG_LIBRARY_DIRS "")
foreach(LIB ${IlmBase_LIB_COMPONENTS_RELEASE})
get_filename_component(_ILM_LIBDIR ${LIB} DIRECTORY)
list(APPEND IlmBase_RELEASE_LIBRARIES ${LIB})
list(APPEND IlmBase_RELEASE_LIBRARY_DIRS ${_ILM_LIBDIR})
endforeach()
foreach(LIB ${IlmBase_LIB_COMPONENTS_DEBUG})
get_filename_component(_ILM_LIBDIR ${LIB} DIRECTORY)
list(APPEND IlmBase_DEBUG_LIBRARIES ${LIB})
list(APPEND IlmBase_DEBUG_LIBRARY_DIRS ${_ILM_LIBDIR})
endforeach()
list(REMOVE_DUPLICATES IlmBase_RELEASE_LIBRARY_DIRS)
list(REMOVE_DUPLICATES IlmBase_DEBUG_LIBRARY_DIRS)
set(IlmBase_LIBRARIES ${IlmBase_RELEASE_LIBRARIES})
set(IlmBase_LIBRARY_DIRS ${IlmBase_RELEASE_LIBRARY_DIRS})
# We have to add both include and include/OpenEXR to the include
# path in case OpenEXR and IlmBase are installed separately.
#
# Make sure we get the absolute path to avoid issues where
# /usr/include/OpenEXR/../ is picked up and passed to gcc from cmake
# which won't correctly compute /usr/include as an implicit system
# dir if the path is relative:
#
# https://github.com/AcademySoftwareFoundation/openvdb/issues/632
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129
set(_IlmBase_Parent_Dir "")
get_filename_component(_IlmBase_Parent_Dir
${IlmBase_INCLUDE_DIR}/../ ABSOLUTE)
set(IlmBase_INCLUDE_DIRS)
list(APPEND IlmBase_INCLUDE_DIRS
${_IlmBase_Parent_Dir}
${IlmBase_INCLUDE_DIR}
)
unset(_IlmBase_Parent_Dir)
# Configure imported targets
foreach(COMPONENT ${IlmBase_FIND_COMPONENTS})
# Configure lib type. If XXX_USE_STATIC_LIBS, we always assume a static
# lib is in use. If win32, we can't mark the import .libs as shared, so
# these are always marked as UNKNOWN. Otherwise, infer from extension.
set(ILMBASE_${COMPONENT}_LIB_TYPE UNKNOWN)
if(ILMBASE_USE_STATIC_LIBS)
set(ILMBASE_${COMPONENT}_LIB_TYPE STATIC)
elseif(UNIX)
get_filename_component(_ILMBASE_${COMPONENT}_EXT ${IlmBase_${COMPONENT}_LIBRARY_RELEASE} EXT)
if(${_ILMBASE_${COMPONENT}_EXT} STREQUAL ".a")
set(ILMBASE_${COMPONENT}_LIB_TYPE STATIC)
elseif(${_ILMBASE_${COMPONENT}_EXT} STREQUAL ".so" OR
${_ILMBASE_${COMPONENT}_EXT} STREQUAL ".dylib")
set(ILMBASE_${COMPONENT}_LIB_TYPE SHARED)
endif()
endif()
set(IlmBase_${COMPONENT}_DEFINITIONS)
# Add the OPENEXR_DLL define if the library is not static on WIN32
if(WIN32)
if(NOT ILMBASE_${COMPONENT}_LIB_TYPE STREQUAL STATIC)
list(APPEND IlmBase_${COMPONENT}_DEFINITIONS OPENEXR_DLL)
endif()
endif()
if(NOT TARGET IlmBase::${COMPONENT})
add_library(IlmBase::${COMPONENT} ${ILMBASE_${COMPONENT}_LIB_TYPE} IMPORTED)
set_target_properties(IlmBase::${COMPONENT} PROPERTIES
INTERFACE_COMPILE_OPTIONS "${PC_IlmBase_CFLAGS_OTHER}"
INTERFACE_COMPILE_DEFINITIONS "${IlmBase_${COMPONENT}_DEFINITIONS}"
INTERFACE_INCLUDE_DIRECTORIES "${IlmBase_INCLUDE_DIRS}")
# Standard location
set_target_properties(IlmBase::${COMPONENT} PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${IlmBase_${COMPONENT}_LIBRARY}")
# Release location
if(EXISTS "${IlmBase_${COMPONENT}_LIBRARY_RELEASE}")
set_property(TARGET IlmBase::${COMPONENT} APPEND PROPERTY
IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(IlmBase::${COMPONENT} PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
IMPORTED_LOCATION_RELEASE "${IlmBase_${COMPONENT}_LIBRARY_RELEASE}")
endif()
# Debug location
if(EXISTS "${IlmBase_${COMPONENT}_LIBRARY_DEBUG}")
set_property(TARGET IlmBase::${COMPONENT} APPEND PROPERTY
IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(IlmBase::${COMPONENT} PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX"
IMPORTED_LOCATION_DEBUG "${IlmBase_${COMPONENT}_LIBRARY_DEBUG}")
endif()
endif()
endforeach()
+1 -1
View File
@@ -64,7 +64,7 @@ may be provided to tell this module where to look.
#]=======================================================================]
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.18)
include(GNUInstallDirs)
+1 -1
View File
@@ -87,7 +87,7 @@ may be provided to tell this module where to look.
#]=======================================================================]
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.18)
include(GNUInstallDirs)
+1 -1
View File
@@ -93,7 +93,7 @@ may be provided to tell this module where to look.
#]=======================================================================]
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.18)
include(GNUInstallDirs)
+27 -32
View File
@@ -64,6 +64,8 @@ This will define the following variables:
True if the OpenVDB Library has been built with log4cplus support
``OpenVDB_USES_IMATH_HALF``
True if the OpenVDB Library has been built with Imath half support
``OpenVDB_USES_DELAYED_LOADING``
True if the OpenVDB Library has been built with delayed-loading
``OpenVDB_ABI``
Set if this module was able to determine the ABI number the located
OpenVDB Library was built against. Unset otherwise.
@@ -107,7 +109,7 @@ may be provided to tell this module where to look.
#]=======================================================================]
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.18)
include(GNUInstallDirs)
@@ -392,6 +394,9 @@ foreach(COMPONENT ${OpenVDB_FIND_COMPONENTS})
elseif(${COMPONENT} STREQUAL "openvdb_je")
# alias to the result of openvdb which should be handled first
set(OpenVDB_${COMPONENT}_LIBRARY ${OpenVDB_openvdb_LIBRARY})
elseif(${COMPONENT} STREQUAL "nanovdb")
# alias to the result of openvdb which should be handled first
set(OpenVDB_${COMPONENT}_LIBRARY ${OpenVDB_openvdb_LIBRARY})
else()
find_library(OpenVDB_${COMPONENT}_LIBRARY ${LIB_NAME}
${_FIND_OPENVDB_ADDITIONAL_OPTIONS}
@@ -486,16 +491,6 @@ endif()
# Add standard dependencies
find_package(TBB REQUIRED COMPONENTS tbb)
if(NOT OPENVDB_USE_STATIC_LIBS AND NOT Boost_USE_STATIC_LIBS)
# @note Both of these must be set for Boost 1.70 (VFX2020) to link against
# boost shared libraries (more specifically libraries built with -fPIC).
# http://boost.2283326.n4.nabble.com/CMake-config-scripts-broken-in-1-70-td4708957.html
# https://github.com/boostorg/boost_install/commit/160c7cb2b2c720e74463865ef0454d4c4cd9ae7c
set(BUILD_SHARED_LIBS ON)
set(Boost_USE_STATIC_LIBS OFF)
endif()
find_package(Boost REQUIRED COMPONENTS iostreams)
# Add deps for pyopenvdb
@@ -555,6 +550,7 @@ set(OpenVDB_USES_BLOSC ${USE_BLOSC})
set(OpenVDB_USES_ZLIB ${USE_ZLIB})
set(OpenVDB_USES_LOG4CPLUS ${USE_LOG4CPLUS})
set(OpenVDB_USES_IMATH_HALF ${USE_IMATH_HALF})
set(OpenVDB_USES_DELAYED_LOADING ${OPENVDB_USE_DELAYED_LOADING})
set(OpenVDB_DEFINITIONS)
if(WIN32)
@@ -587,6 +583,7 @@ if(_OPENVDB_HAS_NEW_VERSION_HEADER)
OPENVDB_GET_VERSION_DEFINE(${_OPENVDB_VERSION_HEADER} "OPENVDB_USE_IMATH_HALF" OpenVDB_USES_IMATH_HALF)
OPENVDB_GET_VERSION_DEFINE(${_OPENVDB_VERSION_HEADER} "OPENVDB_USE_BLOSC" OpenVDB_USES_BLOSC)
OPENVDB_GET_VERSION_DEFINE(${_OPENVDB_VERSION_HEADER} "OPENVDB_USE_ZLIB" OpenVDB_USES_ZLIB)
OPENVDB_GET_VERSION_DEFINE(${_OPENVDB_VERSION_HEADER} "OPENVDB_USE_DELAYED_LOADING" OpenVDB_USES_DELAYED_LOADING)
elseif(NOT OPENVDB_USE_STATIC_LIBS)
# Use GetPrerequisites to see which libraries this OpenVDB lib has linked to
# which we can query for optional deps. This basically runs ldd/otoll/objdump
@@ -633,6 +630,11 @@ elseif(NOT OPENVDB_USE_STATIC_LIBS)
if(NOT ${_HAS_DEP} EQUAL -1)
set(OpenVDB_USES_IMATH_HALF ON)
endif()
string(FIND ${PREREQUISITE} "boost_iostreams" _HAS_DEP)
if(NOT ${_HAS_DEP} EQUAL -1)
set(OpenVDB_USES_DELAYED_LOADING ON)
endif()
endforeach()
unset(_OPENVDB_PREREQUISITE_LIST)
@@ -651,19 +653,7 @@ if(OpenVDB_USES_LOG4CPLUS)
endif()
if(OpenVDB_USES_IMATH_HALF)
find_package(Imath CONFIG)
if (NOT TARGET Imath::Imath)
find_package(IlmBase REQUIRED COMPONENTS Half)
endif()
if(WIN32)
# @note OPENVDB_OPENEXR_STATICLIB is old functionality and should be removed
if(OPENEXR_USE_STATIC_LIBS OR
("${ILMBASE_LIB_TYPE}" STREQUAL "STATIC_LIBRARY") OR
("${IMATH_LIB_TYPE}" STREQUAL "STATIC_LIBRARY"))
list(APPEND OpenVDB_DEFINITIONS OPENVDB_OPENEXR_STATICLIB)
endif()
endif()
find_package(Imath REQUIRED CONFIG)
endif()
if(UNIX)
@@ -671,14 +661,19 @@ if(UNIX)
endif()
# Set deps. Note that the order here is important. If we're building against
# Houdini 17.5 we must include IlmBase deps first to ensure the users chosen
# Houdini we must include Imath deps first to ensure the users chosen
# namespaced headers are correctly prioritized. Otherwise other include paths
# from shared installs (including houdini) may pull in the wrong headers
set(_OPENVDB_VISIBLE_DEPENDENCIES Boost::iostreams)
set(_OPENVDB_VISIBLE_DEPENDENCIES "")
if(OpenVDB_USES_DELAYED_LOADING)
list(APPEND _OPENVDB_VISIBLE_DEPENDENCIES Boost::iostreams)
list(APPEND OpenVDB_DEFINITIONS OPENVDB_USE_DELAYED_LOADING)
endif()
if(OpenVDB_USES_IMATH_HALF)
list(APPEND _OPENVDB_VISIBLE_DEPENDENCIES $<TARGET_NAME_IF_EXISTS:IlmBase::Half> $<TARGET_NAME_IF_EXISTS:Imath::Imath>)
list(APPEND _OPENVDB_VISIBLE_DEPENDENCIES Imath::Imath)
endif()
if(OpenVDB_USES_LOG4CPLUS)
@@ -749,7 +744,7 @@ if(NOT TARGET OpenVDB::openvdb)
INTERFACE_INCLUDE_DIRECTORIES "${OpenVDB_INCLUDE_DIR}"
IMPORTED_LINK_DEPENDENT_LIBRARIES "${_OPENVDB_HIDDEN_DEPENDENCIES}" # non visible deps
INTERFACE_LINK_LIBRARIES "${_OPENVDB_VISIBLE_DEPENDENCIES}" # visible deps (headers)
INTERFACE_COMPILE_FEATURES cxx_std_14
INTERFACE_COMPILE_FEATURES cxx_std_17
)
endif()
@@ -772,7 +767,7 @@ if(OpenVDB_pyopenvdb_LIBRARY)
IMPORTED_LOCATION "${OpenVDB_pyopenvdb_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${OpenVDB_pyopenvdb_INCLUDE_DIR};${PYTHON_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "OpenVDB::openvdb;Boost::${BOOST_PYTHON_LIB};${PYTHON_LIBRARIES}"
INTERFACE_COMPILE_FEATURES cxx_std_14
INTERFACE_COMPILE_FEATURES cxx_std_17
)
endif()
endif()
@@ -786,7 +781,7 @@ if(OpenVDB_openvdb_houdini_LIBRARY)
IMPORTED_LOCATION "${OpenVDB_openvdb_houdini_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${OpenVDB_openvdb_houdini_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "OpenVDB::openvdb;Houdini"
INTERFACE_COMPILE_FEATURES cxx_std_14
INTERFACE_COMPILE_FEATURES cxx_std_17
)
endif()
endif()
@@ -816,7 +811,7 @@ if(OpenVDB_openvdb_ax_LIBRARY)
INTERFACE_INCLUDE_DIRECTORIES "${OpenVDB_openvdb_ax_INCLUDE_DIR}"
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${LLVM_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "OpenVDB::openvdb;${LLVM_LIBS}"
INTERFACE_COMPILE_FEATURES cxx_std_14
INTERFACE_COMPILE_FEATURES cxx_std_17
)
endif()
endif()
@@ -830,7 +825,7 @@ if(OpenVDB_nanovdb_LIBRARY)
IMPORTED_LOCATION "${OpenVDB_nanovdb_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${OpenVDB_nanovdb_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "OpenVDB::openvdb;"
INTERFACE_COMPILE_FEATURES cxx_std_14
INTERFACE_COMPILE_FEATURES cxx_std_17
)
endif()
endif()
+67 -30
View File
@@ -34,7 +34,7 @@ This will define the following variables:
``Tbb_FOUND``
True if the system has the Tbb library.
``Tbb_VERSION``
``Tbb_VERSION`` ``TBB_VERSION``
The version of the Tbb library which was found.
``Tbb_INCLUDE_DIRS``
Include directories needed to use Tbb.
@@ -93,7 +93,7 @@ may be provided to tell this module where to look.
#]=======================================================================]
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.18)
include(GNUInstallDirs)
@@ -162,51 +162,72 @@ list(APPEND _TBB_INCLUDE_SEARCH_DIRS
${SYSTEM_LIBRARY_PATHS}
)
# Look for a standard tbb header file.
find_path(Tbb_INCLUDE_DIR tbb/tbb_stddef.h
if(NOT Tbb_INCLUDE_DIR)
# Look for a legacy tbb header file.
find_path(Tbb_LEGACY_INCLUDE_DIR tbb/tbb_stddef.h
${_FIND_TBB_ADDITIONAL_OPTIONS}
PATHS ${_TBB_INCLUDE_SEARCH_DIRS}
PATH_SUFFIXES ${CMAKE_INSTALL_INCLUDEDIR} include
)
else()
set(Tbb_LEGACY_INCLUDE_DIR ${Tbb_INCLUDE_DIR})
endif()
# Look for a new tbb header installation
# From TBB 2021, tbb_stddef is removed and the directory include/tbb is
# simply an alias for include/oneapi/tbb. Try and find the version header
# in oneapi/tbb
find_path(Tbb_INCLUDE_DIR oneapi/tbb/version.h
${_FIND_TBB_ADDITIONAL_OPTIONS}
PATHS ${_TBB_INCLUDE_SEARCH_DIRS}
PATH_SUFFIXES ${CMAKE_INSTALL_INCLUDEDIR} include
)
set(_tbb_version_file "${Tbb_INCLUDE_DIR}/tbb/tbb_stddef.h")
set(_tbb_legacy_version_file "${Tbb_LEGACY_INCLUDE_DIR}/tbb/tbb_stddef.h")
set(_tbb_version_file "${Tbb_INCLUDE_DIR}/oneapi/tbb/version.h")
if(NOT EXISTS ${_tbb_version_file})
# From TBB 2021, tbb_stddef is removed and the directory include/tbb is
# simply an alias for include/oneapi/tbb. Try and find the version header
# in oneapi/tbb
find_path(Tbb_INCLUDE_DIR oneapi/tbb/version.h
${_FIND_TBB_ADDITIONAL_OPTIONS}
PATHS ${_TBB_INCLUDE_SEARCH_DIRS}
PATH_SUFFIXES ${CMAKE_INSTALL_INCLUDEDIR} include
)
set(_tbb_version_file "${Tbb_INCLUDE_DIR}/oneapi/tbb/version.h")
if(EXISTS ${_tbb_legacy_version_file})
if(EXISTS ${_tbb_version_file})
message(WARNING "
FindTBB located both an old and new tbb installation.
old: ${_tbb_legacy_version_file}
new: ${_tbb_version_file}
The NEWER versioned installation will be used. You can set TBB_INCLUDEDIR
to control FindTBB.cmake search, or explicitly set Tbb_INCLUDE_DIR to the
desired location.
")
else()
set(_tbb_version_file "${_tbb_legacy_version_file}")
set(Tbb_INCLUDE_DIR ${Tbb_LEGACY_INCLUDE_DIR} CACHE STRING "" FORCE)
endif()
endif()
if(EXISTS ${_tbb_version_file})
file(STRINGS ${_tbb_version_file}
_tbb_version_major_string REGEX "#define TBB_VERSION_MAJOR "
)
string(REGEX REPLACE "#define TBB_VERSION_MAJOR" ""
_tbb_version_major_string "${_tbb_version_major_string}"
)
file(STRINGS ${_tbb_version_file} _tbb_version_major_string REGEX "#define TBB_VERSION_MAJOR " )
string(REGEX REPLACE "#define TBB_VERSION_MAJOR" "" _tbb_version_major_string "${_tbb_version_major_string}")
string(STRIP "${_tbb_version_major_string}" Tbb_VERSION_MAJOR)
file(STRINGS ${_tbb_version_file}
_tbb_version_minor_string REGEX "#define TBB_VERSION_MINOR "
)
string(REGEX REPLACE "#define TBB_VERSION_MINOR" ""
_tbb_version_minor_string "${_tbb_version_minor_string}"
)
file(STRINGS ${_tbb_version_file} _tbb_version_minor_string REGEX "#define TBB_VERSION_MINOR ")
string(REGEX REPLACE "#define TBB_VERSION_MINOR" "" _tbb_version_minor_string "${_tbb_version_minor_string}")
string(STRIP "${_tbb_version_minor_string}" Tbb_VERSION_MINOR)
file(STRINGS ${_tbb_version_file} _tbb_binary_version_string REGEX "#define __TBB_BINARY_VERSION ")
string(REGEX REPLACE "#define __TBB_BINARY_VERSION" "" _tbb_binary_version_string "${_tbb_binary_version_string}")
string(STRIP "${_tbb_binary_version_string}" Tbb_BINARY_VERSION)
unset(_tbb_version_major_string)
unset(_tbb_version_minor_string)
unset(_tbb_binary_version_string)
# Set both for compatibility reasons, TBB's CONFIG files only set the latter
set(Tbb_VERSION ${Tbb_VERSION_MAJOR}.${Tbb_VERSION_MINOR})
set(TBB_VERSION ${Tbb_VERSION})
endif()
unset(_tbb_version_file)
unset(_tbb_legacy_version_file)
unset(Tbb_LEGACY_INCLUDE_DIR)
# ------------------------------------------------------------------------
# Search for TBB lib DIR
@@ -255,8 +276,22 @@ foreach(COMPONENT ${TBB_FIND_COMPONENTS})
find_library(Tbb_${COMPONENT}_LIBRARY_${BUILD_TYPE} ${_TBB_LIB_NAME}
${_FIND_TBB_ADDITIONAL_OPTIONS}
PATHS ${_TBB_LIBRARYDIR_SEARCH_DIRS}
PATH_SUFFIXES ${CMAKE_INSTALL_LIBDIR} lib64 lib
)
PATH_SUFFIXES ${CMAKE_INSTALL_LIBDIR} lib64 lib)
# If we didn't find the library, prepend Tbb_BINARY_VERSION to each possible
# component name and try again. As of TBB 2021, TBB decides to version some
# of its libraries on some of its platforms...
if(NOT Tbb_${COMPONENT}_LIBRARY_${BUILD_TYPE} AND Tbb_BINARY_VERSION)
set(_TBB_LIB_NAME "${COMPONENT}${Tbb_BINARY_VERSION}")
if(BUILD_TYPE STREQUAL DEBUG)
set(_TBB_LIB_NAME "${_TBB_LIB_NAME}${TBB_DEBUG_SUFFIX}")
endif()
find_library(Tbb_${COMPONENT}_LIBRARY_${BUILD_TYPE} ${_TBB_LIB_NAME}
${_FIND_TBB_ADDITIONAL_OPTIONS}
PATHS ${_TBB_LIBRARYDIR_SEARCH_DIRS}
PATH_SUFFIXES ${CMAKE_INSTALL_LIBDIR} lib64 lib)
endif()
# On Unix, TBB sometimes uses linker scripts instead of symlinks, so parse the linker script
# and correct the library name if so
@@ -426,7 +461,9 @@ foreach(COMPONENT ${TBB_FIND_COMPONENTS})
IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(TBB::${COMPONENT} PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
IMPORTED_LOCATION_RELEASE "${Tbb_${COMPONENT}_LIBRARY_RELEASE}")
IMPORTED_LOCATION_RELEASE "${Tbb_${COMPONENT}_LIBRARY_RELEASE}"
MAP_IMPORTED_CONFIG_MINSIZEREL Release
MAP_IMPORTED_CONFIG_RELWITHDEBINFO Release)
endif()
# Debug location
+8 -1
View File
@@ -47,7 +47,7 @@ The following variables may be provided to tell this module where to look.
# Find the glfw3 installation and use glfw's CMake to initialize
# the glfw lib
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.18)
set(_FIND_GLFW3_ADDITIONAL_OPTIONS "")
if(DISABLE_CMAKE_SEARCH_PATHS)
@@ -121,6 +121,13 @@ if(${CMAKE_VERSION} VERSION_LESS 3.19)
)
endif()
if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_GLFW_VERSION)
if(glfw3_VERSION VERSION_LESS ${FUTURE_MINIMUM_GLFW_VERSION})
message(DEPRECATION "Support for GLFW versions < ${FUTURE_MINIMUM_GLFW_VERSION} "
"is deprecated and will be removed.")
endif()
endif()
unset(glfw3_FIND_VERSION)
# GLFW 3.1 does not export INTERFACE_LINK_LIBRARIES so detect this
+69 -83
View File
@@ -49,8 +49,6 @@ overwrite user provided values.
``ZLIB_LIBRARY``
``OPENEXR_INCLUDEDIR``
``OPENEXR_LIBRARYDIR``
``ILMBASE_INCLUDEDIR``
``ILMBASE_LIBRARYDIR``
``TBB_INCLUDEDIR``
``TBB_LIBRARYDIR``
``BLOSC_INCLUDEDIR``
@@ -75,7 +73,7 @@ may be provided to tell this module where to look.
# Find the Houdini installation and use Houdini's CMake to initialize
# the Houdini lib
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.18)
# Include utility functions for version information
include(${CMAKE_CURRENT_LIST_DIR}/OpenVDBUtils.cmake)
@@ -290,7 +288,11 @@ endif()
# Jemalloc
if(NOT JEMALLOC_LIBRARYDIR)
# * On Mac OSX, linking against Jemalloc < 4.3.0 seg-faults with this error:
# malloc: *** malloc_zone_unregister() failed for 0xaddress
# As of Houdini 20, it still ships with Jemalloc 3.6.0, so don't expose it
# on Mac OSX (https://github.com/jemalloc/jemalloc/issues/420).
if(NOT APPLE AND NOT JEMALLOC_LIBRARYDIR)
set(JEMALLOC_LIBRARYDIR ${HOUDINI_LIB_DIR})
endif()
@@ -303,21 +305,10 @@ if(NOT OPENEXR_LIBRARYDIR)
set(OPENEXR_LIBRARYDIR ${HOUDINI_LIB_DIR})
endif()
# IlmBase
if(NOT ILMBASE_INCLUDEDIR)
set(ILMBASE_INCLUDEDIR ${HOUDINI_INCLUDE_DIR})
endif()
if(NOT ILMBASE_LIBRARYDIR)
set(ILMBASE_LIBRARYDIR ${HOUDINI_LIB_DIR})
endif()
# Boost - currently must be provided as VDB is not fully configured to
# use Houdini's namespaced hboost
# Versions of Houdini >= 17.5 have some namespaced libraries (IlmBase/OpenEXR).
# Add the required suffix as part of the cmake lib suffix searches
if(APPLE)
list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES "_sidefx.dylib")
elseif(UNIX)
@@ -333,87 +324,82 @@ endif()
# Explicitly configure the OpenVDB ABI version depending on the Houdini
# version.
if(Houdini_VERSION_MAJOR_MINOR VERSION_EQUAL 18.5)
set(OPENVDB_HOUDINI_ABI 7)
else()
find_file(_houdini_openvdb_version_file "openvdb/version.h"
PATHS ${HOUDINI_INCLUDE_DIR}
NO_DEFAULT_PATH)
if(_houdini_openvdb_version_file)
OPENVDB_VERSION_FROM_HEADER("${_houdini_openvdb_version_file}"
ABI OPENVDB_HOUDINI_ABI)
endif()
unset(_houdini_openvdb_version_file)
if(NOT OPENVDB_HOUDINI_ABI)
message(WARNING "Unknown version of Houdini, assuming OpenVDB ABI=${OpenVDB_MAJOR_VERSION}, "
"but if this not correct, the CMake flag -DOPENVDB_HOUDINI_ABI=<N> can override this value.")
set(OPENVDB_HOUDINI_ABI ${OpenVDB_MAJOR_VERSION})
endif()
find_file(_houdini_openvdb_version_file "openvdb/version.h"
PATHS ${HOUDINI_INCLUDE_DIR}
NO_DEFAULT_PATH)
if(_houdini_openvdb_version_file)
OPENVDB_VERSION_FROM_HEADER("${_houdini_openvdb_version_file}"
ABI OPENVDB_HOUDINI_ABI)
endif()
unset(_houdini_openvdb_version_file)
if(NOT OPENVDB_HOUDINI_ABI)
message(WARNING "Unknown version of Houdini, assuming OpenVDB ABI=${OpenVDB_MAJOR_VERSION}, "
"but if this not correct, the CMake flag -DOPENVDB_HOUDINI_ABI=<N> can override this value.")
set(OPENVDB_HOUDINI_ABI ${OpenVDB_MAJOR_VERSION})
endif()
# ------------------------------------------------------------------------
# Configure GCC CXX11 ABI
# Configure libstc++ CXX11 ABI
# ------------------------------------------------------------------------
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if((CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 5.1) OR
(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.1))
message(STATUS "GCC >= 5.1 detected. Configuring GCC CXX11 ABI for Houdini compatibility...")
if(UNIX AND NOT APPLE)
# Assume we're using libstdc++
message(STATUS "Configuring CXX11 ABI for Houdini compatibility...")
execute_process(COMMAND echo "#include <string>"
COMMAND ${CMAKE_CXX_COMPILER} "-x" "c++" "-E" "-dM" "-"
COMMAND grep "-F" "_GLIBCXX_USE_CXX11_ABI"
TIMEOUT 10
RESULT_VARIABLE QUERIED_GCC_CXX11_ABI_SUCCESS
OUTPUT_VARIABLE _GCC_CXX11_ABI)
execute_process(COMMAND echo "#include <string>"
COMMAND ${CMAKE_CXX_COMPILER} "-x" "c++" "-E" "-dM" "-"
COMMAND grep "-F" "_GLIBCXX_USE_CXX11_ABI"
TIMEOUT 10
RESULT_VARIABLE QUERIED_GCC_CXX11_ABI_SUCCESS
OUTPUT_VARIABLE _GCC_CXX11_ABI)
set(GLIBCXX_USE_CXX11_ABI "UNKNOWN")
set(GLIBCXX_USE_CXX11_ABI "UNKNOWN")
if(NOT QUERIED_GCC_CXX11_ABI_SUCCESS)
string(FIND ${_GCC_CXX11_ABI} "_GLIBCXX_USE_CXX11_ABI 0" GCC_OLD_CXX11_ABI)
string(FIND ${_GCC_CXX11_ABI} "_GLIBCXX_USE_CXX11_ABI 1" GCC_NEW_CXX11_ABI)
if(NOT (${GCC_OLD_CXX11_ABI} EQUAL -1))
set(GLIBCXX_USE_CXX11_ABI 0)
endif()
if(NOT (${GCC_NEW_CXX11_ABI} EQUAL -1))
set(GLIBCXX_USE_CXX11_ABI 1)
endif()
if(NOT QUERIED_GCC_CXX11_ABI_SUCCESS)
string(FIND ${_GCC_CXX11_ABI} "_GLIBCXX_USE_CXX11_ABI 0" GCC_OLD_CXX11_ABI)
string(FIND ${_GCC_CXX11_ABI} "_GLIBCXX_USE_CXX11_ABI 1" GCC_NEW_CXX11_ABI)
if(NOT (${GCC_OLD_CXX11_ABI} EQUAL -1))
set(GLIBCXX_USE_CXX11_ABI 0)
endif()
# Try and query the Houdini CXX11 ABI. Allow it to be provided by users to
# override this logic should Houdini's CMake ever change
if(NOT DEFINED HOUDINI_CXX11_ABI)
get_target_property(houdini_interface_compile_options
Houdini INTERFACE_COMPILE_OPTIONS)
set(HOUDINI_CXX11_ABI "UNKNOWN")
if("-D_GLIBCXX_USE_CXX11_ABI=0" IN_LIST houdini_interface_compile_options)
set(HOUDINI_CXX11_ABI 0)
elseif("-D_GLIBCXX_USE_CXX11_ABI=1" IN_LIST houdini_interface_compile_options)
set(HOUDINI_CXX11_ABI 1)
endif()
if(NOT (${GCC_NEW_CXX11_ABI} EQUAL -1))
set(GLIBCXX_USE_CXX11_ABI 1)
endif()
endif()
message(STATUS " GCC CXX11 ABI : ${GLIBCXX_USE_CXX11_ABI}")
message(STATUS " Houdini CXX11 ABI : ${HOUDINI_CXX11_ABI}")
# Try and query the Houdini CXX11 ABI. Allow it to be provided by users to
# override this logic should Houdini's CMake ever change
if(${HOUDINI_CXX11_ABI} STREQUAL "UNKNOWN")
message(WARNING "Unable to determine Houdini CXX11 ABI. Assuming newer ABI "
"has been used.")
if(NOT DEFINED HOUDINI_CXX11_ABI)
get_target_property(houdini_interface_compile_options
Houdini INTERFACE_COMPILE_OPTIONS)
set(HOUDINI_CXX11_ABI "UNKNOWN")
if("-D_GLIBCXX_USE_CXX11_ABI=0" IN_LIST houdini_interface_compile_options)
set(HOUDINI_CXX11_ABI 0)
elseif("-D_GLIBCXX_USE_CXX11_ABI=1" IN_LIST houdini_interface_compile_options)
set(HOUDINI_CXX11_ABI 1)
endif()
if(${GLIBCXX_USE_CXX11_ABI} EQUAL ${HOUDINI_CXX11_ABI})
message(STATUS " Current CXX11 ABI matches Houdini configuration "
"(_GLIBCXX_USE_CXX11_ABI=${HOUDINI_CXX11_ABI}).")
else()
message(WARNING "A potential mismatch was detected between the CXX11 ABI "
"of GCC and Houdini. The following ABI configuration will be used: "
"-D_GLIBCXX_USE_CXX11_ABI=${HOUDINI_CXX11_ABI}. See: "
"https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html and "
"https://vfxplatform.com/#footnote-gcc6 for more information.")
endif()
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=${HOUDINI_CXX11_ABI})
endif()
message(STATUS " GNU CXX11 ABI : ${GLIBCXX_USE_CXX11_ABI}")
message(STATUS " Houdini CXX11 ABI : ${HOUDINI_CXX11_ABI}")
if(${HOUDINI_CXX11_ABI} STREQUAL "UNKNOWN")
message(WARNING "Unable to determine Houdini CXX11 ABI. Assuming newer ABI "
"has been used.")
set(HOUDINI_CXX11_ABI 1)
endif()
if(${GLIBCXX_USE_CXX11_ABI} EQUAL ${HOUDINI_CXX11_ABI})
message(STATUS " Current CXX11 ABI matches Houdini configuration "
"(_GLIBCXX_USE_CXX11_ABI=${HOUDINI_CXX11_ABI}).")
else()
message(WARNING "A potential mismatch was detected between the CXX11 ABI "
"of libstdc++ and Houdini. The following ABI configuration will be used: "
"-D_GLIBCXX_USE_CXX11_ABI=${HOUDINI_CXX11_ABI}. See: "
"https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html and "
"https://vfxplatform.com/#footnote-gcc6 for more information.")
endif()
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=${HOUDINI_CXX11_ABI})
endif()
+1 -1
View File
@@ -51,7 +51,7 @@ variables may be provided to tell this module where to look.
# Find the Maya installation and use Maya's CMake to initialize
# the Maya lib
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.18)
set(_FIND_MAYA_ADDITIONAL_OPTIONS "")
+1 -1
View File
@@ -57,7 +57,7 @@ The following functions are provided:
#]=======================================================================]
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.18)
function(OPENVDB_GET_VERSION_DEFINE HEADER KEY VALUE)
+1 -1
View File
@@ -16,7 +16,7 @@ existing from a previous run of cmake.
#]=======================================================================]
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.18)
set(MANIFEST "${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt")
+98 -4
View File
@@ -7,7 +7,7 @@
#]=======================================================================]
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.18)
###############################################################################
@@ -129,6 +129,10 @@ endif()
# Increase the number of sections that an object file can contain
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/bigobj>")
# Enable MSVC options that make it behave like other compilers
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/permissive->")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/Zc:throwingNew>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/Zc:inline>")
# Excludes APIs such as Cryptography, DDE, RPC, Shell, and Windows Sockets
add_compile_definitions("$<$<CXX_COMPILER_ID:MSVC>:WIN32_LEAN_AND_MEAN>")
# Disable non-secure CRT library function warnings
@@ -139,9 +143,32 @@ add_compile_definitions("$<$<CXX_COMPILER_ID:MSVC>:_CRT_SECURE_NO_WARNINGS>")
# https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/
# compiler-warning-level-3-c4996?view=vs-2019#posix-function-names
add_compile_definitions("$<$<CXX_COMPILER_ID:MSVC>:_CRT_NONSTDC_NO_WARNINGS>")
# If a user has explicitly requested a parallel build, configure this during CMake
if(MSVC_MP_THREAD_COUNT AND MSVC_MP_THREAD_COUNT GREATER 1)
# If a user has explicitly requested a parallel build, configure this during CMake
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/MP${MSVC_MP_THREAD_COUNT}>")
# If building with multiple threads with MSVC, delay generation of PDB files
# until the end of compilation to speed up their generation (invoke mspdbsrv once).
# This assumes /Zi is being used to generate PDBs (CMakes default)
add_compile_options("$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANG_AND_ID:CXX,MSVC>>:/Zf>")
endif()
if(MSVC_COMPRESS_PDB)
# /Zi enables PDBs - CMake seems to default to creating PDBs as the defacto way
# of handling debug symbols. As these PDBs can be very large, we attempt to compress
# them here with various settings. This disable incremental linking and can make
# stack traces more confusing.
# https://devblogs.microsoft.com/cppblog/shrink-my-program-database-pdb-file/
# First, generate comdats to allow the linker to remove unused data
add_compile_options("$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANG_AND_ID:CXX,MSVC>>:/Gy>")
# Remove unreferenced packaged functions and data from comdats
add_link_options("$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANG_AND_ID:CXX,MSVC>>:/OPT:REF>")
# Fold duplicate comdat data (1 iteration)
add_link_options("$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANG_AND_ID:CXX,MSVC>>:/OPT:ICF>")
# Generally compress the generated pdbs as they are being created
add_link_options("$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANG_AND_ID:CXX,MSVC>>:/PDBCOMPRESS>")
endif()
if(OPENVDB_CXX_STRICT)
@@ -151,6 +178,14 @@ if(OPENVDB_CXX_STRICT)
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,Clang,AppleClang>:-Wall>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,Clang,AppleClang>:-Wextra>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,Clang,AppleClang>:-Wconversion>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,Clang,AppleClang>:-Wnon-virtual-dtor>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,Clang,AppleClang>:-Wover-aligned>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,Clang,AppleClang>:-Wimplicit-fallthrough>")
add_compile_options("$<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_GREATER_EQUAL:$<CXX_COMPILER_VERSION>,9.3.0>>:-Wimplicit-fallthrough>")
# Only check global constructors for libraries (we should really check for
# executables too but gtest relies on these types of constructors for its
# framework).
add_compile_options("$<$<AND:$<NOT:$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>>,$<COMPILE_LANG_AND_ID:CXX,Clang,AppleClang>>:-Wglobal-constructors>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,Clang,AppleClang>:-Wno-sign-conversion>")
# GNU
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Werror>")
@@ -162,6 +197,7 @@ if(OPENVDB_CXX_STRICT)
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wconversion>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wdisabled-optimization>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Woverloaded-virtual>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wnon-virtual-dtor>")
else()
# NO OPENVDB_CXX_STRICT, suppress some warnings
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
@@ -209,7 +245,7 @@ if(CMAKE_BUILD_TYPE EQUAL coverage)
endif()
# Note that the thread, address and memory sanitizers are incompatible with each other
set(EXTRA_BUILD_TYPES coverage tsan asan lsan msan ubsan)
set(EXTRA_BUILD_TYPES coverage tsan asan lsan msan ubsan abicheck)
# Set all build flags to empty (unless they have been provided)
@@ -226,7 +262,18 @@ endforeach()
# clang and GCC. Sanitizers are currently only configured for clang and GCC.
# Coverage
add_compile_options("$<$<AND:$<CONFIG:COVERAGE>,$<COMPILE_LANG_AND_ID:CXX,GNU,Clang,AppleClang>>:--coverage>")
# --coverage uses -fprofile-arcs -ftest-coverage (compiling) and -lgcov (linking)
# @note consider -fprofile-abs-path from gcc 10
# @todo consider using clang with source analysis: -fprofile-instr-generate -fcoverage-mapping.
# https://clang.llvm.org/docs/SourceBasedCodeCoverage.html
# note that clang also works with gcov (--coverage)
# @note Ideally we'd use no optimisations (-O0) with --coverage, but a complete
# run of all unit tests takes upwards of a day without them. Thread usage also
# impacts total runtime. -Og implies -O1 but without optimisations "that would
# otherwise interfere with debugging". This still massively effects branch
# coverage tracking compared to -O0 so we should look to improve the speed of
# some of the unit tests and also experiment with clang.
add_compile_options("$<$<AND:$<CONFIG:COVERAGE>,$<COMPILE_LANG_AND_ID:CXX,GNU,Clang,AppleClang>>:--coverage;-Og>")
add_link_options("$<$<AND:$<CONFIG:COVERAGE>,$<COMPILE_LANG_AND_ID:CXX,GNU,Clang,AppleClang>>:--coverage>")
# ThreadSanitizer
@@ -257,10 +304,57 @@ add_link_options("$<$<AND:$<CONFIG:MSAN>,$<COMPILE_LANG_AND_ID:CXX,Clang,AppleCl
add_compile_options("$<$<AND:$<CONFIG:UBSAN>,$<COMPILE_LANG_AND_ID:CXX,GNU,Clang,AppleClang>>:-fsanitize=undefined>")
add_link_options("$<$<AND:$<CONFIG:UBSAN>,$<COMPILE_LANG_AND_ID:CXX,GNU,Clang,AppleClang>>:-fsanitize=undefined>")
# ABI Check. This build type is expected to work with the abi-dumper/abi-compliance-checker
# binaries which expect specific debug information. In particular, for GCC versions >= 11
# we have to explicitly select dwarf versions < 5 as the abi-dumper doesn't support dwarf5
# and will always incorrectly report successful ABI checks
# https://github.com/lvc/abi-dumper/issues/33
add_compile_options("$<$<CONFIG:ABICHECK>:-gdwarf-4;-g3;-ggdb;-Og>")
# CMAKE_BUILD_TYPE is ignored for multi config generators i.e. MSVS
get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(NOT _isMultiConfig)
message(STATUS "CMake Build Type: ${CMAKE_BUILD_TYPE}")
endif()
if(OPENVDB_ENABLE_ASSERTS)
message(STATUS "OpenVDB asserts are ENABLED")
endif()
# Intialize extra build type targets where possible
if(NOT TARGET gcov_html)
find_program(GCOVR_PATH gcovr)
if(NOT GCOVR_PATH AND CMAKE_BUILD_TYPE STREQUAL "coverage")
message(WARNING "Unable to initialize gcovr target. coverage build types will still generate gcno files.")
elseif(GCOVR_PATH)
# init gcov commands
set(GCOVR_HTML_FOLDER_CMD ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/gcov_html)
set(GCOVR_HTML_CMD
${GCOVR_PATH} --html --html-details -r ${PROJECT_SOURCE_DIR} --object-directory=${PROJECT_BINARY_DIR}
-o gcov_html/index.html
)
# Add a custom target which converts .gcda files to a html report using gcovr.
# Note that this target does NOT run ctest or any binaries - that is left to
# the implementor of the gcov workflow. Typically, the order of operations
# would be:
# - run CMake with unit tests on
# - ctest
# - make gcov_html
add_custom_target(gcov_html
COMMAND ${GCOVR_HTML_FOLDER_CMD}
COMMAND ${GCOVR_HTML_CMD}
BYPRODUCTS ${PROJECT_BINARY_DIR}/gcov_html/index.html # report directory
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
VERBATIM
COMMENT "Running gcovr to produce HTML code coverage report."
)
# Show info where to find the report
add_custom_command(TARGET gcov_html POST_BUILD
COMMAND ;
COMMENT "Open ./gcov_html/index.html in your browser to view the coverage report."
)
endif()
endif()
+51 -35
View File
@@ -8,62 +8,78 @@
#]=======================================================================]
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.18)
###############################################################################
# Configure minimum version requirements - some are treated specially and fall
# outside of the DISABLE_DEPENDENCY_VERSION_CHECKS catch
set(MINIMUM_CXX_STANDARD 14)
set(MINIMUM_CXX_STANDARD 17)
# @note ABI always enforced so the correct deprecation messages are available.
# OPENVDB_USE_DEPRECATED_ABI_<VERSION> should be used to circumvent this
set(MINIMUM_OPENVDB_ABI_VERSION 7)
set(FUTURE_MINIMUM_OPENVDB_ABI_VERSION 9)
set(FUTURE_OPENVDB_ABI_VERSION 10)
math(EXPR MINIMUM_OPENVDB_ABI_VERSION "${OpenVDB_MAJOR_VERSION}-2")
math(EXPR FUTURE_OPENVDB_ABI_VERSION "${OpenVDB_MAJOR_VERSION}+1")
# List of deprecated but supported OpenVDB ABIs for this version of OpenVDB
math(EXPR _PREV_ABI "${OpenVDB_MAJOR_VERSION}-1")
set(OPENVDB_DEPRECATED_ABI_LIST ${MINIMUM_OPENVDB_ABI_VERSION} ${_PREV_ABI})
unset(_PREV_ABI)
if(NOT DISABLE_DEPENDENCY_VERSION_CHECKS)
# @note Currently tracking CY2020 of the VFX platform where available
set(MINIMUM_GCC_VERSION 6.3.1)
set(MINIMUM_CLANG_VERSION 3.8)
set(MINIMUM_ICC_VERSION 17)
set(MINIMUM_MSVC_VERSION 19.10)
# @note Currently tracking CY2022 of the VFX platform where available
set(MINIMUM_BOOST_VERSION 1.70)
set(MINIMUM_ILMBASE_VERSION 2.4)
set(MINIMUM_OPENEXR_VERSION 2.4)
# @Note Compiler versions are not really a hard and fast rule, you just need
# a compiler with complete support for our MINIMUM_CXX_STANDARD (currently 17).
# What's usually important is that the version of libstdc++ and glibc in use
# matches. Compilers other than GCC should provide options to ensure this
# targetting e.g. --gcc-toolchain and -fgnuc-version with Clang.
set(MINIMUM_GCC_VERSION 9.3.1)
set(MINIMUM_CLANG_VERSION 5.0)
set(MINIMUM_ICC_VERSION 19)
set(MINIMUM_MSVC_VERSION 19.28) # 1928 (Visual Studio 2019 Version 16.8 + 16.9)
# Should be 1.76 for VFX 22, but only version in apt is 1.73
set(MINIMUM_BOOST_VERSION 1.73)
set(MINIMUM_PYBIND_VERSION 2.9.1)
set(MINIMUM_IMATH_VERSION 3.1)
set(MINIMUM_OPENEXR_VERSION 3.1)
set(MINIMUM_ZLIB_VERSION 1.2.7)
set(MINIMUM_TBB_VERSION 2019.0)
set(MINIMUM_LLVM_VERSION 7.0.0)
set(MINIMUM_BLOSC_VERSION 1.5.0)
set(MINIMUM_TBB_VERSION 2020.3)
set(MINIMUM_LLVM_VERSION 10.0.0)
set(MINIMUM_BLOSC_VERSION 1.17.0)
set(MINIMUM_GLFW_VERSION 3.1)
set(MINIMUM_PYTHON_VERSION 2.7) # @warning should be 3.7.x, but H18.5+ can still be used with 2.7.x
set(MINIMUM_NUMPY_VERSION 1.17.0)
set(MINIMUM_PYTHON_VERSION 3.9.1)
set(MINIMUM_NUMPY_VERSION 1.20.0)
set(MINIMUM_GOOGLETEST_VERSION 1.10)
set(MINIMUM_GLFW_VERSION 3.1)
set(MINIMUM_LOG4CPLUS_VERSION 1.1.2)
set(MINIMUM_HOUDINI_VERSION 18.5)
set(MINIMUM_HOUDINI_VERSION 19.5)
# These always promote warnings rather than errors
set(MINIMUM_MAYA_VERSION 2017)
set(MINIMUM_DOXYGEN_VERSION 1.8.8)
endif()
# VFX 21 deprecations to transition to MINIMUM_* variables in OpenVDB 10.0.0
# VFX 23 deprecations to transition to MINIMUM_* variables in OpenVDB 12.0.0
# @note At the time of writing, any variables that are commented out don't
# have target transitional versions.
set(FUTURE_MINIMUM_GCC_VERSION 9.3.1)
set(FUTURE_MINIMUM_ICC_VERSION 19)
# set(FUTURE_MINIMUM_MSVC_VERSION 19.10)
set(FUTURE_MINIMUM_GCC_VERSION 11.2.1)
set(FUTURE_MINIMUM_MSVC_VERSION 19.30) # 1930 (Visual Studio 2022)
# set(FUTURE_MINIMUM_ICC_VERSION 19)
set(FUTURE_MINIMUM_CXX_STANDARD 17)
set(FUTURE_MINIMUM_CMAKE_VERSION 3.18)
#set(FUTURE_MINIMUM_ILMBASE_VERSION 2.4) # Minimum is already 2.4
#set(FUTURE_MINIMUM_OPENEXR_VERSION 2.4) # Minimum is already 2.4
set(FUTURE_MINIMUM_BOOST_VERSION 1.73)
set(FUTURE_MINIMUM_BLOSC_VERSION 1.17.0)
set(FUTURE_MINIMUM_TBB_VERSION 2020.2)
set(FUTURE_MINIMUM_PYTHON_VERSION 3.7)
set(FUTURE_MINIMUM_NUMPY_VERSION 1.19.0)
set(FUTURE_MINIMUM_HOUDINI_VERSION 19.0)
set(FUTURE_MINIMUM_LLVM_VERSION 10.0.0)
# set(FUTURE_MINIMUM_CXX_STANDARD 20)
set(FUTURE_MINIMUM_CMAKE_VERSION 3.20)
# set(FUTURE_MINIMUM_OPENEXR_VERSION 3.1)
set(FUTURE_MINIMUM_BOOST_VERSION 1.80)
set(FUTURE_MINIMUM_GLFW_VERSION 3.3)
set(FUTURE_MINIMUM_LOG4CPLUS_VERSION 2.0)
# set(FUTURE_MINIMUM_BLOSC_VERSION 1.17.0)
# set(FUTURE_MINIMUM_TBB_VERSION 2020.3)
set(FUTURE_MINIMUM_PYTHON_VERSION 3.10)
set(FUTURE_MINIMUM_NUMPY_VERSION 1.23.0)
# set(FUTURE_MINIMUM_HOUDINI_VERSION 20.0)
set(FUTURE_MINIMUM_LLVM_VERSION 13.0.0)
+15
View File
@@ -0,0 +1,15 @@
#################################################################################
## This file is loaded by the Leak/Address Sanitizer build for the unit tests. ##
## It can be used to ignore various errors reported by the sanitizer. This is ##
## especially useful with upstream issues (e.g. boost/tbb). For help defining ##
## suppression rules, see: ##
## https://clang.llvm.org/docs/AddressSanitizer.html ##
## The build is configured with CMAKE_BUILD_TYPE=asan or lsan ##
#################################################################################
##### Upstream #####
# Leaks from TBB init which occur due to tbb teardown issues
# https://github.com/oneapi-src/oneTBB/issues/206
# Should be fixed in oneTBB. Ignore them for now
leak:tbb::internal::task_stream<3>::initialize*
-3
View File
@@ -16,9 +16,6 @@ vptr:tbb/task.h
##### OpenVDB #####
# The sOn/sOff static bool data held on the LeaffBuff<bool> objects can be
# initialised to arbitrary true/false values. See the note in LeafBuffer.h
enum:openvdb/tools/Activate.h
# Some 2s complement tests, ignore the negative shifts
# @todo Should address these
shift-base:TestMultiResGrid.cc
+2 -5
View File
@@ -7,7 +7,7 @@
#]=======================================================================]
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.18)
project(OpenVDBDocs LANGUAGES NONE)
include(GNUInstallDirs)
@@ -41,6 +41,7 @@ set(DOXY_FILES
openvdb/openvdb/io
openvdb/openvdb/math
openvdb/openvdb/points
openvdb/openvdb/points/impl
openvdb/openvdb/python/pyopenvdb.h
openvdb/openvdb/tools
openvdb/openvdb/tree
@@ -215,7 +216,6 @@ if(OPENVDB_DOXYGEN_AX)
doc/ax/doc.txt
openvdb_ax/openvdb_ax
openvdb_ax/openvdb_ax/ast
openvdb_ax/openvdb_ax/cmd
openvdb_ax/openvdb_ax/codegen
openvdb_ax/openvdb_ax/compiler
openvdb_ax/openvdb_ax/grammar
@@ -235,9 +235,6 @@ if(OPENVDB_DOXYGEN_NANOVDB)
doc/nanovdb/HelloWorld.md
nanovdb/nanovdb
nanovdb/nanovdb/util
nanovdb/nanovdb/cmd/convert
nanovdb/nanovdb/cmd/print
nanovdb/nanovdb/cmd/validate
nanovdb/nanovdb/examples/benchmark
nanovdb/nanovdb/examples/ex_bump_pool_buffer
nanovdb/nanovdb/examples/ex_collide_level_set
+9 -5
View File
@@ -1165,10 +1165,11 @@ operations (if an operation is not listed, it is not supported):
<tr style="text-align:center">
<th>Left Operand Type</th><th>Binary Op(s)</th><th>Right Operand Type</th><th>Description</th>
</tr>
<tr style="text-align:center"><td rowspan="3">@ref axscalars "scalar"</td><td rowspan="3">`== != < > <= >=`</td><td>@ref axscalars "scalar"</td>
<tr style="text-align:center"><td rowspan="3">@ref axscalars "scalar"</td><td rowspan="1">`== != < > <= >=`</td><td>@ref axscalars "scalar"</td>
<td style="text-align:left">Returns the result of the scalar comparison.</td>
</tr>
<tr style="text-align:center">
<td rowspan="2">`== !=`</td>
<td>@ref axvecmats "vector"</td>
<td style="text-align:left" rowspan="2">
Performs per component comparisons (after
@@ -1195,11 +1196,12 @@ for (int i = 1; i < 3; ++i) c &= a[i] == b;
</tr>
<tr style="text-align:center">
<td style="border-top-width: thick" rowspan="2">@ref axvecmats "vector"</td>
<td style="border-top-width: thick; text-align:center" rowspan="2">`== != < > <= >=`</td>
<td style="border-top-width: thick; text-align:center" rowspan="1">`== != < > <= >=`</td>
<td style="border-top-width: thick">@ref axscalars "scalar"</td>
<td style="border-top-width: thick;text-align:left">Same as `scalar op vector`</td>
</tr>
<tr style="text-align:center">
<td rowspan="1">`== !=`</td>
<td>@ref axvecmats "vector"</td>
<td style="text-align:left">
Performs binary comparison operations (after
@@ -1220,11 +1222,13 @@ for (int i = 1; i < 3; ++i) c &= a[i] == b[i];
</tr>
<tr style="text-align:center">
<td style="border-top-width: thick" rowspan="2">@ref axvecmats "matrix"</td>
<td style="border-top-width: thick; text-align:center" rowspan="2">`== != < > <= >=`</td>
<td style="border-top-width: thick; text-align:center" rowspan="1">`== != < > <= >=`</td>
<td style="border-top-width: thick">@ref axscalars "scalar"</td>
<td style="border-top-width: thick;text-align:left">Same as `scalar op matrix`</td>
</tr>
<tr style="text-align:center"><td>@ref axvecmats "matrix"</td>
<tr style="text-align:center">
<td rowspan="1">`== !=`</td>
<td>@ref axvecmats "matrix"</td>
<td style="text-align:left">
Performs binary comparison operations (after
@ref axtypeprecedence "implicit conversion") on each pair corresponding
@@ -1793,7 +1797,7 @@ returned, otherwise @b `c` is evaluated and returned. In this case, @b `a` and @
@anchor axvecmatinit
@par Vector/Matrix Initializer
@ref axvecmats "Vectors and matrices" can be represented as local variables (e.g.
@b `vec3f`), external attributes or parameters (e.g. @b `vec3f@attrib`) or as
@b `vec3f`), external attributes or parameters (e.g. @b `vec3f\@attrib`) or as
temporary values using the vector/matrix initializer syntax. This operator has
the form:
@par
+3 -3
View File
@@ -32,7 +32,7 @@ These examples demonstrate how to use AX on OpenVDB points grids.
Below is a small example which demonstrates working with a few point attributes.
The @ symbol is the identifier for an AX attribute. The type of each attribute
is specified before the @ symbol and the name is specified afterwards. For
example: @b `int@count` would imply an @b integer attribute called @b count.
example: @b `int\@count` would imply an @b integer attribute called @b count.
@par
In this example there are three point attributes: a @b float attribute @b speed,
a @b vec3f float attribute @b velocity and a @b vec3f float attribute @b colour.
@@ -114,7 +114,7 @@ v@P += v@v * dt;
@endcode
@par
The final AX command, `v@P += v@v * dt;` writes to the position attribute of
the points @b `v@P`. Whenever position is written to in this way, the AX
the points @b `v\@P`. Whenever position is written to in this way, the AX
`PointExecutable` will move (re-bucket) points in PointDataGrids.
@subsection axexamplepointcurlnoise Curl Noise
@@ -234,7 +234,7 @@ vec3f@vel += dt * massInverse * vec3f@force;
@par
Here we demonstrate how AX can be used to blend two volumes together. Note that
only the volumes which are written to are executed over. In the below code,
only @b `@surface_a` is written to. This means that the final blended result,
only @b `\@surface_a` is written to. This means that the final blended result,
stored in `surface_a`, will only be updated in `surface_a`'s topology. Should
we want a combined blend of @b non @b overlapping areas of both surface a and b,
we would need to activate a's topology with respect to b first.
+24 -17
View File
@@ -87,7 +87,7 @@ given FindModule e.g. `FindBlosc.cmake`:
- @b Xxx_ROOT - Preferred installation prefix. The given dependency is
expected to follow a folder structure `Xxx_ROOT/include` and `Xxx_ROOT/lib`
exist. Note that unlike the above, this is the case matching name of the
find package .i.e. Blosc_ROOT, IlmBase_ROOT, TBB_ROOT etc.
find package .i.e. Blosc_ROOT, TBB_ROOT etc.
- @b XXX_INCLUDEDIR / @b XXX_LIBRARYDIR - Preferred include and library
directories
- @b SYSTEM_LIBRARY_PATHS - A list of paths appended to all include and lib
@@ -238,10 +238,8 @@ it's a good idea to read the above section on
DCC | Supported Version | OpenVDB ABI |
-------- | ----------------- | ----------- |
Houdini | 18.0 | 6 |
Houdini | 18.5 | 7 |
Houdini | 19.0 | 8 |
Maya | 2017 | Any |
Houdini | 19.5 | 9 |
Houdini | 20.0 | 10 |
Maya | 2018 | Any |
Maya | 2019 | Any |
@@ -258,17 +256,18 @@ OpenVDB components you wish to build.
Package | Description | OpenVDB Components |
-------------- | --------------------------------------------------------------- | ------------------ |
CMake | Cross-platform family of tools designed to help build software | All |
C++14 Compiler | Matching Houdini compiler and version | All |
Boost | Components: iostreams, python, thread | All |
C++17 Compiler | Matching Houdini compiler and version | All |
Boost | Components: iostreams | All |
GoogleTest | A unit testing framework module for C++ | Unit Tests |
CppUnit | A unit testing framework module for C++ | Unit Tests (AX) |
GLFW | Simple API for OpenGL development | OpenVDB View |
Doxygen | Documentation generation from C++ | Documentation |
Log4cplus | An optional dependency for improved OpenVDB Logging | Optional (All) |
PyBind11 | C++/python bindings | Optional (Python) |
NumPy | Scientific computing with Python | Optional (Python) |
LLVM | Target-independent code generation | OpenVDB AX |
At a minimum, boost, a matching C++14 compiler and CMake will be required. See
At a minimum, boost, a matching C++17 compiler and CMake will be required. See
the full [dependency list](@ref dependencies) for help with downloading and
installing the above software. Note that as Blosc and ZLib are provided as part
of the Houdini installation `USE_BLOSC` and `USE_ZLIB` should be left `ON`.
@@ -347,8 +346,8 @@ Supported versions of maya only ship with TBB.
Package | Description | OpenVDB Components |
-------------- | --------------------------------------------------------------- | -------------------------------- |
CMake | Cross-platform family of tools designed to help build software | All |
C++14 Compiler | Matching Houdini compiler and version | All |
Boost | Components: iostreams, python, thread | All |
C++17 Compiler | Matching Houdini compiler and version | All |
Boost | Components: iostreams | All |
ZLIB | Compression library for disk serialization compression | All |
Blosc | Recommended dependency for improved disk compression | All* |
GoogleTest | A unit testing framework module for C++ | Unit Tests |
@@ -356,15 +355,16 @@ CppUnit | A unit testing framework module for C++
GLFW | Simple API for OpenGL development | OpenVDB View |
Doxygen | Documentation generation from C++ | Documentation |
OpenEXR | EXR serialization support | OpenVDB Render |
IlmBase | Used half precision floating points and EXR serialization support | Optional (All) |
Imath | Used half precision floating points and EXR serialization support | Optional (All) |
Log4cplus | An optional dependency for improved OpenVDB Logging | Optional (All) |
PyBind11 | C++/python bindings | Optional (Python) |
NumPy | Scientific computing with Python | Optional (Python) |
LLVM | Target-independent code generation | OpenVDB AX |
* See [blosc support](@ref buildBloscSupport)
At a minimum, boost, a matching C++14 compiler, ZLIB, blosc and CMake will be
At a minimum, boost, a matching C++17 compiler, ZLIB, blosc and CMake will be
required. See the full [dependency list](@ref dependencies) for help with
downloading and installing the above software.
@@ -394,14 +394,12 @@ Optional:
install the Maya plugin to. Defaults to the value of `${CMAKE_INSTALL_PREFIX}/maya${Maya_VERSION}`
- @b BOOST_ROOT =`/path/to/boost/install` # Path to boost. May not be required,
CMake may find it automatically
- @b IlmBase_ROOT =`/path/to/ilmbase/install` # Path to ilmbase.
For example on MacOS and where the build folder has been created inside the
OpenVDB source root:
@code
cmake -D BOOST_ROOT=/path/to/boost/install \
-D IlmBase_ROOT=/path/to/ilmbase/install \
-D Maya_ROOT=/Applications/Autodesk/maya2019/ \
-D USE_MAYA=ON \
../
@@ -516,7 +514,7 @@ You can add the below CMake snippet to your main `CMakeLists.txt` to bring in
OpenVDB as a dependency:
@code{.cmake}
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.18)
list(APPEND CMAKE_MODULE_PATH "/location/of/openvdb/install/lib/cmake/OpenVDB")
find_package(OpenVDB REQUIRED)
target_link_libraries(myapp OpenVDB::openvdb)
@@ -609,8 +607,17 @@ OpenVDB uses [imported targets](https://cmake.org/cmake/help/latest/command/add_
for all its dependencies. For imported Boost compatibility, the following
versions of CMake are required:
- Boost 1.68, 1.69 require CMake 3.13 or newer.
- Boost 1.70 requires CMake 3.14 or newer.
- Boost 1.73 requires CMake 3.17.2 or newer.
- Boost 1.74 requires CMake 3.19 or newer.
- Boost 1.75 requires CMake 3.19.5 or newer.
- Boost 1.76 requires CMake 3.20.3 or newer.
- Boost 1.77 requires CMake 3.21.3 or newer.
- Boost 1.78 requires CMake 3.22.2 or newer.
- Boost 1.79 requires CMake 3.23.2 or newer.
- Boost 1.80 requires CMake 3.24.2 or newer.
- Boost 1.81 requires CMake 3.25.2 or newer.
- Boost 1.82 requires CMake 3.27.0 or newer.
- Boost 1.83 requires CMake 3.27.4 or newer.
Use the above list to identify the version of CMake you require for your version
of Boost. Note that this may be implemented into the OpenVDB CMake in the future.
+476 -44
View File
@@ -2,43 +2,484 @@
@page changes Release Notes
@htmlonly <a name="v9_0_1_changes"></a>@endhtmlonly
@htmlonly <a name="v11_0_0_changes"></a>@endhtmlonly
@par
<B>Version 9.0.1</B> - <I>In Development</I>
<B>Version 11.0.0</B> - <I>November 1, 2023</I>
@par
<BLOCKQUOTE>
This version introduces ABI changes relative to older major releases, so to
preserve ABI compatibility it might be necessary to define the macro
<TT>OPENVDB_ABI_VERSION_NUMBER=</TT><I>N</I>.
</BLOCKQUOTE>
@par
<BLOCKQUOTE>
OpenEXR 2 and Python 2 are no longer supported.
</BLOCKQUOTE>
@par
OpenVDB:
- Improvements:
- Removed use of @c boost::any in favor of @c std::any.
<I>[Contributed&nbsp;by&nbsp;Brian&nbsp;McKinnon]</I>
- Bug Fixes:
- Fix potential crash reading corrupt .vdb files with invalid blosc or zip
chunks.
<I>[Contributed&nbsp;by&nbsp;Matthias&nbsp;Ueberheide]</I>
@par
NanoVDB:
- Highlights:
- Several new tools to generate and modify NanoVDB grids on the GPU.
- New file format that supports streaming of raw grid buffers.
- New Features:
- New memory efficient @c GridClass::IndexGrid that separates values from tree
- 4 new GridTypes (@c Index, @c OnIndex, @c IndexMask, @c OnIndexMask) used by
IndexGrid
- Added @c createNanoGrid that replaces older conversion methods in
<TT>GridBuilder.h</TT>, <TT>IndexGridBuilder.h</TT> and
<TT>OpenToNanoVDB.h</TT>
- Added @c cudaPointsToGrid that constructs a point device grid from a list of
points.
- Added @c cudaVoxelsToGrid that constructs a voxel device grid from a list of
voxels.
- Added <TT>cuda/CudaUtils.h</TT> with several cuda utility functions.
- Added @c GpuTimer for timing of kernels in a specific cuda stream.
- Added @c cudaIndexToGrid that converts IndexGrids into regular Grids.
- Added @c cudaSignedFloodFill that performs signed-flood filling on the GPU.
- Added @c cudaAddBlindData that adds blind data to an existing grid on the
GPU.
- Added @c cudaGridChecksum that computes checksums of device grids.
- Added @c cudaGridHandle that handles grids on the GPU.
- Added @c cudaNodeManager that constructs a NodeManager on the GPU.
- Added build type @c Points and @c GridType::PointIndex for point grids.
- Added @c GridType::Vec3u16 and @c GridType::Vec3u8 for compressed
coordinates.
- Added <TT>PrefixSum.h</TT> for concurrent computation of prefix sum on the
CPU.
- API Changes:
- Version 32.6.0 (ABI is unchanged).
- Transition from C++11 to C++17
- Vec3R is deprecated, please use Vec3d instead.
- nanoToOpenVDB now takes the index of a NanoVDB in a GridHandle.
- GridData, InternalData and LeafData are now public.
- GridMetaData can be copied.
- Improvements to <TT>GridBuilder.h</TT> that allows construction of grids on
CPU.
- GridHandle's move c-tor now requires the GridBuffer to contain a valid grid.
- Moved <TT>CudaDeviceBuffer.h</TT> to <TT>cuda/CudaDeviceBuffer.h</TT>.
- New API for acceleration of custom random-access with ValueAccessors.
- Added BitFlags class for convenient bit-mask operations.
- Added Vec2/3 min/maxComponentAtomic GPU methods.
- Added @c BBox::expandAtomic and @c BBox::intersectAtomic.
- Added @c Coord::expandAtomic.
- Added Map constructors.
- Added @c Mask::DenseIterator, @c Mask::setOnAtomic, and
@c Mask::setOffAtomic.
- @c InternalNode::ChildIterator is now const-correct.
- Added several new NanoVDB Build Traits.
- Syncing <TT>PNanoVDB.h</TT> with <TT>NanoVDB.h</TT>.
@par
Build:
- Support for <TT>OpenEXR 2.X</TT> has been removed.
- Better support for building with external package configurations with
<TT>CMAKE_FIND_PACKAGE_PREFER_CONFIG=ON</TT>.
@par
Python:
- Removed Python 2 support.
<I>[Contributed&nbsp;by&nbsp;Matthew&nbsp;Cong]</I>
- Removed explicit bindings for Math types.
<I>[Contributed&nbsp;by&nbsp;Matthew&nbsp;Cong]</I>
- Improved type casting for TypedMetadata.
<I>[Contributed&nbsp;by&nbsp;Matthew&nbsp;Cong]</I>
@htmlonly <a name="v10_1_0_changes"></a>@endhtmlonly
@par
<B>Version 10.1.0</B> - <I>October 11, 2023</I>
@par
Highlights:
- OpenVDB Python bindings are now implemented using pybind11 instead of Boost.Python.
[Contributed by Matthew Cong]
@par
OpenVDB:
- New features:
- Added points::replicate() for the replication of PointDataGrid points
and attributes.
- Improvements:
- Upgraded OpenVDBs internal half representation to IMath 3.1.6. Brings
conversion support using F16C instructions (if enabled using -mf16c) and
the removal of the exponent lookup table in favor of bit shifting.
- OpenVDBs copy of Half.h is no longer built with an internal lookup table,
but explicitly selects the non-LUT version and disables the creation of
the LUT. This is required to avoid symbol conflicts with different
namespaced OpenVDB builds.
- Removed boost::uuid from Archive, instead std::random_device is used
directly to generate UUID-like objects.
- Moved all cases of file static/global variables which relied on non-trivial
construction into function scopes as static locals. These would previously
initialize themselves on start-up in a non-deterministic, compiler-dictated
order(static-initialization-order-fiasco). This order is now defined by the
program's execution.
- Fixed the constants used in openvdb::math::Coord::hash() and
nanovdb::Coord::hash() to correctly be prime numbers (note that this
changes the result of these methods).
[Contributed by Benedikt Mersch]
- Updated tools::meshToVolume to take two new optional arguments to provide
an interior test oracle and an interior testing method. These allow the
default outside-flood-fill to be replaced if the actual sidedness can be
known.
[Contributed by Tomas Skrivan]
- LevelSetRebuild now includes example code that demonstrates the intended
use of the new meshToVolume interior testing parameters for the
resampling of level sets, where the original grid is used as the true
sign value. However, due to differences between polygonalization and
trilinear interpolation, this behaviour is disabled and exists as a
reference.
- Introduced openvdb::TupleList to wrap std::tuple and provide interface
interop methods with openvdb::TypeList.
- Added OPENVDB_FORCE_INLINE, OPENVDB_LIKELY and OPENVDB_UNLIKELY macros.
- Introduced openvdb::make_index_sequence to solve clang compilations
issues with compiler built-in index_sequence implementations.
- API changes:
- Significant infrastructural change to the ValueAccessor header and
implementation. All ValueAccessor specializations have been consolidated
into a single class which supports all possible ValueAccessor configurations
using index_sequences. Backward compatible declarations have been provided.
The new ValueAccessor implementation is marked as final.
- PagedArray iterators no longer derive from std::iterator
(but remains standard compliant).
- Bug Fixes:
- Internal counters in tree::RangeIterator were limited to 32bit precision.
They are now extended to size_t.
[Reported by SpaceX]
- Fixed a bug when compiling with -fvisibility=hidden and GCC 11 which
would cause a crash in openvdb::initialize().
- Fixed a bug with LeafManager which wouldn't correctly
initialize its LeafNode array for single level Tree configurations
i.e. RootNode<LeafNode> (bug introduced in 7.2.0).
[Reported by @lanwatch]
- Fixed a bug with LeafNodeBool Topology constructor with designated
on/off values which wouldn't apply them correctly.
[Reported by @hozhaoea]
@par
OpenVDB AX:
- Improvements:
- Added support for LLVM 15.
- Bug Fixes:
- Fixed a bug in AX on older X86 hardware which could cause a crash when
accessing point attributes with half compression (bug introduced in 9.1.0).
- Fixed an incorrect option in the `vdb_ax` command line tool where the default
optimization level was set to NONE instead of O3 (issue introduced in 10.0.0).
@par
OpenVDB Houdini:
- Improvements:
- Added Preserve Holes option to VDB From Polygons that uses the
fast winding oracle to not collapse holes in polygonal geometry.
- Bug Fixes:
- Fix a bug in the projection mode of the Advect Points SOP that was causing
a segfault.
@par
Build:
- Fixed a build issue where Boost was not being pulled in when
OPENVDB_USE_DELAYED_LOADING was set to OFF.
- Fixed a build issue with AX on 32-bit platforms.
[Reported by Mathieu Malaterre]
- Fixed a compilation issue with the min() and max() methods on Stencils
in openvdb/math/Stencils.h.
[Reported by Samuel Mauch]
- Fixed a compilation error that would be encountered when attempting to
enable the SSE4.2 or AVX SIMD options on non-x86 based platforms.
- Improved support for compiling with C++20.
[Contributed by Denys Maletskyy and Jérémie Dumas]
- OpenVDB's CMake no longer modifies the BUILD_SHARED_LIBS variable.
[Reported by Maksim Shabunin]
- Fix int-in-bool-context GCC9+ warnings by switching to use constexpr if.
@par
@htmlonly <a name="v10_0_1_changes"></a>@endhtmlonly
@par
<B>Version 10.0.1</B> - <I>November 30, 2022</I>
@par
Bug Fixes:
- Fixed uninitialized point flags in tools::VolumeToMesh which could result in
non-deterministic results (bug introduced in 10.0.0).
@par
Build:
- Fixed CXX standard requirement for VDB components in FindOpenVDB.cmake
@htmlonly <a name="v10_0_0_changes"></a>@endhtmlonly
@par
<B>Version 10.0.0</B> - <I>October 27, 2022</I>
@par
<BLOCKQUOTE>
This version introduces ABI changes relative to older major releases, so to
preserve ABI compatibility it might be necessary to define the macro
<TT>OPENVDB_ABI_VERSION_NUMBER=</TT><I>N</I>.
</BLOCKQUOTE>
@par
Highlights:
- Introducing OpenVDBLink, which provides a Mathematica interface to
OpenVDB. This link ports over access to various grid containers including
level sets, fog volumes, vector grids, integer grids, Boolean grids,
and mask grids. Construction, modification, combinations, visualisations,
queries, import, export, etc. can be achieved over grids too. Any
Mathematica 3D region that's ConstantRegionQ and BoundedRegionQ can
be represented as a level set grid, providing a more seamless integration
with OpenVDB.
- Introducing a new command-line tool,
dubbed <A HREF="https://github.com/AcademySoftwareFoundation/openvdb/tree/master/openvdb_cmd/vdb_tool">vdb_tool</A>,
that can combine any number of the high-level tools available
in <A HREF="https://github.com/AcademySoftwareFoundation/openvdb/tree/master/openvdb/openvdb/tools">openvdb/tools</A>.
For instance, it can convert a sequence of polygon meshes and particles to
level sets, perform a large number of operations on these level set
surfaces and export them as adaptive polygon meshes.
@par
OpenVDB:
- Improvements:
- Significantly improved the performance of all ValueAccessor methods which
access LeafNode value buffer data. This improvement applies to any type
which is delay load compatible (all default types except for bool and mask
grids) and improves the performance of many OpenVDB tools.
- Improved the performance of volumeToMesh by 10-15%.
- ABI changes:
- ABI change to openvdb::RootNode, which now has a new member that defines
the origin of the node. For now this origin is set to a default value of
(0,0,0), but in the near future we will allow for offsets to improve
access performance and reduce the memory footprints.
- Removed deprecated virtual methods from AttributeArray.
- API changes:
- Removed PagedArray::push_back().
- Removed Tree visitor methods from Tree, RootNode, InternalNode and
LeafNode classes - visit(), visit2(), visitActiveBBox().
- Removed LeafManager::getNodes().
- Removed tools::dilateVoxels() and tools::erodeVoxels() in favor of
tools::dilateActiveValues() and tools::erodeActiveValues().
- Removed tools::FindActiveValues::any() and
tools::FindActiveValues::none().
- StringGrid and StringTrees have been removed.
- Bug Fixes:
- Fixed an issue with tools::topologyToLevelSet which would previously
ignore active tiles in the input topology.
[Reported by Tobias Rittig]
- Fixed a bug with ValueAccessor::addLeaf and ValueAccessor::addTile which
wouldn't add the provided leaf nodes to the underlying tree. This bug did
NOT affect the specialized accessors which are used by the default tree
configuration.
[Contributed by Andrey Zakirov]
- Fixed a bug where ValueAccessor::probeNode<NodeT> and
ValueAccessor:probeConstNode<NodeT> would return a nullptr if the NodeT
type was not explicitly being cached by the accessor but the node existed
in the tree.
- Fixed a bug on Windows where math::Abs could truncate 64bit integer values.
[Contributed by Edward Lam]
- Fixed an occurrence of undefined behaviour with math::floatToInt32 and
math::doubleToInt64.
[Reported by Vojtěch Bubník]
- Fixed bugs in the sum merge that produced incorrect merged grids when
deep-copying the input nodes or when non-zero background grids were being
used.
- Fixed a bug in FastSweeping where voxels/tiles are left with min/max float
values.
- Fixed a bug in math/Tuple.h that prevented compilation with VS2017.
@par
OpenVDB AX:
- Improvements:
- Major updates to the command line interface of the vdb_ax binary, exposing
more controls such as tile streaming, value iterator types and attribute
bindings.
@par
OpenVDB Houdini:
- New Features:
- Add convex hull activation for VDB Activate SOP (requires 19.5).
- Improvements:
- Improved SDF activation to use dynamic node manager.
- Bug Fixes:
- Fixed a bug in VDB Visualize SOP where color values that exceed
the range wrap around instead of being clamped.
@par
NanoVDB:
- New Features:
- Added nanovdb::IndexGrid that allows for arbitrary voxel values and even
multiple channels to be associated with NanoVDB grids. They are more
flexible and memory efficient than regular grids at a small cost of
random-access performance. IndexGrids are constructed with the new
nanovdb::IndexGridBuilder and accessed with the new
nanovdb::ChannelAccessor.
- Added iterators to all tree node classes for visiting inactive, active, or
all values and child nodes.
- NanoVDB.h now includes standalone implementations of reading and writing
uncompressed nanovdb grids buffers.
- Added Stats::getExtrema, which computes the min/max values of all voxels
in a NanoVDB grid that intersects with a user-defined bounding-box.
- Added nanovdb::Mask::countOn(int) which is essential to the new
nanovdb::IndexGrid.
- Added RootNode::probeChild and InternalNode::probeChild.
- Improvements:
- Added a new much improved nanovdb::NodeManager, that is both faster and
more memory efficient, and that works on both the CPU and GPU. Note, it
uses a handle for allocation (just like nanovdb::Grid) and replaces the
old nanovdb::LeafManager which is now deprecated.
- NanoToOpenVDB is extended to work with grids templated on Fp4, Fp8, Fp16,
FpN, bool and ValueMask.
- Renamed RootNode::findTile to RootNode::probeTile and made it public.
- Made Mask::getWord return both a const and non-const reference.
- Improved unit-tests to use explicit 32B alignment (see alignment bug-fix
below).
- PNanoVDB.h (a C99 port of NanoVDB.h) has been updated.
- Bug Fixes:
- Fixed a bug in nanovdb::HostBuffer that could produce crashes due to
misaligned CPU memory allocations.
- Fixed bug related to uninitialized memory in nanovdb::Grid which could
confuse CRC32 checksum validation.
- Fixed bugs related to the use of intrinsic functions for fast bit-counting
in nanovdb.
- Fixed a potential security vulnerability in NanoVDB.h related to buffer
overflow exploits.
@par
Build:
- Added OPENVDB_USE_DELAYED_LOAD flag that enables delayed loading and
defaults to on.
- Add a placeholder to inject the specific revision and URL used
to build OpenVDB, useful for 3rd party build scripts to publish
their exact versions.
- Fixed an issue where OPENVDB_AX_DLL was not being defined on shared
library builds of AX, resulting in symbols not being exported.
[Reported by Ray Molenkamp]
- Fixed an issue where setting Tbb_INCLUDE_DIR could cause CMake failures.
- Updated FindTBB.cmake to support newer library ABI suffixing in
TBB 2021.5.
- Updated FindBlosc.cmake to better handle cases where blosc is built with
external sources.
- Resolved LLVM deprecation warnings in AX and added support for LLVM 14.
- On Windows (MSVC), OpenVDB is now built with extra compiler options to
ensure stricter C++ conformance: /permissive- /Zc:throwingNew /Zc:inline.
- On Windows (MSVC), the _USE_MATH_DEFINES macro is no longer defined when
including <openvdb/Platform.h> (or any dependent headers). If you were
relying on this in your own project for M_PI, M_PI_2, etc. you can add
-D_USE_MATH_DEFINES to your own project compiler options. See
<A HREF="https://docs.microsoft.com/en-us/cpp/c-runtime-library/math-constants">this page</A>
for more info.
@htmlonly <a name="v9_1_0_changes"></a>@endhtmlonly
@par
<B>Version 9.1.0</B> - <I>June 9, 2022</I>
@par
Bug Fixes:
- Minor fix to move assignment operator in nanovdb/util/HostBuffer.h.
This could potentially be a problem on Windows debug builds (unconfirmed).
- Minor fix to range in openvdb/tools/LevelSetSphere.h. This could result
in data races for multi-threaded execution (unconfirmed) [Reported by Tommy Hinks]
- Fixed a bug with Tree::combineExtended which wouldn't propagate the resulting active state when a destination tile overlapped a source child node. [Reported by @frapit]
in data races for multi-threaded execution (unconfirmed)
[Reported by Tommy Hinks]
- Fixed a bug with Tree::combineExtended which wouldn't propagate the resulting
active state when a destination tile overlapped a source child node.
[Reported by \@frapit]
- Fix unit tests failures with Blosc versions >= 1.19.0.
- Fixed a regression in ax::run which wouldn't propagate exceptions
- Fixed a bug where ax::ast::parse could return a partially constructed but
invalid AST on failure
- Fixed AX logger exit handling in ax::Compiler::compile and ax::ast::parse
- Fixed an issue which could result in significant compilation times when
instantiating TypeList<>::Unique<>
@par
New features:
- Added support for AMD's HIP API in NanoVDB [Contributed by Blender Foundation]
- Added bindings mechanism to AX to allow differing data and AX attribute names (@) in Point and Volume executables.
- Added bindings mechanism to AX to allow differing data and AX attribute names
(@) in Point and Volume executables.
- Added support for OpenVDB AX on Windows.
- Added tools::memUsageIfLoaded() which returns the memory consumption of a
deserialized VDB tree, useful if delay-loading is enabled.
- Added points::rasterizeSpheres() and points::rasterizeSmoothSpheres()
variants, new kernels and improved performance for OpenVDB points to surface
rasterization.
- Added points::rasterizeTrilinear() for OpenVDB points, fast staggered or
colocated trilinear rasterization for scalar and vector attributes.
- Exposed TypeList declarations in openvdb.h which denote the default set of
types supported by OpenVDB.
- Added points::FrustumRasterizer for efficient rasterization of OpenVDB points
to frustum volumes with optional motion blur.
@par
Improvements:
- Added a --thread [n] argument to the vdb_ax binary.
- Added a --copy-file-metadata option to vdb_ax. This behaviour is now off by default.
- Added support for multiple input files with the vdb_ax binary using -i. Positional arguments as input files are deprecated.
- Added tools::minMax() which supports multithreaded evaluation of active minimum and maximum values. Grid::evalMinMax() has been deprecated. [Contributed by Greg Hurst]
- Added a --copy-file-metadata option to vdb_ax. This behaviour is now off by
default.
- Added support for multiple input files with the vdb_ax binary using -i.
Positional arguments as input files are deprecated.
- Added tools::minMax() which supports multithreaded evaluation of active
minimum and maximum values. Grid::evalMinMax() has been deprecated.
[Contributed by Greg Hurst]
- Significant performance improvements to AX point kernels, primarily due to
providing AX access to attribute buffers for superior code generation.
- vdb_print now prints both the in-core memory and total memory usage for VDB
grids.
- Improved build support for MinGW [Contributed by Mehdi Chinoune]
- Added a new foreach method to TypeList for iterating over types without
constructing them.
- Added TypeList::Transform declaration for transforming TypeLists into new
types.
- Moved Grid::apply implementation to TypeList::apply to allow for other
polymorphic types to invoke it.
- Minor updates to NanoVDB to remove compiler warnings.
@par
Build:
- Regenerated AX grammar with Flex 2.6.4 and Bison 3.8.2.
- Improved locating NumPy in CMake when multiple python versions are installed.
- Fixed an issue which could report Python as missing when using CMake 3.18 and later on some systems. [Reported by Sam James]
- Fixed an issue which could report Python as missing when using CMake 3.18 and
later on some systems. [Reported by Sam James]
- Changed the way boost_python and boost_numpy are located. Both components must
match the major/minor version of python in use. This can be circumvented by
providing Boost_PYTHON_VERSION or Boost_PYTHON_VERSION_MAJOR.
- Relocated OpenVDB binaries to a new openvdb_cmd root directory.
- FindTBB.cmake now prioritises newer TBB installations.
- Added option to compress PDB data in MSVC debug builds.
@par
Houdini:
- Added Attribute Bindings to AX SOP to allow differently named AX attributes (@) and target point attributes/volumes.
- Added Attribute Bindings to AX SOP to allow differently named AX attributes
(@) and target point attributes/volumes.
- Fix race condition in OpenVDB Merge SOP that could cause crashes
or merged VDBs to not be deleted.
- VDB Activate SOP no longer stops at the first non-VDB primitive, but instead
just skips such primitives.
- Added VDB Rasterize Frustum SOP for efficient rasterization of OpenVDB points
into frustum volumes with optional motion blur.
@htmlonly <a name="v9_0_0_changes"></a>@endhtmlonly
@par
@@ -56,7 +497,7 @@ preserve ABI compatibility it might be necessary to define the macro
<BLOCKQUOTE>
Official release of NanoVDB, which for the first time offers GPU support for
static sparse volumes in OpenVDB. See the
<A HREF="https://academysoftwarefoundation.github.io/openvdb/NanoVDB_MainPage.html">documentation</A>
<A HREF="https://www.openvdb.org/documentation/doxygen/NanoVDB_MainPage.html">documentation</A>
for details.
</BLOCKQUOTE>
@@ -358,8 +799,7 @@ API changes:
@vdblink::tools::activate() tools::activate@endlink and
@vdblink::tools::deactivate() tools::deactivate@endlink to a new header,
Activate.h.
- Deprecated @vdblink::tools::dilateVoxels() tools::dilateVoxels@endlink
and @vdblink::tools::erodeVoxels() tools::erodeVoxels@endlink in favour of
- Deprecated tools::dilateVoxels() and tools::erodeVoxels() in favour of
new morphology methods.
- The @vdblink::tools::Film tools::Film@endlink class no longer has a
saveExr method in any build configuration. Sample code for saving exrs
@@ -488,7 +928,7 @@ a domain specific JIT (just-in-time) compiled expression language,
providing users with a new way of interacting with OpenVDB data. AX is
tailored towards writing highly parallelizable and customizable OpenVDB
volume and point kernel operations. See the
<A HREF="https://academysoftwarefoundation.github.io/openvdb/openvdbax.html">documentation</A>
<A HREF="https://www.openvdb.org/documentation/openvdbax.html">documentation</A>
for more.
</BLOCKQUOTE>
@@ -655,10 +1095,8 @@ Houdini:
Bug Fixes:
- Fixed a bug which could cause recursive compile time instantiations of
TypeList objects, manifesting in longer compile times.
- Deprecated @vdblink::util::PagedArray::push_back util::PagedArray::push_back@endlink
due to a race condition. Instead use
@vdblink::util::PagedArray::ValueBuffer::push_back util::PagedArray::ValueBuffer::push_back@endlink
which is faster and thread-safe.
- Deprecated util::PagedArray::push_back due to a race condition. Instead use
util::PagedArray::ValueBuffer::push_back which is faster and thread-safe.
- Fixed various cases of undefined behavior in some LevelSetUtil methods
[Reported&nbsp;by&nbsp;fkemmler]
@@ -768,7 +1206,7 @@ Improvements:
- Removed Boost::thread as a dependency of vdb_view in favour of std::thread.
- Removed usage of boost/integer.hpp and boost/math/constants/constants.hpp,
the latter in favour of new openvdb math constants for pi
- Removed usage of boost/mpl/*.hpp methods in favour of new template
- Removed usage of boost/mpl/\*.hpp methods in favour of new template
meta-programming methods on the @vdblink::TypeList TypeList@endlink struct.
This now supports get, front, back, contains, index, unique, popback, popfront
and range removal of types.
@@ -980,8 +1418,7 @@ API changes:
- @vdblink{tools::VolumeToMesh::pointList(),VolumeToMesh::pointList} and
@vdblink{tools::VolumeToMesh::polygonPoolList(),VolumeToMesh::polygonPoolList}
now return a std::unique_ptr instead of a boost::scoped_array.
- @vdblink::points::AttributeArray::copyUncompressed() AttributeArray::copyUncompressed@endlink
is now deprecated.
- AttributeArray::copyUncompressed is now deprecated.
@par
Python:
@@ -1234,7 +1671,7 @@ Bug fixes:
@par
API changes:
- Moved the @vdblink::CopyConstness CopyConstness@endlink metafunction from
@link tree/TreeIterator.h TreeIterator.h@endlink to @link Types.h@endlink.
@link tree/TreeIterator.h TreeIterator.h@endlink to @link Types.h Types.h@endlink.
@par
Houdini:
@@ -1301,8 +1738,7 @@ New features:
AttributeArray::copyValues@endlink and
@vdblink::points::AttributeArray::copyValuesUnsafe()
AttributeArray::copyValuesUnsafe@endlink that significantly outperform
the older @vdblink::points::AttributeArray::set()
AttributeArray::set@endlink method.
the older AttributeArray::set() method.
@par
Improvements:
@@ -1312,9 +1748,8 @@ Improvements:
@vdblink::points::AttributeArray AttributeArray@endlink now errors.
- Updated point deletion to use faster batch copying for ABI=6+.
- Methods relating to in-memory Blosc compression for
@vdblink::points::AttributeArray::compress() AttributeArray@endlink
now do nothing and have been marked deprecated resulting in memory savings
for ABI=6+.
AttributeArray::compress() now do nothing and have been marked deprecated
resulting in memory savings for ABI=6+.
@par
Bug fixes:
@@ -1335,8 +1770,8 @@ API changes:
- Removed a number of methods that were deprecated in version&nbsp;5.0.0 or
earlier.
- Removed the experimental @b ValueAccessor::newSetValue method.
- Deprecated @vdblink::points::AttributeArray::compress()
AttributeArray@endlink methods relating to in-memory Blosc compression.
- Deprecated AttributeArray::compress() methods relating to in-memory Blosc
compression.
@par
Houdini:
@@ -2199,8 +2634,8 @@ Bug fixes:
- Fixed memory leak in a @vdblink::tools::meshToVolume tools::meshToVolume@endlink
sub-tool (expandNarrowband).
<I>[Reported by K&eacute;vin&nbsp;Dietrich]</I>
- Fixed parameter type inconsistencies in @link math/Stencils.h@endlink and
@link tools/RayIntersector.h@endlink.
- Fixed parameter type inconsistencies in @link math/Stencils.h math/Stencils.h@endlink
and @link tools/RayIntersector.h tools/RayIntersector.h@endlink.
<I>[Contributed by K&eacute;vin&nbsp;Dietrich and Nick&nbsp;Avramoussis]</I>
- Fixed a bug in the @vdblink::tools::VolumeToMesh VolumeToMesh@endlink tool that
produced artifacts for adaptive surface extraction on clipped level sets.
@@ -2451,7 +2886,7 @@ Houdini:
modified or deleted, so for safety,
@vdblink::io::File::open() File::open@endlink automatically makes
private copies of source files that are smaller than a user-specified limit
(see @vdblink::io::File::setCopyMaxBytes() File::setCopyMaxBytes@endlink).
(see io::File::setCopyMaxBytes()).
The limit can be set to zero to disable copying, but if it cannot be
guaranteed that a file will not be modified, then it is best not to enable
delayed loading for that file.
@@ -2514,7 +2949,7 @@ Houdini:
for material color lookups.
- Added @vdblink::getLibraryVersionString()
getLibraryVersionString@endlink and
@link OPENVDB_LIBRARY_VERSION_STRING@endlink.
@link OPENVDB_LIBRARY_VERSION_STRING OPENVDB_LIBRARY_VERSION_STRING@endlink.
- Modified the mesh to volume converter to always set the grid background
value to the exterior narrow-band width, and added finite value checks
to narrow band parameters.
@@ -3221,9 +3656,8 @@ API changes:
the Resample SOP and the Combine SOP now use level set rebuild to correctly
and safely resample level sets. Previously, scaling a level set would
invalidate the signed distance field, leading to holes and other artifacts.
- Added a mask-based topological
@vdblink::tools::erodeVoxels erosion tool@endlink, and rewrote and
simplified the @vdblink::tools::dilateVoxels dilation tool@endlink.
- Added a mask-based topological tools::erodeVoxels() erosion tool and rewrote
and simplified the tools::dilateVoxels() dilation tool.
- The @vdblink::tools::LevelSetAdvection LevelSetAdvection@endlink tool
can now advect forward or backward in time.
- Tree::pruneLevelSet() now replaces each pruned node with a tile having
@@ -3345,8 +3779,7 @@ API changes:
that caused it to translate the output grid incorrectly in some cases.
- Fixed a bug in the tree-level
@vdblink::tree::LeafIteratorBase LeafIterator@endlink that resulted in
intermittent crashes in
@vdblink::tools::dilateVoxels() tools::dilateVoxels@endlink.
intermittent crashes in @c tools::dilateVoxels().
- The @c Hermite data type and Hermite grids are no longer supported.
- Added tools/GridOperators.h, which includes new, cleaner implementations
of the @vdblink::tools::cpt() closest point transform@endlink,
@@ -3630,10 +4063,10 @@ API changes:
@c LeafArray, which will be deprecated in the next release.
- Added a @vdblink::tree::LeafNode::fill() LeafNode::fill@endlink method
to efficiently populate leaf nodes with constant values.
- Added a @vdblink::tree::Tree::visitActiveBBox() Tree::visitActiveBBox@endlink
method that applies a functor to the bounding boxes of all active tiles
and leaf nodes and that can be used to improve the performance of
ray intersection tests, rendering of bounding boxes, etc.
- Added a tree::Tree::visitActiveBBox() method that applies a functor to the
bounding boxes of all active tiles and leaf nodes and that can be used to
improve the performance of ray intersection tests, rendering of bounding
boxes, etc.
- Added a @vdblink::tree::Tree::voxelizeActiveTiles()
Tree::voxelizeActiveTiles@endlink method to densify active tiles.
While convenient and fast, this can produce large dense grids, so use
@@ -3644,8 +4077,7 @@ API changes:
- Added a GridBase::pruneGrid() method.
- Added a @vdblink::Grid::hasUniformVoxels() Grid:hasUniformVoxels@endlink
method.
- Renamed @c tools::dilate to
@vdblink::tools::dilateVoxels() dilateVoxels@endlink and improved its
- Renamed @c tools::dilate to @c tools::dilateVoxels() and improved its
performance. The new name reflects the fact that the current
implementation ignores active tiles.
- Added a @vdblink::tools::resampleToMatch() tools::resampleToMatch@endlink
+59 -75
View File
@@ -9,7 +9,6 @@
- @ref depInstallingDependencies
- @ref depUsingAptGet
- @ref depUsingHomebrew
- @ref depManInstall
<!-- - @ref depContents -->
------------------------------------------------------------------------------
@@ -35,18 +34,18 @@ Reference Platform, but for those that do, their specified versions are
@section depComponents OpenVDB Components
Component | Requirements | Optional
----------------------- | ------------------------------------------------- | --------
OpenVDB Core Library | CMake, C++14 compiler, TBB::tbb, Boost::iostream | Blosc, ZLib, Log4cplus, IlmBase::Half
OpenVDB Print | Core Library dependencies | -
OpenVDB LOD | Core Library dependencies | -
OpenVDB Render | Core Library dependencies | OpenEXR, IlmBase, libpng
OpenVDB View | Core Library dependencies, OpenGL, GLFW3, GLEW* | -
OpenVDB Python | Core Library dependencies, Python, Boost::python | Boost::numpy, NumPy
OpenVDB AX | Core Library dependencies, LLVM | Bison, Flex
NanoVDB | - | Core Library, CUDA, TBB, Blosc, ZLib
OpenVDB UnitTests | Core Library dependencies, GoogleTest | CppUnit**
OpenVDB Documentation | Doxygen | -
Component | Requirements | Optional
----------------------- | ----------------------------------------------- | --------
OpenVDB Core Library | CMake, C++17 compiler, TBB::tbb, Boost::headers | Blosc, ZLib, Log4cplus, Imath::Imath, Boost::iostream
OpenVDB Print | Core Library dependencies | -
OpenVDB LOD | Core Library dependencies | -
OpenVDB Render | Core Library dependencies | OpenEXR, Imath::Imath, libpng
OpenVDB View | Core Library dependencies, OpenGL, GLFW3, GLEW* | -
OpenVDB Python | Core Library dependencies, Python, PyBind11 | NumPy
OpenVDB AX | Core Library dependencies, LLVM | Bison, Flex
NanoVDB | - | Core Library, CUDA, TBB, Blosc, ZLib
OpenVDB UnitTests | Core Library dependencies, GoogleTest | CppUnit**
OpenVDB Documentation | Doxygen | -
- @b * GLEW is only required for building the vdb_view binary on Windows.
- @b ** CppUnit is only required for building the AX unit tests.
@@ -57,57 +56,51 @@ OpenVDB Documentation | Doxygen | -
Package | Minimum | Recommended | Description | apt-get | Homebrew | Source
-------------- | ------- | ----------- | ----------------------------------------------------------------- | ------- | -------- | ------
CMake | 3.12 | Latest | Cross-platform family of tools designed to help build software | Y | Y | https://cmake.org
GCC | 6.3.1 | 6.3.1 | C++ 14 Compiler: The GNU Compiler Collection | Y | Y | https://www.gnu.org/software/gcc
Clang | 3.8 | Latest | C++ 14 Compiler: A C language family frontend for LLVM | Y | Y | https://clang.llvm.org
Intel ICC | 17 | Latest | C++ 14 Compiler: Intels C++ Compiler | Y | Y | https://software.intel.com/en-us/c-compilers
MSVC | 19.10 | Latest | C++ 14 Compiler: Microsoft Visual C++ Compiler | Y | Y | https://visualstudio.microsoft.com/vs
IlmBase | 2.2** | 2.3 | Used half precision floating points and EXR serialization support | Y | Y | http://www.openexr.com
OpenEXR | 2.2** | 2.3 | EXR serialization support | Y | Y | http://www.openexr.com
TBB | 2018 | 2018 | Threading Building Blocks - template library for task parallelism | Y | Y | https://www.threadingbuildingblocks.org
CMake | 3.18 | Latest | Cross-platform family of tools designed to help build software | Y | Y | https://cmake.org
GCC | 9.3.1 | 11.2.1 | C++ 17 Compiler: The GNU Compiler Collection | Y | Y | https://www.gnu.org/software/gcc
Clang | 5.0 | Latest | C++ 17 Compiler: A C language family frontend for LLVM | Y | Y | https://clang.llvm.org
Intel ICC | 19 | Latest | C++ 17 Compiler: Intels C++ Compiler | Y | Y | https://software.intel.com/en-us/c-compilers
MSVC | 19.28 | 19.30 | C++ 17 Compiler: Microsoft Visual C++ Compiler | Y | Y | https://visualstudio.microsoft.com/vs
Imath | 3.1 | Latest | Half precision floating points | Y | Y | http://www.openexr.com
OpenEXR | 3.1 | Latest | EXR serialization support | Y | Y | http://www.openexr.com
TBB | 2020.2 | 2020.3 | Threading Building Blocks - template library for task parallelism | Y | Y | https://www.threadingbuildingblocks.org
ZLIB | 1.2.7 | Latest | Compression library for disk serialization compression | Y | Y | https://www.zlib.net
Boost | 1.66 | 1.66 | Components: iostreams, python, numpy | Y | Y | https://www.boost.org
LLVM | 6.0.0 | 8.0.0 | Target-independent code generation | Y | Y | https://llvm.org/
Bison | 3.0.0 | 3.0.5 | General-purpose parser generator | Y | Y | https://www.gnu.org/software/gcc
Flex | 2.6 | 2.6.4 | Fast lexical analyzer generator | Y | Y | https://github.com/westes/flex
Python | 2.7 | 2.7 | The python interpreter and libraries for C++/python bindings | Y | Y | https://www.python.org
NumPy | 1.14.0 | 1.14.0 | Scientific computing with Python | Y | Y | http://www.numpy.org
Boost | 1.73 | 1.80 | Components: headers, iostreams | Y | Y | https://www.boost.org
LLVM | 10.0.0 | 13.0.0* | Target-independent code generation | Y | Y | https://llvm.org/
Bison | 3.0.0 | 3.7.0 | General-purpose parser generator | Y | Y | https://www.gnu.org/software/gcc
Flex | 2.6.0 | 2.6.4 | Fast lexical analyzer generator | Y | Y | https://github.com/westes/flex
Python | 3.9.1 | 3.10 | The python interpreter and libraries | Y | Y | https://www.python.org
PyBind11 | 2.9.1 | Latest | C++/python bindings | Y | Y | https://pybind11.readthedocs.io
NumPy | 1.20.0 | 1.23.0 | Scientific computing with Python | Y | Y | http://www.numpy.org
GoogleTest | 1.10 | Latest | A unit testing framework module for C++ | Y | Y | https://github.com/google/googletest
CppUnit | 1.10 | Latest | A unit testing framework module for C++ | N | Y | https://freedesktop.org/wiki/Software/cppunit
Blosc | 1.17.0* | 1.17.0 | Recommended dependency for improved disk compression | Y | Y | https://github.com/Blosc/c-blosc/releases
Log4cplus | 1.1.2 | Latest | An optional dependency for improved OpenVDB Logging | Y | Y | https://github.com/log4cplus/log4cplus
libpng | - | Latest | Library for manipulating PNG images | Y | Y | http://www.libpng.org/pub/png/libpng.html
GLFW | 3.1 | Latest | Simple API for OpenGL development | Y | Y | https://www.glfw.org
GLFW | 3.1 | > 3.3 | Simple API for OpenGL development | Y | Y | https://www.glfw.org
OpenGL | 3.2 | Latest | Environment for developing portable graphics applications | Y | Y | https://www.opengl.org
GLEW | 1.0.0 | Latest | A cross-platform OpenGL extension loading library. | Y | Y | http://glew.sourceforge.net
CUDA | - | Latest | Parallel computing platform for graphical processing units. | Y | N | https://developer.nvidia.com/cuda-downloads
Doxygen | 1.8.8 | 1.8.11 | Documentation generation from C++ | Y | Y | http://www.doxygen.nl
- @b * See the note in [known issues](@ref depKnownIssues) regarding supported blosc versions.
- @b ** IlmBase/OpenEXR 2.2 is supported as Houdini 18.0 is shipped with
VFX Reference Platform 2019, except for using older versions of these
libraries.
- @b * See the note in [known issues](@ref depKnownIssues) regarding supported blosc/llvm versions.
@subsection depKnownIssues Known Issues
- @b LLVM >= 15. LLVM has recently changed their IR pointer data types to be
completely opaque. Some support is provided in LLVM 15 but tests with AX show
that this is extremely unstable. AX currently only supports LLVM versions up
until 14.X.X. See https://llvm.org/docs/OpaquePointers.html for more details.
- @b GLFW: Crash with GLFW 3.2.1 when used with EGL on Linux. OpenVDB View may
segfault on closure. Fixed in GLFW 3.3
- @b Boost 1.66/1.67 + @b Python3 + @b NumPy: Known issue on UNIX systems
which can cause the below python runtime error. Consider updating to Boost 1.68
if you require both Python3 and NumPy support:
@code{.sh}
RuntimeError: FATAL: module compiled as little endian, but detected different endianness at runtime.
@endcode
- @b Blosc: OpenVDB has historically used an old version of blosc (1.5.0) to
serialize .vdb files. OpenVDB is moving to a new blosc version minimum of 1.17.0.
We have tested a range of blosc versions and found that the following versions
are NOT compatible with OpenVDB caches written using blosc 1.5.0. Additionally
these versions of blosc may generally not be compatible with OpenVDB itself.
Avoid using these versions and upgrade to the new minimum of 1.17.0 where
serialize .vdb files. OpenVDB has moved to a new blosc version minimum of
1.17.0. We have tested a range of blosc versions and found that the following
versions are NOT compatible with OpenVDB caches written using blosc 1.5.0.
Additionally these versions of blosc may generally not be compatible with OpenVDB
itself. Avoid using these versions and upgrade to the new minimum of 1.17.0 where
possible.
- All versions from 1.11.0 through to, but excluding, 1.14.0.
@@ -126,8 +119,22 @@ required OpenVDB dependencies.
@subsection depUsingAptGet Using UNIX apt-get
@b Note:CppUnit is unavailable using apt-get. See the other package manager
methods or the [manual installation](@ref depManInstall) options.
You can use apt to automatically install required packages. Note that different
Ubuntu distributions will have different versions available. You can use apt
pinning to request newer versions of specific package from later distributions
if the required version isn't available by default (see
[man apt_preferences](https://linux.die.net/man/5/apt_preferences)). For
example, the below settings will request TBB specifically from Ubuntu 22.04
(Jammy).
@code{.sh}
Package: libtbb-dev
Pin: release n=jammy
Pin-Priority: 990
@endcode
Alternatively you can install any missing dependencies manually or through
other package managers.
@code{.sh}
#!/bin/bash
@@ -138,18 +145,17 @@ apt-get install zlibc # zlib
apt-get install libboost-iostreams-dev # Boost::iostream
apt-get install libblosc-dev # Blosc
# AX
apt-get install llvm-8-dev # LLVM
apt-get install llvm-10-dev # LLVM
# Python
apt-get install libboost-python-dev # Boost::python
apt-get install libboost-numpy-dev # Boost::numpy
apt-get install pybind11-dev # Python
apt-get install python-dev # Python
apt-get install python-numpy # NumPy
# Optional
apt-get install libpng-dev # libpng
apt-get install libilmbase-dev # IlmBase
apt-get install libopenexr-dev # OpenEXR
apt-get install liblog4cplus-dev # Log4cplus
apt-get install googletest # GoogleTest
apt-get install libcppunit-dev # CppUnit
# vdb_view
apt-get install libglfw3-dev # GLFW
# Documentation
@@ -174,7 +180,7 @@ brew install c-blosc # blosc
# AX
brew install llvm # LLVM
# Python
brew install boost-python # Boost-python
brew install pybind11 # PyBind11
brew install python # Python
brew install numpy # NumPy
# Unit Tests
@@ -183,32 +189,10 @@ brew install cppunit # CppUnit
# vdb_view
brew install glfw # GLFW
# vdb_render
brew install ilmbase # IlmBase
brew install openexr # OpenEXR
brew install libpng # libpng
# Documentation
brew install doxygen # Doxygen
@endcode
@subsection depManInstall UNIX Manual Installations
Some dependencies may be unavailable using the above package manager methods.
Below are manual installation methods for these packages. Note that you will
have to provide your chosen installation locations to the OpenVDB CMake build
system when building OpenVDB.
@b CppUnit (for AX Unit Tests)
@code{.sh}
#!/bin/bash
wget http://dev-www.libreoffice.org/src/cppunit-1.13.2.tar.gz
tar -xvzf cppunit-1.13.2.tar.gz
cd cppunit-1.13.2
# Install to users home directory - you may customise this location
mkdir -p $HOME/cppunit
./configure --prefix=$HOME/cppunit
make
make install
@endcode
*/
+1
View File
@@ -58,6 +58,7 @@ See @subpage NanoVDB_MainPage "NanoVDB" for the NanoVDB documentation.
Contributors, please familiarize yourselves with our
@subpage codingStyle "coding standards".
<a href="../code_coverage/index.html">Code Coverage</a>
@page overview OpenVDB Overview
+1 -7
View File
@@ -921,7 +921,7 @@ openvdb::Vec3SGrid::Ptr grid = ...;
// Construct the rotation matrix.
openvdb::math::Mat3s rot45 =
openvdb::math::rotation<openvdb::math::Mat3s>(openvdb::math::Y_AXIS, M_PI_4);
openvdb::math::rotation<openvdb::math::Mat3s>(openvdb::math::Y_AXIS, openvdb::math::pi<double>()/4.0);
// Apply the functor to all active values.
openvdb::tools::foreach(grid->beginValueOn(), MatMul(rot45));
@@ -1199,7 +1199,6 @@ void processTypedGrid(openvdb::GridBase::Ptr grid, OpType& op)
else if (grid->isType<openvdb::Vec3IGrid>()) CALL_OP(openvdb::Vec3IGrid);
else if (grid->isType<openvdb::Vec3SGrid>()) CALL_OP(openvdb::Vec3SGrid);
else if (grid->isType<openvdb::Vec3DGrid>()) CALL_OP(openvdb::Vec3DGrid);
else if (grid->isType<openvdb::StringGrid>()) CALL_OP(openvdb::StringGrid);
#undef CALL_OP
}
@@ -1221,11 +1220,6 @@ struct PruneOp {
{
grid->tree().prune(typename GridType::ValueType(tolerance));
}
// Overload to handle string-valued grids
void operator()(openvdb::StringGrid::Ptr grid) const
{
grid->tree().prune();
}
};
// Read all grids from a file.
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

+2 -2
View File
@@ -78,7 +78,7 @@ openvdb::math::Transform::Ptr linearTransform =
// Rotate the transform by 90 degrees about the X axis.
// As a result the j-index will now map into the -z physical direction,
// and the k-index will map to the +y physical direction.
linearTransform->preRotate(M_PI/2, openvdb::math::X_AXIS);
linearTransform->preRotate(openvdb::math::pi<double>()/2.0, openvdb::math::X_AXIS);
@endcode
@subsection sFrustumTransforms Frustum Transforms
@@ -302,7 +302,7 @@ convention of right-multiplication of the matrix against a vector:
openvdb::math::Mat4d transform = openvdb::math::Mat4d::identity();
transform.preScale(openvdb::math::Vec3d(2,3,2));
transform.postTranslate(openvdb::math::Vec3d(1,0,0));
transform.postRotate(openvdb::math::X_AXIS, M_PI/3.0);
transform.postRotate(openvdb::math::X_AXIS, openvdb::math::pi<double>()/3.0);
// Location of a point in index space
openvdb::math::Vec3d indexSpace(1,2,3);
+3 -3
View File
@@ -4,7 +4,7 @@
```cpp
#include <openvdb/tools/LevelSetSphere.h> // replace with your own dependencies for generating the OpenVDB grid
#include <nanovdb/util/OpenToNanoVDB.h> // converter from OpenVDB to NanoVDB (includes NanoVDB.h and GridManager.h)
#include <nanovdb/util/CreateNanoGrid.h> // converter from OpenVDB to NanoVDB (includes NanoVDB.h and GridManager.h)
#include <nanovdb/util/IO.h>
// Convert an openvdb level set sphere into a nanovdb, use accessors to print out multiple values from both
@@ -17,7 +17,7 @@ int main()
auto srcGrid = openvdb::tools::createLevelSetSphere<openvdb::FloatGrid>(100.0f, openvdb::Vec3f(0.0f), 1.0f);
// Convert the OpenVDB grid, srcGrid, into a NanoVDB grid handle.
auto handle = nanovdb::openToNanoVDB(*srcGrid);
auto handle = nanovdb::createNanoGrid(*srcGrid);
// Define a (raw) pointer to the NanoVDB grid on the host. Note we match the value type of the srcGrid!
auto* dstGrid = handle.grid<float>();
@@ -77,7 +77,7 @@ int main()
```cpp
#include <nanovdb/util/IO.h> // this is required to read (and write) NanoVDB files on the host
#include <nanovdb/DefaultCudaAllocator.h> // required for CUDA memory management
#include <nanovdb/util/cuda/CudaDeviceBuffer.h> // required for CUDA memory management
extern "C" void launch_kernels(const nanovdb::NanoGrid<float>*,
const nanovdb::NanoGrid<float>*,
+131 -26
View File
@@ -15,30 +15,135 @@
```bash
foo@bar:~$ tree
.
├── nanovdb
│ ├── CNanoVDB.h
│ ├── NanoVDB.h
│ ├── PNanoVDB.h
│ └── util
│ ├── CSampleFromVoxels.h
│ ├── CudaDeviceBuffer.h
| ├── DitherLUT.h
│ ├── ForEach.h
│ ├── GridBuilder.h
│ ├── GridChecksum.h
│ ├── GridHandle.h
│ ├── GridStats.h
│ ├── GridValidator.h
│ ├── HDDA.h
│ ├── HostBuffer.h
│ ├── Invoke.h
│ ├── IO.h
│ ├── NanoToOpenVDB.h
│ ├── OpenToNanoVDB.h
| ├── Primitives.h
│ ├── Range.h
│ ├── Ray.h
| ├── Reduce.h
| ├── SampleFromVoxels.h
| └── Stencils.h
├── CMakeLists.txt
├── cmd
│ ├── CMakeLists.txt
│ ├── convert
│ │ └── nanovdb_convert.cc
│ ├── print
│ │ └── nanovdb_print.cc
│ └── validate
│ └── nanovdb_validate.cc
├── CNanoVDB.h
├── docs
│ ├── CMakeLists.txt
│ ├── codingstyle.txt
│ └── doxygen-config
├── examples
│ ├── benchmark
│ │ ├── BenchKernels_dense.cu
│ │ ├── BenchKernels_nano.cu
│ │ ├── Benchmark_dense.cu
│ │ ├── Benchmark_nano.cu
│ │ ├── Camera.h
│ │ ├── CMakeLists.txt
│ │ ├── DenseGrid.h
│ │ ├── Image.h
│ │ ├── TestBenchmark.cc
│ │ └── TestBenchmark.cu
│ ├── CMakeLists.txt
│ ├── ex_bump_pool_buffer
│ │ └── bump_pool_buffer.cc
│ ├── ex_collide_level_set
│ │ ├── common.h
│ │ ├── main.cc
│ │ ├── nanovdb.cu
│ │ └── openvdb.cc
│ ├── ex_index_grid_cuda
│ │ ├── index_grid_cuda.cu
│ │ └── index_grid_cuda_kernel.cu
│ ├── ex_make_custom_nanovdb
│ │ └── make_custom_nanovdb.cc
│ ├── ex_make_custom_nanovdb_cuda
│ │ ├── make_custom_nanovdb_cuda.cc
│ │ └── make_custom_nanovdb_cuda_kernel.cu
│ ├── ex_make_funny_nanovdb
│ │ └── make_funny_nanovdb.cc
│ ├── ex_make_nanovdb_sphere
│ │ └── make_nanovdb_sphere.cc
│ ├── ex_make_typed_grids
│ │ └── make_typed_grids.cc
│ ├── ex_map_pool_buffer
│ │ └── map_pool_buffer.cc
│ ├── ex_modify_nanovdb_thrust
│ │ └── modify_nanovdb_thrust.cu
│ ├── ex_nodemanager_cuda
│ │ ├── nodemanager_cuda.cc
│ │ └── nodemanager_cuda_kernel.cu
│ ├── ex_openvdb_to_nanovdb
│ │ └── openvdb_to_nanovdb.cc
│ ├── ex_openvdb_to_nanovdb_accessor
│ │ └── openvdb_to_nanovdb_accessor.cc
│ ├── ex_openvdb_to_nanovdb_cuda
│ │ ├── openvdb_to_nanovdb_cuda.cc
│ │ └── openvdb_to_nanovdb_cuda_kernel.cu
│ ├── ex_raytrace_fog_volume
│ │ ├── common.h
│ │ ├── main.cc
│ │ ├── nanovdb.cu
│ │ └── openvdb.cc
│ ├── ex_raytrace_level_set
│ │ ├── common.h
│ │ ├── main.cc
│ │ ├── nanovdb.cu
│ │ └── openvdb.cc
│ ├── ex_read_nanovdb_sphere
│ │ └── read_nanovdb_sphere.cc
│ ├── ex_read_nanovdb_sphere_accessor
│ │ └── read_nanovdb_sphere_accessor.cc
│ ├── ex_read_nanovdb_sphere_accessor_cuda
│ │ ├── read_nanovdb_sphere_accessor_cuda.cu
│ │ └── read_nanovdb_sphere_accessor_cuda_kernel.cu
│ ├── ex_util
│ │ └── ComputePrimitives.h
│ ├── ex_voxels_to_grid_cuda
│ │ └── ex_voxels_to_grid_cuda.cu
│ ├── ex_vox_to_nanovdb
│ │ ├── vox_to_nanovdb.cc
│ │ └── VoxToNanoVDB.h
│ └── ex_write_nanovdb_grids
│ └── write_nanovdb_grids.cc
├── NanoVDB.h
├── PNanoVDB.h
├── Readme.md
├── unittest
│ ├── CMakeLists.txt
│ ├── pnanovdb_validate_strides.h
│ ├── TestNanoVDB.cc
│ ├── TestNanoVDB.cu
│ └── TestOpenVDB.cc
└── util
├── CpuTimer.h
├── CreateNanoGrid.h
├── CSampleFromVoxels.h
├── cuda
│ ├── CudaAddBlindData.cuh
│ ├── CudaDeviceBuffer.h
│ ├── CudaGridHandle.cuh
│ ├── CudaIndexToGrid.cuh
│ ├── CudaPointsToGrid.cuh
│ ├── CudaSignedFloodFill.cuh
│ ├── CudaUtils.h
│ └── GpuTimer.cuh
├── DitherLUT.h
├── ForEach.h
├── GridBuilder.h
├── GridChecksum.h
├── GridHandle.h
├── GridStats.h
├── GridValidator.h
├── HDDA.h
├── HostBuffer.h
├── Invoke.h
├── IO.h
├── NanoToOpenVDB.h
├── NodeManager.h
├── OpenToNanoVDB.h
├── PrefixSum.h
├── Primitives.h
├── Range.h
├── Ray.h
├── Reduce.h
├── SampleFromVoxels.h
└── Stencils.h
```
+4 -4
View File
@@ -2,7 +2,7 @@
Welcome to the NanoVDB documentation page.
* @ref NanoVDB_HowToBuild
* @ref NanoVDB_FAQ
* @ref NanoVDB_SourceTree
* @ref NanoVDB_HelloWorld
* @subpage NanoVDB_HowToBuild
* @subpage NanoVDB_FAQ
* @subpage NanoVDB_SourceTree
* @subpage NanoVDB_HelloWorld
+2 -4
View File
@@ -4,10 +4,8 @@
This section describes the OpenVDB Python module and includes Python code
snippets and some complete programs that illustrate how to perform common tasks.
(An <a href="./python/index.html">API reference</a> is also available,
if <a href="http://epydoc.sourceforge.net/">Epydoc</a> is installed.)
As of OpenVDB 2.0, the Python module exposes most of the functionality
of the C++ @vdblink::Grid Grid@endlink class, including I/O, metadata
The Python module exposes most of the functionality of the C++
@vdblink::Grid Grid@endlink class, including I/O, metadata
management, voxel access and iteration, but almost none of the many
@ref secToolUtils "tools".
We expect to add support for tools in forthcoming releases.
+23 -7
View File
@@ -7,7 +7,7 @@
#]=======================================================================]
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.18)
project(NanoVDB LANGUAGES C CXX)
include(GNUInstallDirs)
@@ -25,7 +25,7 @@ message(STATUS "----------------------------------------------------")
option(NANOVDB_BUILD_TOOLS "Build command-line tools" ON)
option(NANOVDB_BUILD_UNITTESTS "Build Unit tests" OFF)
option(NANOVDB_BUILD_EXAMPLES "Build examples" OFF)
option(NANOVDB_BUILD_BENCHMARK "Build benchmark in examples" OFF)
#option(NANOVDB_BUILD_BENCHMARK "Build benchmark in examples" OFF)
option(NANOVDB_USE_INTRINSICS "Build with hardware intrinsics support" OFF)
option(NANOVDB_USE_CUDA "Build with CUDA support" OFF)
@@ -71,12 +71,13 @@ if(UNIX)
find_package(Threads REQUIRED)
endif()
if(NANOVDB_BUILD_UNITTESTS OR NANOVDB_BUILD_BENCHMARK)
#if(NANOVDB_BUILD_UNITTESTS OR NANOVDB_BUILD_BENCHMARK)
if(NANOVDB_BUILD_UNITTESTS)
find_package(GTest REQUIRED)
endif()
if(NANOVDB_USE_CUDA)
set(CMAKE_CUDA_STANDARD 11)
set(CMAKE_CUDA_STANDARD 17)
set(CMAKE_CUDA_STANDARD_REQUIRED ON)
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.18)
@@ -118,8 +119,6 @@ endif()
if(NANOVDB_USE_OPENVDB)
if(NOT OPENVDB_BUILD_CORE AND NOT TARGET OpenVDB::openvdb)
find_package(OpenVDB REQUIRED COMPONENTS openvdb)
# disable the shared libs that OpenVDB's cmake switches ON.
set(BUILD_SHARED_LIBS OFF)
endif()
endif()
@@ -167,8 +166,20 @@ set(NANOVDB_INCLUDE_FILES
# NanoVDB util header files
set(NANOVDB_INCLUDE_UTILFILES
util/CpuTimer.h
util/CreateNanoGrid.h
util/CSampleFromVoxels.h
util/CudaDeviceBuffer.h
util/cuda/CudaAddBlindData.cuh
util/cuda/CudaDeviceBuffer.h
util/cuda/CudaGridChecksum.cuh
util/cuda/CudaGridHandle.cuh
util/cuda/CudaGridStats.cuh
util/cuda/CudaIndexToGrid.cuh
util/cuda/CudaNodeManager.cuh
util/cuda/CudaPointsToGrid.cuh
util/cuda/CudaSignedFloodFill.cuh
util/cuda/CudaUtils.h
util/cuda/GpuTimer.h
util/DitherLUT.h
util/ForEach.h
util/GridBuilder.h
@@ -183,6 +194,7 @@ set(NANOVDB_INCLUDE_UTILFILES
util/NanoToOpenVDB.h
util/NodeManager.h
util/OpenToNanoVDB.h
util/PrefixSum.h
util/Primitives.h
util/Range.h
util/Ray.h
@@ -239,6 +251,10 @@ if(NANOVDB_USE_CUDA)
target_compile_options(nanovdb INTERFACE
"$<$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>:-arch=sm_75>")
endif()
# Add CUDA includes to any C++ units which use NanoVDB
target_include_directories(nanovdb INTERFACE
${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})
endif()
if(NANOVDB_USE_MAGICAVOXEL)
+1 -1
View File
@@ -687,7 +687,7 @@ cnanovdb_griddata_valid(const CNANOVDB_GLOBAL cnanovdb_griddata *RESTRICT grid)
{
if (!grid)
return 0;
if (grid->mMagic != 0x304244566f6e614eUL)
if (grid->mMagic != 0x304244566f6e614eUL && grid->mMagic != 0x314244566f6e614eUL)
return 0;
return 1;
}
+4416 -985
View File
File diff suppressed because it is too large Load Diff
+3384 -2502
View File
File diff suppressed because it is too large Load Diff
+4 -5
View File
@@ -3,11 +3,10 @@
# NanoVDB:
A lightweight GPU friendly version of VDB initially targeting rendering applications.
* [Build instructions for make and cmake](docs/HowToBuild.md)
* [Frequently asked questions](docs/FAQ.md)
* [Grid cells vs grid nodes](docs/GridCells_vs_GridNodes/Main.pdf)
* [Source tree](docs/SourceTree.md)
* [Examples](docs/HelloWorld.md)
* [Build instructions for make and cmake](../../doc/nanovdb/HowToBuild.md)
* [Frequently asked questions](../../doc/nanovdb/FAQ.md)
* [Source tree](../../doc/nanovdb/SourceTree.md)
* [Examples](../../doc/nanovdb/HelloWorld.md)
### Copyright Contributors to the OpenVDB Project
### SPDX-License-Identifier: MPL-2.0
+1 -1
View File
@@ -7,7 +7,7 @@
#]=======================================================================]
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.18)
project(NanoVDBExamples LANGUAGES CXX)
include(GNUInstallDirs)
+26 -32
View File
@@ -16,7 +16,7 @@
#include <cctype>
#include <nanovdb/util/IO.h> // this is required to read (and write) NanoVDB files on the host
#include <nanovdb/util/OpenToNanoVDB.h>
#include <nanovdb/util/CreateNanoGrid.h>
#include <nanovdb/util/NanoToOpenVDB.h>
void usage [[noreturn]] (const std::string& progName, int exitStatus = EXIT_FAILURE)
@@ -201,36 +201,26 @@ int main(int argc, char* argv[])
auto openToNano = [&](const openvdb::GridBase::Ptr& base)
{
if (auto floatGrid = openvdb::GridBase::grid<openvdb::FloatGrid>(base)) {
using SrcGridT = openvdb::FloatGrid;
if (auto floatGrid = openvdb::GridBase::grid<SrcGridT>(base)) {
nanovdb::CreateNanoGrid<SrcGridT> s(*floatGrid);
s.setStats(sMode);
s.setChecksum(cMode);
s.enableDithering(dither);
s.setVerbose(verbose ? 1 : 0);
switch (qMode) {
case nanovdb::GridType::Fp4: {
nanovdb::OpenToNanoVDB<float, nanovdb::Fp4> s;
s.enableDithering(dither);
return s(*floatGrid, sMode, cMode, verbose ? 1 : 0);
}
case nanovdb::GridType::Fp8: {
nanovdb::OpenToNanoVDB<float, nanovdb::Fp8> s;
s.enableDithering(dither);
return s(*floatGrid, sMode, cMode, verbose ? 1 : 0);
}
case nanovdb::GridType::Fp16: {
nanovdb::OpenToNanoVDB<float, nanovdb::Fp16> s;
s.enableDithering(dither);
return s(*floatGrid, sMode, cMode, verbose ? 1 : 0);
}
case nanovdb::GridType::FpN: {
case nanovdb::GridType::Fp4:
return s.getHandle<nanovdb::Fp4>();
case nanovdb::GridType::Fp8:
return s.getHandle<nanovdb::Fp8>();
case nanovdb::GridType::Fp16:
return s.getHandle<nanovdb::Fp16>();
case nanovdb::GridType::FpN:
if (absolute) {
nanovdb::OpenToNanoVDB<float, nanovdb::FpN, nanovdb::AbsDiff> s;
s.enableDithering(dither);
s.oracle() = nanovdb::AbsDiff(tolerance);
return s(*floatGrid, sMode, cMode, verbose ? 1 : 0);
return s.getHandle<nanovdb::FpN>(nanovdb::AbsDiff(tolerance));
} else {
nanovdb::OpenToNanoVDB<float, nanovdb::FpN, nanovdb::RelDiff> s;
s.enableDithering(dither);
s.oracle() = nanovdb::RelDiff(tolerance);
return s(*floatGrid, sMode, cMode, verbose ? 1 : 0);
return s.getHandle<nanovdb::FpN>(nanovdb::RelDiff(tolerance));
}
}
default:
break;
}// end of switch
@@ -251,13 +241,15 @@ int main(int argc, char* argv[])
file.open(false); //disable delayed loading
if (gridName.empty()) {// convert all grid in the file
auto grids = file.getGrids();
std::vector<nanovdb::GridHandle<nanovdb::HostBuffer> > handles;
for (auto& grid : *grids) {
if (verbose) {
std::cout << "Converting OpenVDB grid named \"" << grid->getName() << "\" to NanoVDB" << std::endl;
}
auto handle = openToNano(grid);
nanovdb::io::writeGrid(os, handle, codec);
handles.push_back(openToNano(grid));
} // loop over OpenVDB grids in file
auto handle = nanovdb::mergeGrids<nanovdb::HostBuffer, std::vector>(handles);
nanovdb::io::writeGrid(os, handle, codec);
} else {// convert only grid with matching name
auto grid = file.readGrid(gridName);
if (verbose) {
@@ -280,9 +272,11 @@ int main(int argc, char* argv[])
if (gridName.empty()) {
auto handles = nanovdb::io::readGrids(inputFile, verbose);
for (auto &h : handles) {
if (verbose)
std::cout << "Converting NanoVDB grid named \"" << h.gridMetaData()->shortGridName() << "\" to OpenVDB" << std::endl;
grids->push_back(nanoToOpenVDB(h));
for (uint32_t i = 0; i < h.gridCount(); ++i) {
if (verbose)
std::cout << "Converting NanoVDB grid named \"" << h.gridMetaData(i)->shortGridName() << "\" to OpenVDB" << std::endl;
grids->push_back(nanoToOpenVDB(h, 0, i));
}
}
} else {
auto handle = nanovdb::io::readGrid(inputFile, gridName);
+5 -5
View File
@@ -103,7 +103,7 @@ int main(int argc, char* argv[])
if (size > n)
n = size;
};
auto vec3RToStr = [](const nanovdb::Vec3R& v) {
auto Vec3dToStr = [](const nanovdb::Vec3d& v) {
std::stringstream ss;
ss << std::setprecision(3);
ss << "(" << v[0] << "," << v[1] << "," << v[2] << ")";
@@ -148,7 +148,7 @@ int main(int argc, char* argv[])
for (auto& file : fileNames) {
auto list = nanovdb::io::readGridMetaData(file);
if (!gridName.empty()) {
std::vector<nanovdb::io::GridMetaData> tmp;
std::vector<nanovdb::io::FileGridMetaData> tmp;
for (auto& m : list) {
if (nameKey == m.nameKey && gridName == m.gridName)
tmp.emplace_back(m);
@@ -186,7 +186,7 @@ int main(int argc, char* argv[])
width(configWidth, nodesToStr(m.nodeCount));
width(tileWidth, nodesToStr(m.tileCount));
width(voxelsWidth, std::to_string(m.voxelCount));
width(voxelSizeWidth, vec3RToStr(m.voxelSize));
width(voxelSizeWidth, Vec3dToStr(m.voxelSize));
}
std::cout << "\nThe file \"" << file << "\" contains the following ";
if (list.size()>1) {
@@ -227,7 +227,7 @@ int main(int argc, char* argv[])
<< std::left << std::setw(codecWidth) << nanovdb::io::toStr(m.codec)
<< std::left << std::setw(sizeWidth) << format(m.gridSize)
<< std::left << std::setw(fileWidth) << format(m.fileSize)
<< std::left << std::setw(voxelSizeWidth) << vec3RToStr(m.voxelSize);
<< std::left << std::setw(voxelSizeWidth) << Vec3dToStr(m.voxelSize);
}
std::cout << std::left << std::setw(voxelsWidth) << m.voxelCount
<< std::left << std::setw(resWidth) << resToStr(m.indexBBox);
@@ -316,7 +316,7 @@ int main(int argc, char* argv[])
exitStatus = EXIT_FAILURE;
}
catch (...) {
std::cerr << "Exception oof unexpected type caught" << std::endl;
std::cerr << "Exception of unexpected type caught" << std::endl;
exitStatus = EXIT_FAILURE;
}
@@ -77,7 +77,7 @@ int main(int argc, char* argv[])
for (auto& file : fileNames) {
auto list = nanovdb::io::readGridMetaData(file);
if (!gridName.empty()) {
std::vector<nanovdb::io::GridMetaData> tmp;
std::vector<nanovdb::io::FileGridMetaData> tmp;
for (auto& m : list) {
if (nameKey == m.nameKey && gridName == m.gridName)
tmp.emplace_back(m);
+8 -4
View File
@@ -7,7 +7,7 @@
#]=======================================================================]
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.18)
project(NanoVDBExamples LANGUAGES CXX)
include(GNUInstallDirs)
@@ -83,11 +83,12 @@ endfunction()
# -----------------------------------------------------------------------
if(NANOVDB_BUILD_BENCHMARK)
add_subdirectory(benchmark)
endif()
#if(NANOVDB_BUILD_BENCHMARK)
# add_subdirectory(benchmark)
#endif()
nanovdb_example(NAME "ex_make_custom_nanovdb")
nanovdb_example(NAME "ex_make_custom_nanovdb_cuda")
nanovdb_example(NAME "ex_make_funny_nanovdb")
nanovdb_example(NAME "ex_make_typed_grids")
nanovdb_example(NAME "ex_make_nanovdb_sphere")
@@ -98,6 +99,9 @@ nanovdb_example(NAME "ex_openvdb_to_nanovdb_cuda" OPENVDB)
nanovdb_example(NAME "ex_read_nanovdb_sphere")
nanovdb_example(NAME "ex_read_nanovdb_sphere_accessor")
nanovdb_example(NAME "ex_read_nanovdb_sphere_accessor_cuda")
nanovdb_example(NAME "ex_index_grid_cuda")
nanovdb_example(NAME "ex_nodemanager_cuda")
nanovdb_example(NAME "ex_voxels_to_grid_cuda")
nanovdb_example(NAME "ex_modify_nanovdb_thrust")
nanovdb_example(NAME "ex_map_pool_buffer")
nanovdb_example(NAME "ex_bump_pool_buffer")
@@ -1,108 +0,0 @@
// Copyright Contributors to the OpenVDB Project
// SPDX-License-Identifier: MPL-2.0
/// @file BenchKernels_dense.cu
///
/// @author Ken Museth
///
/// @brief CUDA kernel for a simple ray-tracing benchmark test.
#include "DenseGrid.h"
#include <nanovdb/util/CudaDeviceBuffer.h> // for CUDA memory management
#include <nanovdb/util/Ray.h> // for nanovdb::Ray
#include <nanovdb/util/HDDA.h> // for nanovdb::DDA
#include "Image.h"
#include "Camera.h"
// Comment out to disable timing of the CUDA kernel
#define CUDA_TIMING
// This is called by the device
__global__ void render_kernel(const nanovdb::DenseGrid<float>& grid,
const nanovdb::Camera<float>& camera,
nanovdb::Image& img)
{
using RealT = float;
using Vec3T = nanovdb::Vec3<RealT>;
using CoordT = nanovdb::Coord;
using RayT = nanovdb::Ray<RealT>;
using ColorRGB = nanovdb::Image::ColorRGB;
const int w = blockIdx.x * blockDim.x + threadIdx.x;
const int h = blockIdx.y * blockDim.y + threadIdx.y;
if (w >= img.width() || h >= img.height()) return;
RayT ray = camera.getRay(img.u(w), img.v(h));// ray in world space
ray = ray.worldToIndexF(grid);// ray in index space
if (ray.clip(grid.indexBBox().expandBy(-1))) {// clip to the index bounding box
nanovdb::DDA<RayT> dda(ray);
const float v0 = grid.getValue(dda.voxel());
while( dda.step() ) {
CoordT ijk = dda.voxel();
const float v1 = grid.getValue(ijk);
if (v0*v1>0) continue;
#if 1// second-order central difference
Vec3T grad(grid.getValue(ijk.offsetBy(1,0,0)) - grid.getValue(ijk.offsetBy(-1,0,0)),
grid.getValue(ijk.offsetBy(0,1,0)) - grid.getValue(ijk.offsetBy(0,-1,0)),
grid.getValue(ijk.offsetBy(0,0,1)) - grid.getValue(ijk.offsetBy(0,0,-1)));
#else// first order single-sided difference
Vec3T grad(-v0);
ijk[0] += 1;
grad[0] += grid.getValue(ijk);
ijk[0] -= 1;
ijk[1] += 1;
grad[1] += grid.getValue(ijk);
ijk[1] -= 1;
ijk[2] += 1;
grad[2] += grid.getValue(ijk);
#endif
grad *= rnorm3df(grad[0], grad[1], grad[2]);
img(w, h) = ColorRGB(abs(grad.dot(ray.dir())), 0, 0);
return;
}
}
const int checkerboard = 1 << 7;
img(w, h) = ((h & checkerboard) ^ (w & checkerboard)) ? ColorRGB(1, 1, 1) : ColorRGB(0, 0, 0);
}
// This is called by the host
extern "C" float launch_kernels(const nanovdb::DenseGridHandle<nanovdb::CudaDeviceBuffer>& gridHandle,
nanovdb::ImageHandle<nanovdb::CudaDeviceBuffer>& imgHandle,
const nanovdb::Camera<float>* camera,
cudaStream_t stream)
{
const auto* img = imgHandle.image(); // host image!
auto round = [](int a, int b) { return (a + b - 1) / b; };
const dim3 threadsPerBlock(8, 8), numBlocks(round(img->width(), threadsPerBlock.x), round(img->height(), threadsPerBlock.y));
auto* deviceGrid = gridHandle.deviceGrid<float>(); // note this cannot be de-referenced since it points to a memory address on the GPU!
auto* deviceImage = imgHandle.deviceImage(); // note this cannot be de-referenced since it points to a memory address on the GPU!
assert(deviceGrid && deviceImage);
#ifdef CUDA_TIMING
cudaEvent_t start, stop;
cudaEventCreate(&start);
cudaEventCreate(&stop);
cudaEventRecord(start, stream);
#endif
// kernal syntax: <<<blocks per grid, threads per block, dynamic shared memory per block, stream >>>
render_kernel<<<numBlocks, threadsPerBlock, 0, stream>>>(*deviceGrid, *camera, *deviceImage);
float elapsedTime = 0.0f;
#ifdef CUDA_TIMING
cudaEventRecord(stop, stream);
cudaEventSynchronize(stop);
cudaEventElapsedTime(&elapsedTime, start, stop);
//printf("DenseGrid: GPU kernel with %i rays ... completed in %5.3f milliseconds\n", imgHandle.image()->size(), elapsedTime);
cudaError_t errCode = cudaGetLastError();
if (errCode != cudaSuccess) {
fprintf(stderr, "CUDA Runtime Error: %s %s %d\n", cudaGetErrorString(errCode), __FILE__, __LINE__);
exit(errCode);
}
cudaEventDestroy(start);
cudaEventDestroy(stop);
#endif
return elapsedTime;
}
@@ -1,112 +0,0 @@
// Copyright Contributors to the OpenVDB Project
// SPDX-License-Identifier: MPL-2.0
/// @file BenchKernels.cu
///
/// @author Ken Museth
///
/// @brief CUDA kernel for a simple ray-tracing benchmark test.
#include <nanovdb/util/GridHandle.h> // for nanovdb::GridHandle
#include <nanovdb/util/CudaDeviceBuffer.h> // for CUDA memory management
#include <nanovdb/util/Ray.h> // for nanovdb::Ray
#include <nanovdb/util/HDDA.h> // for nanovdb::ZeroCrossing
#include "Image.h"
#include "Camera.h"
// Comment out to disable timing of the CUDA kernel
#define CUDA_TIMING
// This is called by the device
template <typename T>
__global__ void render_kernel(const nanovdb::NanoGrid<T>& grid,
const nanovdb::Camera<float>& camera,
nanovdb::Image& img)
{
using RealT = float;
using Vec3T = nanovdb::Vec3<RealT>;
using CoordT = nanovdb::Coord;
using RayT = nanovdb::Ray<RealT>;
using ColorRGB = nanovdb::Image::ColorRGB;
const int w = blockIdx.x * blockDim.x + threadIdx.x;
const int h = blockIdx.y * blockDim.y + threadIdx.y;
if (w >= img.width() || h >= img.height())
return;
const auto& tree = grid.tree();
const auto& bbox = tree.bbox();
RayT ray = camera.getRay(img.u(w), img.v(h));
ray = ray.worldToIndexF(grid);
auto acc = tree.getAccessor();
CoordT ijk;
float t;
float v0;
if (nanovdb::ZeroCrossing(ray, acc, ijk, v0, t)) {
#if 1// second-order central difference
Vec3T grad(acc.getValue(ijk.offsetBy(1,0,0)) - acc.getValue(ijk.offsetBy(-1,0,0)),
acc.getValue(ijk.offsetBy(0,1,0)) - acc.getValue(ijk.offsetBy(0,-1,0)),
acc.getValue(ijk.offsetBy(0,0,1)) - acc.getValue(ijk.offsetBy(0,0,-1)));
#else// first order single-sided difference
Vec3T grad(-v0);
ijk[0] += 1;
grad[0] += acc.getValue(ijk);
ijk[0] -= 1;
ijk[1] += 1;
grad[1] += acc.getValue(ijk);
ijk[1] -= 1;
ijk[2] += 1;
grad[2] += acc.getValue(ijk);
#endif
grad *= rnorm3df(grad[0], grad[1], grad[2]);
img(w, h) = ColorRGB(abs(grad.dot(ray.dir())), 0, 0);
} else {
const int checkerboard = 1 << 7;
img(w, h) = ((h & checkerboard) ^ (w & checkerboard)) ? ColorRGB(1, 1, 1) : ColorRGB(0, 0, 0);
}
}
// This is called by the host
extern "C" float launch_kernels(const nanovdb::GridHandle<nanovdb::CudaDeviceBuffer>& gridHandle,
nanovdb::ImageHandle<nanovdb::CudaDeviceBuffer>& imgHandle,
const nanovdb::Camera<float>* camera,
cudaStream_t stream)
{
using BuildT = nanovdb::FpN;
const auto* img = imgHandle.image(); // host image!
auto round = [](int a, int b) { return (a + b - 1) / b; };
const dim3 threadsPerBlock(8, 8), numBlocks(round(img->width(), threadsPerBlock.x), round(img->height(), threadsPerBlock.y));
auto* deviceGrid = gridHandle.deviceGrid<BuildT>(); // note this cannot be de-referenced since it points to a memory address on the GPU!
auto* deviceImage = imgHandle.deviceImage(); // note this cannot be de-referenced since it points to a memory address on the GPU!
assert(deviceGrid && deviceImage);
#ifdef CUDA_TIMING
cudaEvent_t start, stop;
cudaEventCreate(&start);
cudaEventCreate(&stop);
cudaEventRecord(start, stream);
#endif
// kernal syntax: <<<blocks per grid, threads per block, dynamic shared memory per block, stream >>>
render_kernel<<<numBlocks, threadsPerBlock, 0, stream>>>(*deviceGrid, *camera, *deviceImage);
float elapsedTime = 0.0f;
#ifdef CUDA_TIMING
cudaEventRecord(stop, stream);
cudaEventSynchronize(stop);
cudaEventElapsedTime(&elapsedTime, start, stop);
//printf("NanoVDB: GPU kernel with %i rays ... completed in %5.3f milliseconds\n", imgHandle.image()->size(), elapsedTime);
cudaError_t errCode = cudaGetLastError();
if (errCode != cudaSuccess) {
fprintf(stderr, "CUDA Runtime Error: %s %s %d\n", cudaGetErrorString(errCode), __FILE__, __LINE__);
exit(errCode);
}
cudaEventDestroy(start);
cudaEventDestroy(stop);
#endif
return elapsedTime;
}
@@ -1,721 +0,0 @@
// Copyright Contributors to the OpenVDB Project
// SPDX-License-Identifier: MPL-2.0
/// @file Benchmark.cc
///
/// @author Ken Museth
///
/// @brief A simple ray-tracing benchmark test.
#include <nanovdb/util/IO.h>
#include <nanovdb/util/Ray.h>
#include <nanovdb/util/HDDA.h>
#include <nanovdb/util/Primitives.h>
#include <nanovdb/util/SampleFromVoxels.h>
#include "Image.h"
#include "Camera.h"
#include "../ex_util/CpuTimer.h"
#include "DenseGrid.h"
#if defined(NANOVDB_USE_CUDA)
#include <nanovdb/util/CudaDeviceBuffer.h>
#endif
#if defined(NANOVDB_USE_OPENVDB)
#include <nanovdb/util/OpenToNanoVDB.h>
#include <openvdb/openvdb.h>
#include <openvdb/tools/LevelSetSphere.h>
#include <openvdb/tools/LevelSetPlatonic.h>
#include <openvdb/tools/RayIntersector.h>
#include <openvdb/math/Ray.h>
#include <openvdb/math/Transform.h>
#endif
#if defined(NANOVDB_USE_TBB)
#include <tbb/parallel_for.h>
#include <tbb/blocked_range2d.h>
#endif
#include <gtest/gtest.h>
namespace nanovdb {
inline std::ostream&
operator<<(std::ostream& os, const CoordBBox& b)
{
os << "(" << b[0][0] << "," << b[0][1] << "," << b[0][2] << ") ->"
<< "(" << b[1][0] << "," << b[1][1] << "," << b[1][2] << ")";
return os;
}
inline std::ostream&
operator<<(std::ostream& os, const Coord& ijk)
{
os << "(" << ijk[0] << "," << ijk[1] << "," << ijk[2] << ")";
return os;
}
template <typename T>
inline std::ostream&
operator<<(std::ostream& os, const Vec3<T>& v)
{
os << "(" << v[0] << "," << v[1] << "," << v[2] << ")";
return os;
}
}
// define the environment variable VDB_DATA_PATH to use models from the web
// e.g. setenv VDB_DATA_PATH /home/kmu/dev/data/vdb
// or export VDB_DATA_PATH=/Users/ken/dev/data/vdb
// define the environment variable VDB_SCRATCH_PATH to specify the directory where image are saved
// The fixture for testing class.
class Benchmark : public ::testing::Test
{
protected:
Benchmark() {}
~Benchmark() override {}
// If the constructor and destructor are not enough for setting up
// and cleaning up each test, you can define the following methods:
void SetUp() override
{
// Code here will be called immediately after the constructor (right
// before each test).
}
void TearDown() override
{
// Code here will be called immediately after each test (right
// before the destructor).
}
std::string getEnvVar(const std::string& name, const std::string def = "") const
{
const char* str = std::getenv(name.c_str());
return str == nullptr ? def : std::string(str);
}
#if defined(NANOVDB_USE_OPENVDB)
openvdb::FloatGrid::Ptr getSrcGrid(int verbose = 1)
{
openvdb::FloatGrid::Ptr grid;
const std::string path = this->getEnvVar("VDB_DATA_PATH");
if (path.empty()) { // create a narrow-band level set sphere
std::cout << "\tSet the environment variable \"VDB_DATA_PATH\" to a directory\n"
<< "\tcontaining OpenVDB level sets files. They can be downloaded\n"
<< "\there: https://www.openvdb.org/download/" << std::endl;
const float radius = 50.0f;
const openvdb::Vec3f center(0.0f, 0.0f, 0.0f);
const float voxelSize = 0.1f, width = 3.0f;
if (verbose > 0) {
std::stringstream ss;
ss << "Generating level set sphere with a radius of " << radius << " voxels";
mTimer.start(ss.str());
}
#if 1 // choose between a sphere or one of five platonic solids
grid = openvdb::tools::createLevelSetSphere<openvdb::FloatGrid>(radius, center, voxelSize, width);
grid->setName("ls_sphere");
#else
const int faces[5] = {4, 6, 8, 12, 20};
grid = openvdb::tools::createLevelSetPlatonic<openvdb::FloatGrid>(faces[4], radius, center, voxelSize, width);
grid->setName("ls_platonic");
#endif
} else {
openvdb::initialize();
const std::vector<std::string> models = {"armadillo.vdb", "buddha.vdb", "bunny.vdb", "crawler.vdb", "dragon.vdb", "iss.vdb", "space.vdb", "torus_knot_helix.vdb", "utahteapot.vdb", "bunny_cloud.vdb", "wdas_cloud.vdb"};
const std::string fileName = path + "/" + models[4]; //
if (verbose > 0)
mTimer.start("Reading grid from the file \"" + fileName + "\"");
openvdb::io::File file(fileName);
file.open(false); //disable delayed loading
grid = openvdb::gridPtrCast<openvdb::FloatGrid>(file.readGrid(file.beginName().gridName()));
}
if (verbose > 0)
mTimer.stop();
if (verbose > 1)
grid->print(std::cout, 3);
return grid;
}
#endif
nanovdb::CpuTimer<> mTimer;
}; // Benchmark
TEST_F(Benchmark, Ray)
{
using RealT = float;
using Vec3T = nanovdb::Vec3<RealT>;
using CoordT = nanovdb::Coord;
using CoordBBoxT = nanovdb::BBox<CoordT>;
using BBoxT = nanovdb::BBox<Vec3T>;
using RayT = nanovdb::Ray<RealT>;
{// clip ray against an index bbox
// test bbox clip
const Vec3T dir(-1.0, 2.0, 3.0);
const Vec3T eye(2.0, 1.0, 1.0);
RealT t0 = 0.1, t1 = 12589.0;
RayT ray(eye, dir, t0, t1);
// intersects the two faces of the box perpendicular to the y-axis!
EXPECT_TRUE(ray.clip(CoordBBoxT(CoordT(0, 2, 2), CoordT(2, 4, 6))));
//std::cerr << "t0 = " << ray.t0() << ", ray.t1() = " << ray.t1() << std::endl;
//std::cerr << "ray(0.5) = " << ray(0.5) << std::endl;
//std::cerr << "ray(1.5) = " << ray(1.5) << std::endl;
//std::cerr << "ray(2.0) = " << ray(2.0) << std::endl;
EXPECT_EQ(0.5, ray.t0());
EXPECT_EQ(2.0, ray.t1());
EXPECT_EQ(ray(0.5)[1], 2); //lower y component of intersection
EXPECT_EQ(ray(2.0)[1], 5); //higher y component of intersection
ray.reset(eye, dir, t0, t1);
// intersects the lower edge anlong the z-axis of the box
EXPECT_TRUE(ray.clip(BBoxT(Vec3T(1.5, 2.0, 2.0), Vec3T(4.5, 4.0, 6.0))));
EXPECT_EQ(0.5, ray.t0());
EXPECT_EQ(0.5, ray.t1());
EXPECT_EQ(ray(0.5)[0], 1.5); //lower y component of intersection
EXPECT_EQ(ray(0.5)[1], 2.0); //higher y component of intersection
ray.reset(eye, dir, t0, t1);
// no intersections
EXPECT_TRUE(!ray.clip(CoordBBoxT(CoordT(4, 2, 2), CoordT(6, 4, 6))));
EXPECT_EQ(t0, ray.t0());
EXPECT_EQ(t1, ray.t1());
}
{// clip ray against an real bbox
// test bbox clip
const Vec3T dir(-1.0, 2.0, 3.0);
const Vec3T eye(2.0, 1.0, 1.0);
RealT t0 = 0.1, t1 = 12589.0;
RayT ray(eye, dir, t0, t1);
// intersects the two faces of the box perpendicular to the y-axis!
EXPECT_TRUE( ray.clip(CoordBBoxT(CoordT(0, 2, 2), CoordT(2, 4, 6)).asReal<double>()) );
//std::cerr << "t0 = " << ray.t0() << ", ray.t1() = " << ray.t1() << std::endl;
//std::cerr << "ray(0.5) = " << ray(0.5) << std::endl;
//std::cerr << "ray(1.5) = " << ray(1.5) << std::endl;
//std::cerr << "ray(2.0) = " << ray(2.0) << std::endl;
EXPECT_EQ(0.5, ray.t0());
EXPECT_EQ(2.0, ray.t1());
EXPECT_EQ(ray(0.5)[1], 2); //lower y component of intersection
EXPECT_EQ(ray(1.5)[1], 4); //higher y component of intersection
ray.reset(eye, dir, t0, t1);
// intersects the lower edge along the z-axis of the box
EXPECT_TRUE( ray.clip(BBoxT(Vec3T(1.5, 2.0, 2.0), Vec3T(4.5, 4.0, 6.0))) );
EXPECT_EQ(0.5, ray.t0());
EXPECT_EQ(0.5, ray.t1());
EXPECT_EQ(ray(0.5)[0], 1.5); //lower y component of intersection
EXPECT_EQ(ray(0.5)[1], 2.0); //higher y component of intersection
ray.reset(eye, dir, t0, t1);
// no intersections
EXPECT_TRUE(!ray.clip(CoordBBoxT(CoordT(4, 2, 2), CoordT(6, 4, 6)).asReal<double>()) );
EXPECT_EQ(t0, ray.t0());
EXPECT_EQ(t1, ray.t1());
}
}
TEST_F(Benchmark, HDDA)
{
using RealT = float;
using CoordT = nanovdb::Coord;
using RayT = nanovdb::Ray<RealT>;
using Vec3T = RayT::Vec3T;
{ // basic test
using DDAT = nanovdb::HDDA<RayT, CoordT>;
const RayT::Vec3T dir(1.0, 0.0, 0.0);
const RayT::Vec3T eye(-1.0, 0.0, 0.0);
const RayT ray(eye, dir);
DDAT dda(ray, 1 << (3 + 4 + 5));
EXPECT_EQ(nanovdb::Delta<RealT>::value(), dda.time());
EXPECT_EQ(1.0, dda.next());
dda.step();
EXPECT_EQ(1.0, dda.time());
EXPECT_EQ(4096 + 1.0, dda.next());
}
{ // Check for the notorious +-0 issue!
using DDAT = nanovdb::HDDA<RayT, CoordT>;
const Vec3T dir1(1.0, 0.0, 0.0);
const Vec3T eye1(2.0, 0.0, 0.0);
const RayT ray1(eye1, dir1);
DDAT dda1(ray1, 1 << 3);
dda1.step();
const Vec3T dir2(1.0, -0.0, -0.0);
const Vec3T eye2(2.0, 0.0, 0.0);
const RayT ray2(eye2, dir2);
DDAT dda2(ray2, 1 << 3);
dda2.step();
const Vec3T dir3(1.0, -1e-9, -1e-9);
const Vec3T eye3(2.0, 0.0, 0.0);
const RayT ray3(eye3, dir3);
DDAT dda3(ray3, 1 << 3);
dda3.step();
const Vec3T dir4(1.0, -1e-9, -1e-9);
const Vec3T eye4(2.0, 0.0, 0.0);
const RayT ray4(eye3, dir4);
DDAT dda4(ray4, 1 << 3);
dda4.step();
EXPECT_EQ(dda1.time(), dda2.time());
EXPECT_EQ(dda2.time(), dda3.time());
EXPECT_EQ(dda3.time(), dda4.time());
EXPECT_EQ(dda1.next(), dda2.next());
EXPECT_EQ(dda2.next(), dda3.next());
EXPECT_EQ(dda3.next(), dda4.next());
}
{ // test voxel traversal along both directions of each axis
using DDAT = nanovdb::HDDA<RayT>;
const Vec3T eye(0, 0, 0);
for (int s = -1; s <= 1; s += 2) {
for (int a = 0; a < 3; ++a) {
const int d[3] = {s * (a == 0), s * (a == 1), s * (a == 2)};
const Vec3T dir(d[0], d[1], d[2]);
RayT ray(eye, dir);
DDAT dda(ray, 1 << 0);
for (int i = 1; i <= 10; ++i) {
EXPECT_TRUE(dda.step());
EXPECT_EQ(i, dda.time());
}
}
}
}
{ // test Node traversal along both directions of each axis
using DDAT = nanovdb::HDDA<RayT, CoordT>;
const Vec3T eye(0, 0, 0);
for (int s = -1; s <= 1; s += 2) {
for (int a = 0; a < 3; ++a) {
const int d[3] = {s * (a == 0), s * (a == 1), s * (a == 2)};
const Vec3T dir(d[0], d[1], d[2]);
RayT ray(eye, dir);
DDAT dda(ray, 1 << 3);
for (int i = 1; i <= 10; ++i) {
EXPECT_TRUE(dda.step());
EXPECT_EQ(8 * i, dda.time());
}
}
}
}
{ // test accelerated Node traversal along both directions of each axis
using DDAT = nanovdb::HDDA<RayT, CoordT>;
const Vec3T eye(0, 0, 0);
for (int s = -1; s <= 1; s += 2) {
for (int a = 0; a < 3; ++a) {
const int d[3] = {s * (a == 0), s * (a == 1), s * (a == 2)};
const Vec3T dir(2 * d[0], 2 * d[1], 2 * d[2]);
RayT ray(eye, dir);
DDAT dda(ray, 1 << 3);
double next = 0;
for (int i = 1; i <= 10; ++i) {
EXPECT_TRUE(dda.step());
EXPECT_EQ(4 * i, dda.time());
if (i > 1) {
EXPECT_EQ(dda.time(), next);
}
next = dda.next();
}
}
}
}
} // HDDA
TEST_F(Benchmark, DenseGrid)
{
{// CoordT = nanovdb::Coord
using GridT = nanovdb::DenseGrid<float>;
const nanovdb::Coord min(-10,0,10), max(10,20,30), pos(0,5,20);
const nanovdb::CoordBBox bbox( min, max );
auto handle = GridT::create(min, max);
auto *grid = handle.grid<float>();
EXPECT_TRUE(grid);
EXPECT_TRUE(grid->test(min));
EXPECT_TRUE(grid->test(max));
EXPECT_TRUE(grid->test(pos));
EXPECT_EQ( uint64_t(21*21*21), bbox.volume() );
EXPECT_EQ( bbox.volume(), grid->size() );
EXPECT_EQ( 0u, grid->coordToOffset(min) );
float *p = grid->values();
for (uint64_t i=0; i<grid->size(); ++i) {
*p++ = 0.0f;
}
EXPECT_EQ( 0.0f, grid->getValue(min) );
EXPECT_EQ( 0.0f, grid->getValue(pos) );
EXPECT_EQ( 0.0f, grid->getValue(max) );
grid->setValue(pos, 1.0f);
EXPECT_EQ( 0.0f, grid->getValue(min) );
EXPECT_EQ( 1.0f, grid->getValue(pos) );
EXPECT_EQ( 0.0f, grid->getValue(max) );
for (auto it = bbox.begin(); it; ++it) {
auto &ijk = *it;
EXPECT_TRUE(grid->test(ijk));
if (ijk == pos) {
EXPECT_EQ( 1.0f, grid->getValue(ijk) );
} else {
EXPECT_EQ( 0.0f, grid->getValue(ijk) );
}
}
EXPECT_EQ(nanovdb::GridType::Float, grid->gridType());
EXPECT_EQ(nanovdb::GridClass::Unknown, grid->gridClass());
EXPECT_EQ(bbox, grid->indexBBox());
EXPECT_EQ(nanovdb::Vec3d(min[0], min[1], min[2]), grid->worldBBox()[0]);
EXPECT_EQ(nanovdb::Vec3d(max[0]+1, max[1]+1, max[2]+1), grid->worldBBox()[1]);
EXPECT_EQ(nanovdb::Vec3d(1.0), grid->voxelSize());
nanovdb::io::writeDense(handle, "data/dense.vol");
//nanovdb::io::writeDense(*grid, "data/dense.vol");
}
{// CoordT = nanovdb::Coord
auto handle = nanovdb::io::readDense<>("data/dense.vol");
const nanovdb::Coord min(-10,0,10), max(10,20,30), pos(0,5,20);
const nanovdb::CoordBBox bbox( min, max );
auto *grid = handle.grid<float>();
EXPECT_TRUE(grid);
EXPECT_TRUE(grid->test(min));
EXPECT_TRUE(grid->test(max));
EXPECT_TRUE(grid->test(pos));
EXPECT_EQ( uint64_t(21*21*21), bbox.volume() );
EXPECT_EQ( bbox.volume(), grid->size() );
EXPECT_EQ( 0u, grid->coordToOffset(min) );
EXPECT_EQ( 0.0f, grid->getValue(min) );
EXPECT_EQ( 1.0f, grid->getValue(pos) );
EXPECT_EQ( 0.0f, grid->getValue(max) );
EXPECT_EQ(min, grid->min());
EXPECT_EQ(max, grid->max());
for (auto it = bbox.begin(); it; ++it) {
auto &ijk = *it;
EXPECT_TRUE(grid->test(ijk));
if (ijk == pos) {
EXPECT_EQ( 1.0f, grid->getValue(ijk) );
} else {
EXPECT_EQ( 0.0f, grid->getValue(ijk) );
}
}
EXPECT_EQ(nanovdb::GridType::Float, grid->gridType());
EXPECT_EQ(nanovdb::GridClass::Unknown, grid->gridClass());
EXPECT_EQ(bbox, grid->indexBBox());
EXPECT_EQ(nanovdb::Vec3d(min[0], min[1], min[2]), grid->worldBBox()[0]);
EXPECT_EQ(nanovdb::Vec3d(max[0]+1, max[1]+1, max[2]+1), grid->worldBBox()[1]);
EXPECT_EQ(nanovdb::Vec3d(1.0), grid->voxelSize());
}
}
#if defined(NANOVDB_USE_OPENVDB)
TEST_F(Benchmark, OpenVDB_CPU)
{
using GridT = openvdb::FloatGrid;
using CoordT = openvdb::Coord;
using ColorRGB = nanovdb::Image::ColorRGB;
using RealT = float;
using Vec3T = openvdb::math::Vec3<RealT>;
using RayT = openvdb::math::Ray<RealT>;
const std::string image_path = this->getEnvVar("VDB_SCRATCH_PATH", ".");
auto srcGrid = this->getSrcGrid();
mTimer.start("Generating NanoVDB grid");
auto handle = nanovdb::openToNanoVDB(*srcGrid, nanovdb::StatsMode::BBox, nanovdb::ChecksumMode::Disable, /*verbose=*/0);
mTimer.restart("Writing NanoVDB grid");
#if defined(NANOVDB_USE_BLOSC)
nanovdb::io::writeGrid("data/test.nvdb", handle, nanovdb::io::Codec::BLOSC);
#elif defined(NANOVDB_USE_ZIP)
nanovdb::io::writeGrid("data/test.nvdb", handle, nanovdb::io::Codec::ZIP);
#else
nanovdb::io::writeGrid("data/test.nvdb", handle, nanovdb::io::Codec::NONE);
#endif
mTimer.stop();
{// convert and write DenseGRid
mTimer.start("Generating DenseGrid");
auto dHandle = nanovdb::convertToDense(*handle.grid<float>());
mTimer.restart("Writing DenseGrid");
nanovdb::io::writeDense(dHandle, "data/test.vol");
mTimer.stop();
}
const int width = 1280, height = 720;
const RealT vfov = 25.0f, aspect = RealT(width) / height, radius = 300.0f;
const auto bbox = srcGrid->evalActiveVoxelBoundingBox();
const openvdb::Vec3d center(0.5 * (bbox.max()[0] + bbox.min()[0]),
0.5 * (bbox.max()[1] + bbox.min()[1]),
0.5 * (bbox.max()[2] + bbox.min()[2]));
const Vec3T lookat = srcGrid->indexToWorld(center), up(0, -1, 0);
auto eye = [&lookat, &radius](int angle) {
const RealT theta = angle * M_PI / 180.0f;
return lookat + radius * Vec3T(sin(theta), 0, cos(theta));
};
nanovdb::Camera<RealT, Vec3T, RayT> camera(eye(0), lookat, up, vfov, aspect);
nanovdb::ImageHandle<> imgHandle(width, height);
auto* img = imgHandle.image();
auto kernel2D = [&](const tbb::blocked_range2d<int>& r) {
openvdb::tools::LevelSetRayIntersector<GridT, openvdb::tools::LinearSearchImpl<GridT, 0, RealT>, GridT::TreeType::RootNodeType::ChildNodeType::LEVEL, RayT> tester(*srcGrid);
const RealT wScale = 1.0f / width, hScale = 1.0f / height;
auto acc = srcGrid->getAccessor();
CoordT ijk;
Vec3T xyz;
float v;
for (int w = r.rows().begin(); w != r.rows().end(); ++w) {
for (int h = r.cols().begin(); h != r.cols().end(); ++h) {
const RayT wRay = camera.getRay(w * wScale, h * hScale);
RayT iRay = wRay.applyInverseMap(*srcGrid->transform().baseMap());
if (tester.intersectsIS(iRay, xyz)) {
ijk = openvdb::Coord::floor(xyz);
v = acc.getValue(ijk);
Vec3T grad(-v);
ijk[0] += 1;
grad[0] += acc.getValue(ijk);
ijk[0] -= 1;
ijk[1] += 1;
grad[1] += acc.getValue(ijk);
ijk[1] -= 1;
ijk[2] += 1;
grad[2] += acc.getValue(ijk);
grad.normalize();
(*img)(w, h) = ColorRGB(std::abs(grad.dot(iRay.dir())), 0, 0);
} else {
const int checkerboard = 1 << 7;
(*img)(w, h) = ((h & checkerboard) ^ (w & checkerboard)) ? ColorRGB(1, 1, 1) : ColorRGB(0, 0, 0);
}
}
}
}; // kernel
for (int angle = 0; angle < 6; ++angle) {
camera.update(eye(angle), lookat, up, vfov, aspect);
std::stringstream ss;
ss << "OpenVDB: CPU kernel with " << img->size() << " rays";
tbb::blocked_range2d<int> range2D(0, img->width(), 0, img->height());
mTimer.start(ss.str());
#if 1
tbb::parallel_for(range2D, kernel2D);
#else
kernel2D(range2D);
#endif
mTimer.stop();
//mTimer.start("Write image to file");
ss.str("");
ss.clear();
ss << image_path << "/openvdb_cpu_" << std::setfill('0') << std::setw(3) << angle << ".ppm";
img->writePPM(ss.str(), "Benchmark test");
//mTimer.stop();
} // loop over angle
} // OpenVDB_CPU
#endif
TEST_F(Benchmark, DenseGrid_CPU)
{
using CoordT = nanovdb::Coord;
using ColorRGB = nanovdb::Image::ColorRGB;
using RealT = float;
using Vec3T = nanovdb::Vec3<RealT>;
using RayT = nanovdb::Ray<RealT>;
auto handle = nanovdb::io::readDense("data/test.vol");
auto* grid = handle.grid<float>();
EXPECT_TRUE(grid);
EXPECT_TRUE(grid->isLevelSet());
const int width = 1280, height = 720;
const RealT vfov = 25.0f, aspect = RealT(width) / height, radius = 300.0f;
const auto bbox = grid->worldBBox();
const Vec3T lookat(0.5 * (bbox.min() + bbox.max())), up(0, -1, 0);
auto eye = [&lookat, &radius](int angle) {
const RealT theta = angle * M_PI / 180.0f;
return lookat + radius * Vec3T(sin(theta), 0, cos(theta));
};
nanovdb::Camera<RealT> camera(eye(0), lookat, up, vfov, aspect);
nanovdb::ImageHandle<> imgHandle(width, height);
auto* img = imgHandle.image();
auto kernel2D = [&](int x0, int y0, int x1, int y1) {
const RealT wScale = 1.0f / width, hScale = 1.0f / height;
for (int w = x0; w != x1; ++w) {
for (int h = y0; h != y1; ++h) {
RayT ray = camera.getRay(w * wScale, h * hScale);
ray = ray.worldToIndexF(*grid);
if (!ray.clip(grid->indexBBox().expandBy(-1))) continue;
nanovdb::DDA<RayT> dda(ray);
CoordT ijk = dda.voxel();
EXPECT_TRUE(grid->test(ijk));
const float v0 = grid->getValue(ijk);
bool hit = false;
while( !hit && dda.step() ) {
ijk = dda.voxel();
EXPECT_TRUE(grid->test(ijk));
const float v1 = grid->getValue(ijk);
if (v0*v1>0) continue;
Vec3T grad(-v1);
ijk[0] += 1;
grad[0] += grid->getValue(ijk);
ijk[0] -= 1;
ijk[1] += 1;
grad[1] += grid->getValue(ijk);
ijk[1] -= 1;
ijk[2] += 1;
grad[2] += grid->getValue(ijk);
grad.normalize();
(*img)(w, h) = ColorRGB(std::abs(grad.dot(ray.dir())), 0, 0);
hit = true;
}
if (!hit) {
const int checkerboard = 1 << 7;
(*img)(w, h) = ((h & checkerboard) ^ (w & checkerboard)) ? ColorRGB(1, 1, 1) : ColorRGB(0, 0, 0);
}
}
}
}; // kernel
for (int angle = 0; angle < 6; ++angle) {
camera.update(eye(angle), lookat, up, vfov, aspect);
std::stringstream ss;
ss << "DenseGrid: CPU kernel with " << img->size() << " rays";
mTimer.start(ss.str());
#if defined(NANOVDB_USE_TBB)
tbb::blocked_range2d<int> range(0, img->width(), 0, img->height());
tbb::parallel_for(range, [&](const tbb::blocked_range2d<int>& r) {
kernel2D(r.rows().begin(), r.cols().begin(), r.rows().end(), r.cols().end());
});
#else
kernel2D(0, 0, img->width(), img->height());
#endif
mTimer.stop();
//mTimer.start("Write image to file");
ss.str("");
ss.clear();
ss << "./dense_cpu_" << std::setfill('0') << std::setw(3) << angle << ".ppm";
img->writePPM(ss.str(), "Benchmark test");
//mTimer.stop();
} // loop over angle
} // DenseGrid_CPU
#if defined(NANOVDB_USE_CUDA)
// Convenience function for checking CUDA runtime API results
// can be wrapped around any runtime API call. No-op in release builds.
#define cudaCheck(ans) \
{ \
gpuAssert((ans), __FILE__, __LINE__); \
}
static inline bool gpuAssert(cudaError_t code, const char* file, int line, bool abort = true)
{
#if defined(DEBUG) || defined(_DEBUG)
if (code != cudaSuccess) {
fprintf(stderr, "CUDA Runtime Error: %s %s %d\n", cudaGetErrorString(code), file, line);
if (abort)
exit(code);
return false;
}
#endif
return true;
}
extern "C" void launch_kernels(const nanovdb::GridHandle<nanovdb::CudaDeviceBuffer>&,
nanovdb::ImageHandle<nanovdb::CudaDeviceBuffer>&,
const nanovdb::Camera<float>*,
cudaStream_t stream);
TEST_F(Benchmark, NanoVDB_GPU)
{
using BufferT = nanovdb::CudaDeviceBuffer;
using RealT = float;
using Vec3T = nanovdb::Vec3<RealT>;
using CameraT = nanovdb::Camera<RealT>;
const std::string image_path = this->getEnvVar("VDB_SCRATCH_PATH", ".");
// The first CUDA run time call initializes the CUDA sub-system (loads the runtime API) which takes time!
int deviceCount;
cudaGetDeviceCount(&deviceCount);
for (int device = 0; device < deviceCount; ++device) {
cudaDeviceProp deviceProp;
cudaGetDeviceProperties(&deviceProp, device);
printf("Device %d has compute capability %d.%d.\n",
device,
deviceProp.major,
deviceProp.minor);
}
cudaSetDevice(0);
cudaStream_t stream;
cudaCheck(cudaStreamCreate(&stream));
#if defined(NANOVDB_USE_OPENVDB)
auto handle = nanovdb::io::readGrid<BufferT>("data/test.nvdb");
#else
auto handle = nanovdb::createLevelSetTorus<float, float, BufferT>(100.0f, 50.0f);
#endif
//auto handle = nanovdb::io::readGrid<BufferT>("data/test.nvdb");
const auto* grid = handle.grid<float>();
EXPECT_TRUE(grid);
EXPECT_TRUE(grid->isLevelSet());
EXPECT_FALSE(grid->isFogVolume());
handle.deviceUpload(stream, false);
std::cout << "\nRay-tracing NanoVDB grid named \"" << grid->gridName() << "\"" << std::endl;
const int width = 1280, height = 720;
const RealT vfov = 25.0f, aspect = RealT(width) / height, radius = 300.0f;
const auto bbox = grid->worldBBox();
const Vec3T lookat(0.5 * (bbox.min() + bbox.max())), up(0, -1, 0);
auto eye = [&lookat, &radius](int angle) {
const RealT theta = angle * M_PI / 180.0f;
return lookat + radius * Vec3T(sin(theta), 0, cos(theta));
};
CameraT *host_camera, *dev_camera;
cudaCheck(cudaMalloc((void**)&dev_camera, sizeof(CameraT))); // un-managed memory on the device
cudaCheck(cudaMallocHost((void**)&host_camera, sizeof(CameraT)));
nanovdb::ImageHandle<BufferT> imgHandle(width, height);
auto* img = imgHandle.image();
imgHandle.deviceUpload(stream, false);
for (int angle = 0; angle < 6; ++angle) {
std::stringstream ss;
ss << "NanoVDB: GPU kernel with " << img->size() << " rays";
host_camera->update(eye(angle), lookat, up, vfov, aspect);
cudaCheck(cudaMemcpyAsync(dev_camera, host_camera, sizeof(CameraT), cudaMemcpyHostToDevice, stream));
mTimer.start(ss.str());
launch_kernels(handle, imgHandle, dev_camera, stream);
mTimer.stop();
//mTimer.start("Write image to file");
imgHandle.deviceDownload(stream);
ss.str("");
ss.clear();
ss << image_path << "/nanovdb_gpu_" << std::setfill('0') << std::setw(3) << angle << ".ppm";
img->writePPM(ss.str(), "Benchmark test");
//mTimer.stop();
} //frame number angle
cudaCheck(cudaStreamDestroy(stream));
cudaCheck(cudaFree(host_camera));
cudaCheck(cudaFree(dev_camera));
} // NanoVDB_GPU
#endif
int main(int argc, char** argv)
{
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
@@ -1,127 +0,0 @@
// Copyright Contributors to the OpenVDB Project
// SPDX-License-Identifier: MPL-2.0
/// @file Benchmark_nano.cc
///
/// @author Ken Museth
///
/// @brief A super lightweight and portable ray-tracing benchmark
/// that only depends on NanoVDB (not OpenVDB) and CUDA.
#include <nanovdb/util/IO.h>
#include <nanovdb/util/CudaDeviceBuffer.h>
#include "Image.h"
#include "Camera.h"
#include "DenseGrid.h"
#include "../ex_util/CpuTimer.h"
#include <iomanip>// for std::setfill and std::setw
// Convenience function for checking CUDA runtime API results
// can be wrapped around any runtime API call. No-op in release builds.
#define cudaCheck(ans) \
{ \
gpuAssert((ans), __FILE__, __LINE__); \
}
static inline bool gpuAssert(cudaError_t code, const char* file, int line, bool abort = true)
{
#if defined(DEBUG) || defined(_DEBUG)
if (code != cudaSuccess) {
fprintf(stderr, "CUDA Runtime Error: %s %s %d\n", cudaGetErrorString(code), file, line);
if (abort)
exit(code);
return false;
}
#endif
return true;
}
extern "C" float launch_kernels(const nanovdb::DenseGridHandle<nanovdb::CudaDeviceBuffer>&,
nanovdb::ImageHandle<nanovdb::CudaDeviceBuffer>&,
const nanovdb::Camera<float>*,
cudaStream_t stream);
int main(int argc, char** argv)
{
using BufferT = nanovdb::CudaDeviceBuffer;
using RealT = float;
using Vec3T = nanovdb::Vec3<RealT>;
using CameraT = nanovdb::Camera<RealT>;
nanovdb::CpuTimer<> timer;
if (argc!=2) {
std::cerr << "Usage: " << argv[0] << " path/level_set.vol" << std::endl;
//std::cerr << "To generate an input file: nanovdb_convert dragon.vdb dragon.nvdb\n";
return 1;
}
// The first CUDA run time call initializes the CUDA sub-system (loads the runtime API) which takes time!
int deviceCount;
cudaGetDeviceCount(&deviceCount);
for (int device = 0; device < deviceCount; ++device) {
cudaDeviceProp deviceProp;
cudaGetDeviceProperties(&deviceProp, device);
printf("Device %d has compute capability %d.%d.\n",
device,
deviceProp.major,
deviceProp.minor);
}
cudaSetDevice(0);
cudaStream_t stream;
cudaCheck(cudaStreamCreate(&stream));
auto handle = nanovdb::io::readDense<BufferT>(argv[1]);
const auto* grid = handle.grid<float>();
if (!grid || !grid->isLevelSet()) {
std::cerr << "Error loading NanoVDB level set from file" << std::endl;
return 1;
}
handle.deviceUpload(stream, false);
std::cout << "\nRay-tracing DenseGrid of size "
<< (grid->gridSize() >> 20) << " MB" << std::endl;
const int width = 1280, height = 720;
const RealT vfov = 25.0f, aspect = RealT(width) / height, radius = 300.0f;
const auto bbox = grid->worldBBox();
const Vec3T lookat(0.5 * (bbox.min() + bbox.max())), up(0, -1, 0);
auto eye = [&lookat, &radius](int angle) {
const RealT theta = angle * M_PI / 180.0f;
return lookat + radius * Vec3T(sin(theta), 0, cos(theta));
};
CameraT *host_camera, *dev_camera;
cudaCheck(cudaMalloc((void**)&dev_camera, sizeof(CameraT))); // un-managed memory on the device
cudaCheck(cudaMallocHost((void**)&host_camera, sizeof(CameraT)));
nanovdb::ImageHandle<BufferT> imgHandle(width, height);
auto* img = imgHandle.image();
imgHandle.deviceUpload(stream, false);
float elapsedTime = 0.0f;
const int maxAngle = 360;
for (int angle = 0; angle < maxAngle; ++angle) {
host_camera->update(eye(angle), lookat, up, vfov, aspect);
cudaCheck(cudaMemcpyAsync(dev_camera, host_camera, sizeof(CameraT), cudaMemcpyHostToDevice, stream));
elapsedTime += launch_kernels(handle, imgHandle, dev_camera, stream);
//timer.start("Write image to file");
imgHandle.deviceDownload(stream);
std::stringstream ss;
ss << "./dense_gpu_" << std::setfill('0') << std::setw(3) << angle << ".ppm";
img->writePPM(ss.str(), "Benchmark test");
//timer.stop();
} //frame number angle
cudaCheck(cudaStreamDestroy(stream));
cudaCheck(cudaFree(host_camera));
cudaCheck(cudaFree(dev_camera));
printf("\nRay-traced %i different frames, each with %i rays, in %5.3f ms.\nThis corresponds to an average of %5.3f ms per frame or %5.3f FPS!\n",
maxAngle, imgHandle.image()->size(), elapsedTime, elapsedTime/maxAngle, 1000.0f*maxAngle/elapsedTime);
return 0;
}
@@ -1,134 +0,0 @@
// Copyright Contributors to the OpenVDB Project
// SPDX-License-Identifier: MPL-2.0
/// @file Benchmark_nano.cc
///
/// @author Ken Museth
///
/// @brief A super lightweight and portable ray-tracing benchmark
/// that only depends on NanoVDB (not OpenVDB) and CUDA.
#include <nanovdb/util/IO.h>
#include <nanovdb/util/CudaDeviceBuffer.h>
#include "Image.h"
#include "Camera.h"
#include "../ex_util/CpuTimer.h"
#include <iomanip>// for std::setfill and std::setw
// Convenience function for checking CUDA runtime API results
// can be wrapped around any runtime API call. No-op in release builds.
#define cudaCheck(ans) \
{ \
gpuAssert((ans), __FILE__, __LINE__); \
}
static inline bool gpuAssert(cudaError_t code, const char* file, int line, bool abort = true)
{
#if defined(DEBUG) || defined(_DEBUG)
if (code != cudaSuccess) {
fprintf(stderr, "CUDA Runtime Error: %s %s %d\n", cudaGetErrorString(code), file, line);
if (abort)
exit(code);
return false;
}
#endif
return true;
}
extern "C" float launch_kernels(const nanovdb::GridHandle<nanovdb::CudaDeviceBuffer>&,
nanovdb::ImageHandle<nanovdb::CudaDeviceBuffer>&,
const nanovdb::Camera<float>*,
cudaStream_t stream);
int main(int argc, char** argv)
{
using BufferT = nanovdb::CudaDeviceBuffer;
using ValueT = float;
using BuildT = nanovdb::FpN;
using Vec3T = nanovdb::Vec3<ValueT>;
using CameraT = nanovdb::Camera<ValueT>;
nanovdb::CpuTimer<> timer;
if (argc!=2) {
std::cerr << "Usage: " << argv[0] << " path/level_set.nvdb" << std::endl;
std::cerr << "To generate an input file: nanovdb_convert dragon.vdb dragon.nvdb\n";
return 1;
}
// The first CUDA run time call initializes the CUDA sub-system (loads the runtime API) which takes time!
int deviceCount;
cudaGetDeviceCount(&deviceCount);
for (int device = 0; device < deviceCount; ++device) {
cudaDeviceProp deviceProp;
cudaGetDeviceProperties(&deviceProp, device);
printf("Device %d has compute capability %d.%d.\n",
device,
deviceProp.major,
deviceProp.minor);
}
cudaSetDevice(0);
int driverVersion, runtimeVersion;
cudaDriverGetVersion(&driverVersion);
cudaRuntimeGetVersion(&runtimeVersion);
printf("CUDA driver version:\t%i.%i\n", driverVersion/1000, (driverVersion%1000)/10);
printf("CUDA runtime version:\t%i.%i\n", runtimeVersion/1000, (runtimeVersion%1000)/10);
cudaStream_t stream;
cudaCheck(cudaStreamCreate(&stream));
auto handle = nanovdb::io::readGrid<BufferT>(argv[1]);
const auto* grid = handle.grid<BuildT>();
if (!grid || !grid->isLevelSet()) {
std::cerr << "Error loading NanoVDB level set from file" << std::endl;
return 1;
}
handle.deviceUpload(stream, false);
std::cout << "\nRay-tracing NanoVDB grid named \"" << grid->gridName() << "\" of size "
<< (grid->gridSize() >> 20) << " MB" << std::endl;
const int width = 1280, height = 720;
const ValueT vfov = 25.0f, aspect = ValueT(width) / height, radius = 300.0f;
const auto bbox = grid->worldBBox();
const Vec3T lookat(0.5 * (bbox.min() + bbox.max())), up(0, -1, 0);
auto eye = [&lookat, &radius](int angle) {
const ValueT theta = angle * M_PI / 180.0f;
return lookat + radius * Vec3T(sin(theta), 0, cos(theta));
};
CameraT *host_camera, *dev_camera;
cudaCheck(cudaMalloc((void**)&dev_camera, sizeof(CameraT))); // un-managed memory on the device
cudaCheck(cudaMallocHost((void**)&host_camera, sizeof(CameraT)));
nanovdb::ImageHandle<BufferT> imgHandle(width, height);
auto* img = imgHandle.image();
imgHandle.deviceUpload(stream, false);
float elapsedTime = 0.0f;
const int maxAngle = 360;
for (int angle = 0; angle < maxAngle; ++angle) {
host_camera->update(eye(angle), lookat, up, vfov, aspect);
cudaCheck(cudaMemcpyAsync(dev_camera, host_camera, sizeof(CameraT), cudaMemcpyHostToDevice, stream));
elapsedTime += launch_kernels(handle, imgHandle, dev_camera, stream);
//timer.start("Write image to file");
imgHandle.deviceDownload(stream);
#if 1
std::stringstream ss;
ss << "./nanovdb_gpu_" << std::setfill('0') << std::setw(3) << angle << ".ppm";
img->writePPM(ss.str(), "Benchmark test");
#endif
//timer.stop();
} //frame number angle
cudaCheck(cudaStreamDestroy(stream));
cudaCheck(cudaFree(host_camera));
cudaCheck(cudaFree(dev_camera));
printf("\nRay-traced %i different frames, each with %i rays, in %5.3f ms.\nThis corresponds to an average of %5.3f ms per frame or %5.3f FPS!\n",
maxAngle, imgHandle.image()->size(), elapsedTime, elapsedTime/maxAngle, 1000.0f*maxAngle/elapsedTime);
return 0;
}
@@ -1,74 +0,0 @@
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: MPL-2.0
#
#[=======================================================================[
CMake Configuration for NanoVDB Benchmark
#]=======================================================================]
cmake_minimum_required(VERSION 3.15)
project(NanoVDBBenchmark LANGUAGES CXX)
include(GNUInstallDirs)
###############################################################################
message(STATUS "----------------------------------------------------")
message(STATUS "---------- Configuring NanoVDB Benchmark -----------")
message(STATUS "----------------------------------------------------")
###############################################################################
if(WIN32 AND NANOVDB_CUDA_KEEP_PTX)
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/x64/Release")
endif()
# -----------------------------------------------------------------------
# TODO: Benchmark should probably not require gtest.
if(NOT TARGET GTest::GTest)
message(WARNING " - GTest required to build benchmark. Skipping.")
return()
endif()
# -----------------------------------------------------------------------
# many of the sample projects depend on a data directory. This allows Debug
# launching from the cmake binary working directory.
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/data")
set(BENCHMARK_SOURCES Benchmark.cc Camera.h Image.h)
if(NANOVDB_USE_CUDA)
list(APPEND BENCHMARK_SOURCES BenchKernels_nano.cu)
add_executable(benchmark_nano Benchmark_nano.cc BenchKernels_nano.cu)
add_executable(benchmark_dense Benchmark_dense.cc BenchKernels_dense.cu)
target_link_libraries(benchmark_nano PRIVATE nanovdb)
target_link_libraries(benchmark_dense PRIVATE nanovdb)
# Propagate MSVC Runtime from the OpenVDB library (if VDB_MSVC_RUNTIME_SELECTION
# has been set then we're building and linking against OpenVDB, see the root
# NanoVDB CMakeLists.txt)
if(VDB_MSVC_RUNTIME_SELECTION)
set_target_properties(benchmark_nano PROPERTIES
MSVC_RUNTIME_LIBRARY ${VDB_MSVC_RUNTIME_SELECTION})
set_target_properties(benchmark_dense PROPERTIES
MSVC_RUNTIME_LIBRARY ${VDB_MSVC_RUNTIME_SELECTION})
endif()
endif()
# -----------------------------------------------------------------------
add_executable(benchmark ${BENCHMARK_SOURCES})
target_link_libraries(benchmark PRIVATE nanovdb GTest::GTest GTest::Main)
# Propagate MSVC Runtime from the OpenVDB library (if VDB_MSVC_RUNTIME_SELECTION
# has been set then we're building and linking against OpenVDB, see the root
# NanoVDB CMakeLists.txt)
if(VDB_MSVC_RUNTIME_SELECTION)
set_target_properties(benchmark PROPERTIES
MSVC_RUNTIME_LIBRARY ${VDB_MSVC_RUNTIME_SELECTION})
endif()
install(TARGETS benchmark DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples)
@@ -1,72 +0,0 @@
// Copyright Contributors to the OpenVDB Project
// SPDX-License-Identifier: MPL-2.0
/// @file Camera.h
///
/// @author Ken Museth
///
/// @brief A simple camera class.
#ifndef NANOVDB_CAMERA_H_HAS_BEEN_INCLUDED
#define NANOVDB_CAMERA_H_HAS_BEEN_INCLUDED
#include <nanovdb/NanoVDB.h> // for Vec3
#include <nanovdb/util/Ray.h>
namespace nanovdb {
/// @brief A minimal perspective camera for ray generation
template<typename RealT = float, typename Vec3T = Vec3<RealT>, typename RayT = Ray<RealT>>
class Camera
{
Vec3T mEye, mW, mU, mV;
__hostdev__ void init(RealT vfov, RealT aspect)
{
const RealT halfHeight = RealT(tan(vfov * 3.14159265358979323846 / 360));
const RealT halfWidth = aspect * halfHeight;
mW = halfWidth * mU + halfHeight * mV + mW; // remove eye here and in getRay
mU *= 2 * halfWidth;
mV *= 2 * halfHeight;
}
public:
/// @brief default Ctor.
Camera() = default;
/// @brief Ctor. // vfov is top to bottom in degrees
/// @note up is assumed to be a unit-vector
__hostdev__ Camera(const Vec3T& eye, const Vec3T& lookat, const Vec3T& up, RealT vfov, RealT aspect)
: mEye(eye)
, mW((eye - lookat).normalize())
, mU(up.cross(mW))
, mV(up)
{
this->init(vfov, aspect);
}
__hostdev__ void update(const Vec3T& eye, const Vec3T& lookat, const Vec3T& up, RealT vfov, RealT aspect)
{
mEye = eye;
mV = up;
mW = mEye - lookat;
mW.normalize();
mU = mV.cross(mW);
this->init(vfov, aspect);
}
/// @brief {u,v} are are assumed to be [0,1]
__hostdev__ RayT getRay(RealT u, RealT v) const {
auto dir = u * mU + v * mV - mW;
dir.normalize();
return RayT(mEye, dir);
}
__hostdev__ const Vec3T& P() const { return mEye; }
__hostdev__ const Vec3T& U() const { return mU; }
__hostdev__ const Vec3T& V() const { return mV; }
__hostdev__ const Vec3T& W() const { return mW; }
}; // Camera
} // namespace nanovdb
#endif // NANOVDB_CAMERA_HAS_BEEN_INCLUDED
@@ -1,487 +0,0 @@
// Copyright Contributors to the OpenVDB Project
// SPDX-License-Identifier: MPL-2.0
/// @file DenseGrid.h
///
/// @author Ken Museth
///
/// @brief Simple dense grid class.
#ifndef NANOVDB_DENSEGRID_H_HAS_BEEN_INCLUDED
#define NANOVDB_DENSEGRID_H_HAS_BEEN_INCLUDED
#include <stdint.h>// for uint64_t
#include <fstream> // for std::ifstream
#include <nanovdb/util/HostBuffer.h>// for default Buffer
#include <nanovdb/util/ForEach.h>
#include <nanovdb/NanoVDB.h>// for Map, GridClass, GridType and and Coord
// use 4x4x4 tiles for better cache coherence
// else it uses dense indexing which is slow!
// 0 means disable, 1 is 2x2x2, 2 is 4x4x4 and 3 is 8x8x8
#define LOG2_TILE_SIZE 2
namespace nanovdb {
// forward decleration
template<typename BufferT = HostBuffer>
class DenseGridHandle;
#define DENSE_MAGIC_NUMBER 0x42445665736e6544UL // "DenseVDB" in hex - little endian (uint64_t)
struct DenseData
{
Map mMap;// defined in NanoVDB.h
CoordBBox mIndexBBox;// min/max of bbox
BBox<Vec3R> mWorldBBox;// 48B. floating-point AABB of active values in WORLD SPACE (2 x 3 doubles)
Vec3R mVoxelSize;
GridClass mGridClass;// defined in NanoVDB.h
GridType mGridType; // defined in NanoVDB.h
uint64_t mY, mX;//strides in the y and x direction
uint64_t mSize;
__hostdev__ Coord dim() const { return mIndexBBox.dim(); }
// Affine transformations based on double precision
template<typename Vec3T>
__hostdev__ Vec3T applyMap(const Vec3T& xyz) const { return mMap.applyMap(xyz); } // Pos: index -> world
template<typename Vec3T>
__hostdev__ Vec3T applyInverseMap(const Vec3T& xyz) const { return mMap.applyInverseMap(xyz); } // Pos: world -> index
template<typename Vec3T>
__hostdev__ Vec3T applyJacobian(const Vec3T& xyz) const { return mMap.applyJacobian(xyz); } // Dir: index -> world
template<typename Vec3T>
__hostdev__ Vec3T applyInverseJacobian(const Vec3T& xyz) const { return mMap.applyInverseJacobian(xyz); } // Dir: world -> index
template<typename Vec3T>
__hostdev__ Vec3T applyIJT(const Vec3T& xyz) const { return mMap.applyIJT(xyz); }
// Affine transformations based on single precision
template<typename Vec3T>
__hostdev__ Vec3T applyMapF(const Vec3T& xyz) const { return mMap.applyMapF(xyz); } // Pos: index -> world
template<typename Vec3T>
__hostdev__ Vec3T applyInverseMapF(const Vec3T& xyz) const { return mMap.applyInverseMapF(xyz); } // Pos: world -> index
template<typename Vec3T>
__hostdev__ Vec3T applyJacobianF(const Vec3T& xyz) const { return mMap.applyJacobianF(xyz); } // Dir: index -> world
template<typename Vec3T>
__hostdev__ Vec3T applyInverseJacobianF(const Vec3T& xyz) const { return mMap.applyInverseJacobianF(xyz); } // Dir: world -> index
template<typename Vec3T>
__hostdev__ Vec3T applyIJTF(const Vec3T& xyz) const { return mMap.applyIJTF(xyz); }
};
/// @brief Simple dense grid class
/// @note ZYX is the memory-layout in VDB. It leads to nested
/// for-loops of the order x, y, z.
template<typename ValueT>
class DenseGrid : private DenseData
{
#if LOG2_TILE_SIZE > 0
static constexpr uint32_t TileLog2 = LOG2_TILE_SIZE, TileMask = (1 << TileLog2) - 1, TileDim = 1 << (3*TileLog2);
#endif
using DenseData = DenseData;
public:
using ValueType = ValueT;
template<typename BufferT = HostBuffer>
inline static DenseGridHandle<BufferT> create(Coord min, // min inclusive index coordinate
Coord max, // max inclusive index coordinate
double dx = 1.0, //voxel size
const Vec3d& p0 = Vec3d(0.0), // origin
GridClass gridClass = GridClass::Unknown,
const BufferT& allocator = BufferT());
__hostdev__ DenseGrid(const DenseGrid&) = delete;
__hostdev__ ~DenseGrid() = delete;
__hostdev__ DenseGrid& operator=(const DenseGrid&) = delete;
__hostdev__ uint64_t size() const { return mIndexBBox.volume(); }
__hostdev__ inline uint64_t coordToOffset(const Coord &ijk) const;
__hostdev__ inline bool test(const Coord &ijk) const;
__hostdev__ uint64_t memUsage() const {return mSize;}
__hostdev__ uint64_t gridSize() const {return this->memUsage();}
__hostdev__ const Coord& min() const { return mIndexBBox[0]; }
__hostdev__ const Coord& max() const { return mIndexBBox[1]; }
__hostdev__ inline bool isValidType() const;
/// @brief Return a const reference to the Map for this grid
__hostdev__ const Map& map() const { return DenseData::mMap; }
// @brief Return a const reference to the size of a voxel in world units
__hostdev__ const Vec3R& voxelSize() const { return DenseData::mVoxelSize; }
/// @brief world to index space transformation
template<typename Vec3T>
__hostdev__ Vec3T worldToIndex(const Vec3T& xyz) const { return this->applyInverseMap(xyz); }
/// @brief world to index space transformation
template<typename Vec3T>
__hostdev__ Vec3T indexToWorld(const Vec3T& xyz) const { return this->applyMap(xyz); }
/// @brief transformation from index space direction to world space direction
/// @warning assumes dir to be normalized
template<typename Vec3T>
__hostdev__ Vec3T indexToWorldDir(const Vec3T& dir) const { return this->applyJacobian(dir); }
/// @brief transformation from world space direction to index space direction
/// @warning assumes dir to be normalized
template<typename Vec3T>
__hostdev__ Vec3T worldToIndexDir(const Vec3T& dir) const { return this->applyInverseJacobian(dir); }
/// @brief transform the gradient from index space to world space.
/// @details Applies the inverse jacobian transform map.
template<typename Vec3T>
__hostdev__ Vec3T indexToWorldGrad(const Vec3T& grad) const { return this->applyIJT(grad); }
/// @brief world to index space transformation
template<typename Vec3T>
__hostdev__ Vec3T worldToIndexF(const Vec3T& xyz) const { return this->applyInverseMapF(xyz); }
/// @brief index to world space transformation
template<typename Vec3T>
__hostdev__ Vec3T indexToWorldF(const Vec3T& xyz) const { return this->applyMapF(xyz); }
/// @brief transformation from index space direction to world space direction
/// @warning assumes dir to be normalized
template<typename Vec3T>
__hostdev__ Vec3T indexToWorldDirF(const Vec3T& dir) const { return this->applyJacobianF(dir); }
/// @brief transformation from world space direction to index space direction
/// @warning assumes dir to be normalized
template<typename Vec3T>
__hostdev__ Vec3T worldToIndexDirF(const Vec3T& dir) const { return this->applyInverseJacobianF(dir); }
/// @brief Transforms the gradient from index space to world space.
/// @details Applies the inverse jacobian transform map.
template<typename Vec3T>
__hostdev__ Vec3T indexToWorldGradF(const Vec3T& grad) const { return DenseData::applyIJTF(grad); }
/// @brief Computes a AABB of active values in world space
__hostdev__ const BBox<Vec3R>& worldBBox() const { return DenseData::mWorldBBox; }
__hostdev__ bool isLevelSet() const { return DenseData::mGridClass == GridClass::LevelSet; }
__hostdev__ bool isFogVolume() const { return DenseData::mGridClass == GridClass::FogVolume; }
/// @brief Computes a AABB of active values in index space
///
/// @note This method is returning a floating point bounding box and not a CoordBBox. This makes
/// it more useful for clipping rays.
__hostdev__ const CoordBBox& indexBBox() const { return mIndexBBox; }
__hostdev__ const GridType& gridType() const { return DenseData::mGridType; }
__hostdev__ const GridClass& gridClass() const { return DenseData::mGridClass; }
__hostdev__ DenseData* data() { return reinterpret_cast<DenseData*>(this); }
__hostdev__ const DenseData* data() const { return reinterpret_cast<const DenseData*>(this); }
__hostdev__ ValueT* values() { return reinterpret_cast<ValueT*>(this+1);}
__hostdev__ const ValueT* values() const { return reinterpret_cast<const ValueT*>(this+1); }
__hostdev__ inline const ValueT& getValue(const Coord &ijk) const;
__hostdev__ inline void setValue(const Coord &ijk, const ValueT &v);
}; // Grid
template<typename ValueT>
template<typename BufferT>
DenseGridHandle<BufferT>
DenseGrid<ValueT>::create(Coord min,
Coord max,
double dx, //voxel size
const Vec3d& p0, // origin
GridClass gridClass,
const BufferT& allocator)
{
if (dx <= 0) {
throw std::runtime_error("GridBuilder: voxel size is zero or negative");
}
max += Coord(1,1,1);// now max is exclusive
#if LOG2_TILE_SIZE > 0
const uint64_t dim[3] = {(uint64_t(max[0] - min[0]) + TileMask) >> TileLog2,
(uint64_t(max[1] - min[1]) + TileMask) >> TileLog2,
(uint64_t(max[2] - min[2]) + TileMask) >> TileLog2};
const uint64_t size = sizeof(DenseGrid) + sizeof(ValueT)*TileDim*dim[0]*dim[1]*dim[2];
#else
const uint64_t dim[3] = {uint64_t(max[0] - min[0]),
uint64_t(max[1] - min[1]),
uint64_t(max[2] - min[2])};
const uint64_t size = sizeof(DenseGrid) + sizeof(ValueT)*dim[0]*dim[1]*dim[2];
#endif
DenseGridHandle<BufferT> handle(allocator.create(size));
DenseGrid* grid = reinterpret_cast<DenseGrid*>(handle.data());
grid->mSize = size;
const double Tx = p0[0], Ty = p0[1], Tz = p0[2];
const double mat[4][4] = {
{dx, 0.0, 0.0, 0.0}, // row 0
{0.0, dx, 0.0, 0.0}, // row 1
{0.0, 0.0, dx, 0.0}, // row 2
{Tx, Ty, Tz, 1.0}, // row 3
};
const double invMat[4][4] = {
{1 / dx, 0.0, 0.0, 0.0}, // row 0
{0.0, 1 / dx, 0.0, 0.0}, // row 1
{0.0, 0.0, 1 / dx, 0.0}, // row 2
{-Tx, -Ty, -Tz, 1.0}, // row 3
};
grid->mMap.set(mat, invMat, 1.0);
for (int i=0; i<3; ++i) {
grid->mIndexBBox[0][i] = min[i];
grid->mIndexBBox[1][i] = max[i] - 1;
}
grid->mWorldBBox[0] = grid->mWorldBBox[1] = grid->mMap.applyMap(Vec3d(min[0], min[1], min[2]));
grid->mWorldBBox.expand(grid->mMap.applyMap(Vec3d(min[0], min[1], max[2])));
grid->mWorldBBox.expand(grid->mMap.applyMap(Vec3d(min[0], max[1], min[2])));
grid->mWorldBBox.expand(grid->mMap.applyMap(Vec3d(max[0], min[1], min[2])));
grid->mWorldBBox.expand(grid->mMap.applyMap(Vec3d(max[0], max[1], min[2])));
grid->mWorldBBox.expand(grid->mMap.applyMap(Vec3d(max[0], min[1], max[2])));
grid->mWorldBBox.expand(grid->mMap.applyMap(Vec3d(min[0], max[1], max[2])));
grid->mWorldBBox.expand(grid->mMap.applyMap(Vec3d(max[0], max[1], max[2])));
grid->mVoxelSize = grid->mMap.applyMap(Vec3d(1)) - grid->mMap.applyMap(Vec3d(0));
if (gridClass == GridClass::LevelSet && !is_floating_point<ValueT>::value)
throw std::runtime_error("Level sets are expected to be floating point types");
if (gridClass == GridClass::FogVolume && !is_floating_point<ValueT>::value)
throw std::runtime_error("Fog volumes are expected to be floating point types");
grid->mGridClass = gridClass;
grid->mGridType = mapToGridType<ValueT>();
grid->mY = dim[2];
grid->mX = dim[2] * dim[1];
return handle;
}
template<typename ValueT>
bool DenseGrid<ValueT>::test(const Coord &ijk) const
{
return (ijk[0]>=mIndexBBox[0][0]) && (ijk[0]<=mIndexBBox[1][0]) &&
(ijk[1]>=mIndexBBox[0][1]) && (ijk[1]<=mIndexBBox[1][1]) &&
(ijk[2]>=mIndexBBox[0][2]) && (ijk[2]<=mIndexBBox[1][2]);
}
template<typename ValueT>
uint64_t DenseGrid<ValueT>::coordToOffset(const Coord &ijk) const
{
assert(this->test(ijk));
#if LOG2_TILE_SIZE > 0
const uint32_t x = ijk[0] - mIndexBBox[0][0];
const uint32_t y = ijk[1] - mIndexBBox[0][1];
const uint32_t z = ijk[2] - mIndexBBox[0][2];
return ((mX*(x>>TileLog2) + mY*(y>>TileLog2) + (z>>TileLog2))<<(3*TileLog2)) +
((x&TileMask)<<(2*TileLog2)) + ((y&TileMask)<<TileLog2) + (z&TileMask);
#else
return uint64_t(ijk[0]-mIndexBBox[0][0])*mX +
uint64_t(ijk[1]-mIndexBBox[0][1])*mY +
uint64_t(ijk[2]-mIndexBBox[0][2]);
#endif
}
template<typename ValueT>
const ValueT& DenseGrid<ValueT>::getValue(const Coord &ijk) const
{
return this->values()[this->coordToOffset(ijk)];
}
template<typename ValueT>
void DenseGrid<ValueT>::setValue(const Coord &ijk, const ValueT &value)
{
this->values()[this->coordToOffset(ijk)] = value;
}
template<typename ValueT>
bool DenseGrid<ValueT>::isValidType() const
{
return std::is_same<float, ValueT>::value ? mGridType == GridType::Float : false;
}
/////////////////////////////////////////////
namespace io{
template<typename ValueT>
void writeDense(const DenseGrid<ValueT> &grid, const char* fileName)
{
std::ofstream os(fileName, std::ios::out | std::ios::binary | std::ios::trunc);
if (!os.is_open()) {
throw std::runtime_error("Unable to open file for output");
}
const uint64_t tmp[2] = {DENSE_MAGIC_NUMBER, grid.memUsage()};
os.write(reinterpret_cast<const char*>(tmp), 2*sizeof(uint64_t));
os.write(reinterpret_cast<const char*>(&grid), tmp[1]);
}
template<typename BufferT>
void writeDense(const DenseGridHandle<BufferT> &handle, const char* fileName)
{
std::ofstream os(fileName, std::ios::out | std::ios::binary | std::ios::trunc);
if (!os.is_open()) {
throw std::runtime_error("Unable to open file for output");
}
const uint64_t tmp[2] = {DENSE_MAGIC_NUMBER, handle.size()};
os.write(reinterpret_cast<const char*>(tmp), 2*sizeof(uint64_t));
os.write(reinterpret_cast<const char*>(handle.data()), tmp[1]);
}
template<typename BufferT = HostBuffer>
DenseGridHandle<BufferT>
readDense(const char* fileName, const BufferT& allocator = BufferT())
{
std::ifstream is(fileName, std::ios::in | std::ios::binary);
if (!is.is_open()) {
throw std::runtime_error("Unable to open file for input");
}
uint64_t tmp[2];
is.read(reinterpret_cast<char*>(tmp), 2*sizeof(uint64_t));
if (tmp[0] != DENSE_MAGIC_NUMBER) {
throw std::runtime_error("This is not a dense NanoVDB file!");
}
DenseGridHandle<BufferT> handle(allocator.create(tmp[1]));
is.read(reinterpret_cast<char*>(handle.data()), tmp[1]);
return handle;
}
}// namespace io
/////////////////////////////////////////////
/// @brief Converts a NanoVDB grid to a DenseGrid
template<typename GridT, typename BufferT = HostBuffer>
DenseGridHandle<BufferT> convertToDense(const GridT &grid, const BufferT& allocator = BufferT())
{
using ValueT = typename GridT::ValueType;
using DenseT = DenseGrid<ValueT>;
const Coord min = grid.indexBBox().min(), max = grid.indexBBox().max() + Coord(1,1,1);// max is exclusive!
#if LOG2_TILE_SIZE > 0
static constexpr uint32_t TileLog2 = LOG2_TILE_SIZE, TileMask = (1 << TileLog2) - 1, TileDim = 1 << (3*TileLog2);
const uint64_t dim[3] = {(uint64_t(max[0] - min[0]) + TileMask) >> TileLog2,
(uint64_t(max[1] - min[1]) + TileMask) >> TileLog2,
(uint64_t(max[2] - min[2]) + TileMask) >> TileLog2};
const uint64_t size = sizeof(DenseT) + sizeof(ValueT)*TileDim*dim[0]*dim[1]*dim[2];
#else
const uint64_t dim[3] = {uint64_t(max[0] - min[0]),
uint64_t(max[1] - min[1]),
uint64_t(max[2] - min[2])};
const uint64_t size = sizeof(DenseT) + sizeof(ValueT)*dim[0]*dim[1]*dim[2];
#endif
DenseGridHandle<BufferT> handle( allocator.create(size) );
auto *dense = reinterpret_cast<DenseT*>(handle.data());
auto *data = dense->data();
// copy DenseData
data->mMap = grid.map();
data->mIndexBBox = grid.indexBBox();
data->mWorldBBox = grid.worldBBox();
data->mVoxelSize = grid.voxelSize();
data->mGridClass = grid.gridClass();
data->mGridType = grid.gridType();
data->mY = dim[2];
data->mX = dim[2] * dim[1];
data->mSize = size;
// copy values
auto kernel = [&](const Range<1,int> &r) {
auto acc = grid.getAccessor();
Coord ijk;
for (ijk[0] = r.begin(); ijk[0] < r.end(); ++ijk[0]) {
for (ijk[1] = min[1]; ijk[1] < max[1]; ++ijk[1]) {
for (ijk[2] = min[2]; ijk[2] < max[2]; ++ijk[2]) {
dense->setValue(ijk, acc.getValue(ijk));
}
}
}
};
Range<1,int> range(min[0], max[0]);
#if 1
forEach(range, kernel);
#else
kernel(range);
#endif
return handle;
}
/////////////////////////////////////////////
template<typename BufferT>
class DenseGridHandle
{
BufferT mBuffer;
public:
DenseGridHandle(BufferT&& resources) { mBuffer = std::move(resources); }
DenseGridHandle() = default;
/// @brief Disallow copy-construction
DenseGridHandle(const DenseGridHandle&) = delete;
/// @brief Disallow copy assignment operation
DenseGridHandle& operator=(const DenseGridHandle&) = delete;
/// @brief Move copy assignment operation
DenseGridHandle& operator=(DenseGridHandle&& other) noexcept
{
mBuffer = std::move(other.mBuffer);
return *this;
}
/// @brief Move copy-constructor
DenseGridHandle(DenseGridHandle&& other) noexcept { mBuffer = std::move(other.mBuffer); }
/// @brief Default destructor
~DenseGridHandle() { this->reset(); }
void reset() { mBuffer.clear(); }
BufferT& buffer() { return mBuffer; }
const BufferT& buffer() const { return mBuffer; }
/// @brief Returns a non-const pointer to the data.
///
/// @warning Note that the return pointer can be NULL if the DenseGridHandle was not initialized
uint8_t* data() {return mBuffer.data();}
/// @brief Returns a const pointer to the data.
///
/// @warning Note that the return pointer can be NULL if the DenseGridHandle was not initialized
const uint8_t* data() const {return mBuffer.data();}
/// @brief Returns the size in bytes of the raw memory buffer managed by this DenseGridHandle's allocator.
uint64_t size() const { return mBuffer.size();}
/// @brief Returns a const pointer to the NanoVDB grid encoded in the DenseGridHandle.
///
/// @warning Note that the return pointer can be NULL if the DenseGridHandle was not initialized or the template
/// parameter does not match!
template<typename ValueT>
const DenseGrid<ValueT>* grid() const
{
using GridT = const DenseGrid<ValueT>;
GridT* grid = reinterpret_cast<GridT*>(mBuffer.data());
return (grid && grid->isValidType()) ? grid : nullptr;
}
template<typename ValueT>
DenseGrid<ValueT>* grid()
{
using GridT = DenseGrid<ValueT>;
GridT* grid = reinterpret_cast<GridT*>(mBuffer.data());
return (grid && grid->isValidType()) ? grid : nullptr;
}
template<typename ValueT, typename U = BufferT>
typename std::enable_if<BufferTraits<U>::hasDeviceDual, const DenseGrid<ValueT>*>::type
deviceGrid() const
{
using GridT = const DenseGrid<ValueT>;
bool isValidType = reinterpret_cast<GridT*>(mBuffer.data())->isValidType();
GridT* grid = reinterpret_cast<GridT*>(mBuffer.deviceData());
return (grid && isValidType) ? grid : nullptr;
}
template<typename U = BufferT>
typename std::enable_if<BufferTraits<U>::hasDeviceDual, void>::type
deviceUpload(void* stream = nullptr, bool sync = true) {
mBuffer.deviceUpload(stream, sync);
}
template<typename U = BufferT>
typename std::enable_if<BufferTraits<U>::hasDeviceDual, void>::type
deviceDownload(void* stream = nullptr, bool sync = true) {
mBuffer.deviceDownload(stream, sync);
}
}; // DenseGridHandle
} // namespace nanovdb
#endif // NANOVDB_DENSEGRID_HAS_BEEN_INCLUDED
-159
View File
@@ -1,159 +0,0 @@
// Copyright Contributors to the OpenVDB Project
// SPDX-License-Identifier: MPL-2.0
/*!
\file Image.h
\author Ken Museth
\date January 8, 2020
\brief A simple image class that uses pinned memory for fast GPU transfer
\warning This class is only included to support benchmark-tests.
*/
#ifndef NANOVDB_IMAGE_H_HAS_BEEN_INCLUDED
#define NANOVDB_IMAGE_H_HAS_BEEN_INCLUDED
#include <stdint.h> // for uint8_t
#include <string> // for std::string
#include <fstream> // for std::ofstream
#include <cassert>
#include <nanovdb/util/HostBuffer.h>
#if defined(NANOVDB_USE_TBB)
#include <tbb/parallel_for.h>
#include <tbb/blocked_range2d.h>
#endif
namespace nanovdb {
struct ImageData
{
int mWidth, mHeight, mSize;
float mScale[2];
ImageData(int w, int h)
: mWidth(w)
, mHeight(h)
, mSize(w * h)
, mScale{1.0f / w, 1.0f / h}
{
}
};
/// @note Can only be constructed by an ImageHandle
class Image : private ImageData
{
using DataT = ImageData;
public:
struct ColorRGB
{
uint8_t r, g, b;
__hostdev__ ColorRGB(float _r, float _g, float _b)
: r(uint8_t(_r * 255.0f))
, g(uint8_t(_g * 255.0f))
, b(uint8_t(_b * 255.0f))
{
}
};
void clear(int log2 = 7);
__hostdev__ int width() const { return DataT::mWidth; }
__hostdev__ int height() const { return DataT::mHeight; }
__hostdev__ int size() const { return DataT::mSize; }
__hostdev__ float u(int w) const { return w * mScale[0]; }
__hostdev__ float v(int h) const { return h * mScale[1]; }
__hostdev__ inline ColorRGB& operator()(int w, int h);
void writePPM(const std::string& fileName, const std::string& comment = "width height 255");
}; // Image
template<typename BufferT = HostBuffer>
class ImageHandle
{
BufferT mBuffer;
public:
ImageHandle(int width, int height, int log2 = 7);
const Image* image() const { return reinterpret_cast<const Image*>(mBuffer.data()); }
Image* image() { return reinterpret_cast<Image*>(mBuffer.data()); }
template<typename U = BufferT>
typename std::enable_if<BufferTraits<U>::hasDeviceDual, const Image*>::type
deviceImage() const { return reinterpret_cast<const Image*>(mBuffer.deviceData()); }
template<typename U = BufferT>
typename std::enable_if<BufferTraits<U>::hasDeviceDual, Image*>::type
deviceImage() { return reinterpret_cast<Image*>(mBuffer.deviceData()); }
template<typename U = BufferT>
typename std::enable_if<BufferTraits<U>::hasDeviceDual, void>::type
deviceUpload(void* stream = nullptr, bool sync = true) { mBuffer.deviceUpload(stream, sync); }
template<typename U = BufferT>
typename std::enable_if<BufferTraits<U>::hasDeviceDual, void>::type
deviceDownload(void* stream = nullptr, bool sync = true) { mBuffer.deviceDownload(stream, sync); }
};
template<typename BufferT>
ImageHandle<BufferT>::ImageHandle(int width, int height, int log2)
: mBuffer(sizeof(ImageData) + width * height * sizeof(Image::ColorRGB))
{
ImageData data(width, height);
*reinterpret_cast<ImageData*>(mBuffer.data()) = data;
this->image()->clear(log2); // clear pixels or set background
}
inline void Image::clear(int log2)
{
ColorRGB* ptr = &(*this)(0, 0);
if (log2 < 0) {
for (auto* end = ptr + ImageData::mSize; ptr != end;)
*ptr++ = ColorRGB(0, 0, 0);
} else {
const int checkerboard = 1 << log2;
auto kernel2D = [&](int x0, int y0, int x1, int y1) {
for (int h = y0; h != y1; ++h) {
const int n = h & checkerboard;
ColorRGB* p = ptr + h * ImageData::mWidth;
for (int w = x0; w != x1; ++w) {
*(p + w) = (n ^ (w & checkerboard)) ? ColorRGB(1, 1, 1) : ColorRGB(0, 0, 0);
}
}
};
#if defined(NANOVDB_USE_TBB)
tbb::blocked_range2d<int> range(0, ImageData::mWidth, 0, ImageData::mHeight);
tbb::parallel_for(range, [&](const tbb::blocked_range2d<int>& r) {
kernel2D(r.rows().begin(), r.cols().begin(), r.rows().end(), r.cols().end());
});
#else
kernel2D(0, 0, ImageData::mWidth, ImageData::mHeight);
#endif
}
}
inline Image::ColorRGB& Image::operator()(int w, int h)
{
assert(w < ImageData::mWidth);
assert(h < ImageData::mHeight);
return *(reinterpret_cast<ColorRGB*>((uint8_t*)this + sizeof(ImageData)) + w + h * ImageData::mWidth);
}
inline void Image::writePPM(const std::string& fileName, const std::string& comment)
{
std::ofstream os(fileName, std::ios::out | std::ios::binary);
if (os.fail())
throw std::runtime_error("Unable to open file named \"" + fileName + "\" for output");
os << "P6\n#" << comment << "\n"
<< this->width() << " " << this->height() << "\n255\n";
os.write((const char*)&(*this)(0, 0), this->size() * sizeof(ColorRGB));
}
} // namespace nanovdb
#endif // end of NANOVDB_IMAGE_H_HAS_BEEN_INCLUDED
@@ -110,8 +110,8 @@ int main()
std::vector<nanovdb::GridHandle<PoolBuffer>> gridHdls;
// create two grids...
gridHdls.push_back(nanovdb::createLevelSetSphere(100.0f, nanovdb::Vec3f(-20, 0, 0), 1.0, 3.0, nanovdb::Vec3R(0), "spheref", nanovdb::StatsMode::BBox, nanovdb::ChecksumMode::Partial, -1.0f, false, bufferContext));
gridHdls.push_back(nanovdb::createLevelSetSphere(100.0, nanovdb::Vec3d( 20, 0, 0), 1.0, 3.0, nanovdb::Vec3R(0), "sphered", nanovdb::StatsMode::BBox, nanovdb::ChecksumMode::Partial, -1.0f, false, bufferContext));
gridHdls.push_back(nanovdb::createLevelSetSphere<float >(100.0, nanovdb::Vec3d(-20, 0, 0), 1.0, 3.0, nanovdb::Vec3d(0), "spheref", nanovdb::StatsMode::BBox, nanovdb::ChecksumMode::Partial, bufferContext));
gridHdls.push_back(nanovdb::createLevelSetSphere<double>(100.0, nanovdb::Vec3d( 20, 0, 0), 1.0, 3.0, nanovdb::Vec3d(0), "sphered", nanovdb::StatsMode::BBox, nanovdb::ChecksumMode::Partial, bufferContext));
// Get a (raw) pointer to the NanoVDB grid form the GridManager.
auto* dstGrid = gridHdls[0].grid<float>();
@@ -3,6 +3,7 @@
#pragma once
#define _USE_MATH_DEFINES
#include <cmath>
#include <chrono>
#include <fstream>
@@ -5,7 +5,7 @@
#include <iostream>
#include <nanovdb/util/IO.h>
#include <nanovdb/util/Primitives.h>
#include <nanovdb/util/CudaDeviceBuffer.h>
#include <nanovdb/util/cuda/CudaDeviceBuffer.h>
#if defined(NANOVDB_USE_CUDA)
using BufferT = nanovdb::CudaDeviceBuffer;
@@ -26,7 +26,7 @@ int main(int ac, char** av)
handle = nanovdb::io::readGrid<BufferT>(av[1]);
std::cout << "Loaded NanoVDB grid[" << handle.gridMetaData()->shortGridName() << "]...\n";
} else {
handle = nanovdb::createLevelSetSphere<float, float, BufferT>(100.0f, nanovdb::Vec3f(-20, 0, 0), 1.0, 3.0, nanovdb::Vec3R(0), "sphere");
handle = nanovdb::createLevelSetSphere<float, BufferT>(100.0f, nanovdb::Vec3d(-20, 0, 0), 1.0, 3.0, nanovdb::Vec3d(0), "sphere");
}
if (handle.gridMetaData()->isLevelSet() == false) {
@@ -1,12 +1,12 @@
// Copyright Contributors to the OpenVDB Project
// SPDX-License-Identifier: MPL-2.0
#define _USE_MATH_DEFINES
#include <cmath>
#include <chrono>
#include <nanovdb/util/IO.h>
#include <nanovdb/util/GridBuilder.h>
#include <nanovdb/util/CudaDeviceBuffer.h>
#include <nanovdb/util/cuda/CudaDeviceBuffer.h>
#include <nanovdb/util/Ray.h>
#include <nanovdb/util/HDDA.h>
@@ -44,8 +44,7 @@ void runNanoVDB(nanovdb::GridHandle<BufferT>& handle, int numIterations, int num
using namespace nanovdb;
auto* h_grid = handle.grid<float>();
if (!h_grid)
throw std::runtime_error("GridHandle does not contain a FloatGrid");
if (!h_grid) throw std::runtime_error("GridHandle does not contain a FloatGrid");
Vec3f* h_positions = reinterpret_cast<Vec3f*>(positionBuffer.data());
computeFill(false, h_positions, 0, sizeof(Vec3f) * numPoints);
@@ -3,13 +3,14 @@
#if defined(NANOVDB_USE_OPENVDB)
#define _USE_MATH_DEFINES
#include <cmath>
#include <chrono>
#include <openvdb/openvdb.h>
#include <openvdb/math/Ray.h>
#include <nanovdb/util/CudaDeviceBuffer.h>
#include <nanovdb/util/cuda/CudaDeviceBuffer.h>
#include <nanovdb/util/NanoToOpenVDB.h>
#include "common.h"
@@ -20,6 +21,8 @@ using BufferT = nanovdb::CudaDeviceBuffer;
using BufferT = nanovdb::HostBuffer;
#endif
openvdb::GridBase::Ptr nanoToOpenVDB(nanovdb::GridHandle<BufferT>& handle);
void runOpenVDB(nanovdb::GridHandle<BufferT>& handle, int numIterations, int numPoints, BufferT& positionBuffer, BufferT& velocityBuffer)
{
using GridT = openvdb::FloatGrid;
@@ -36,4 +39,4 @@ void runOpenVDB(nanovdb::GridHandle<BufferT>& handle, int numIterations, int num
// Not yet implemented...
}
#endif
#endif
@@ -0,0 +1,44 @@
// Copyright Contributors to the OpenVDB Project
// SPDX-License-Identifier: MPL-2.0
#include <nanovdb/util/CreateNanoGrid.h>
#include <nanovdb/util/Primitives.h> // for nanovdb::createLevelSetSphere
#include <nanovdb/util/cuda/CudaDeviceBuffer.h>// for nanovdb::CudaDeviceBuffer
extern "C" void launch_kernels(const nanovdb::NanoGrid<nanovdb::ValueOnIndex>*,// device grid
const nanovdb::NanoGrid<nanovdb::ValueOnIndex>*,// host grid
cudaStream_t stream);
/// @brief This examples depends on NanoVDB and CUDA.
int main(int, char**)
{
using SrcGridT = nanovdb::FloatGrid;
using DstBuildT = nanovdb::ValueOnIndex;
using BufferT = nanovdb::CudaDeviceBuffer;
try {
// Create an NanoVDB grid of a sphere at the origin with radius 100 and voxel size 1.
auto srcHandle = nanovdb::createLevelSetSphere<float>();
auto *srcGrid = srcHandle.grid<float>();
// Converts the FloatGrid to an IndexGrid using CUDA for memory management.
auto idxHandle = nanovdb::createNanoGrid<SrcGridT, DstBuildT, BufferT>(*srcGrid, 1u, false , false);// 1 channel, no tiles or stats
cudaStream_t stream; // Create a CUDA stream to allow for asynchronous copy of pinned CUDA memory.
cudaStreamCreate(&stream);
idxHandle.deviceUpload(stream, false); // Copy the NanoVDB grid to the GPU asynchronously
auto* cpuGrid = idxHandle.grid<DstBuildT>(); // get a (raw) pointer to a NanoVDB grid of value type float on the CPU
auto* gpuGrid = idxHandle.deviceGrid<DstBuildT>(); // get a (raw) pointer to a NanoVDB grid of value type float on the GPU
if (!gpuGrid) throw std::runtime_error("GridHandle did not contain a device grid with value type float");
if (!cpuGrid) throw std::runtime_error("GridHandle did not contain a host grid with value type float");
launch_kernels(cpuGrid, cpuGrid, stream); // Call a host method to print a grid value on both the CPU and GPU
cudaStreamDestroy(stream); // Destroy the CUDA stream
}
catch (const std::exception& e) {
std::cerr << "An exception occurred: \"" << e.what() << "\"" << std::endl;
}
return 0;
}
@@ -0,0 +1,42 @@
// Copyright Contributors to the OpenVDB Project
// SPDX-License-Identifier: MPL-2.0
#include <nanovdb/NanoVDB.h> // this defined the core tree data structure of NanoVDB accessable on both the host and device
#include <nanovdb/util/cuda/CudaGridHandle.cuh>// required since GridHandle<CudaDeviceBuffer> has device code
#include <stdio.h> // for printf
// This is called by the host only
void cpu_kernel(const nanovdb::NanoGrid<nanovdb::ValueOnIndex>* cpuGrid)
{
nanovdb::ChannelAccessor<float, nanovdb::ValueOnIndex> acc(*cpuGrid);
//printf("\nNanoVDB CPU: channels=%u values=%lu\n", acc.grid().blindDataCount(), acc.root().maximum());
printf("NanoVDB CPU; %lu\n", acc.idx( 0, 0, 0));
printf("NanoVDB CPU; %lu\n", acc.idx( 99, 0, 0));
printf("NanoVDB CPU; %lu\n", acc.idx(100, 0, 0));
printf("NanoVDB CPU; %4.2f\n", acc( 0, 0, 0));
printf("NanoVDB CPU; %4.2f\n", acc( 99, 0, 0));
printf("NanoVDB CPU; %4.2f\n", acc(100, 0, 0));
}
// This is called by the device only
__global__ void gpu_kernel(const nanovdb::NanoGrid<nanovdb::ValueOnIndex>* gpuGrid)
{
nanovdb::ChannelAccessor<float, nanovdb::ValueOnIndex> acc(*gpuGrid);
//printf("\nNanoVDB GPU: channels=%u values=%lu\n", gpuGrid->blindDataCount(), acc.root().maximum());
printf("NanoVDB GPU; %lu\n", acc.idx( 0, 0, 0));
printf("NanoVDB GPU; %lu\n", acc.idx( 99, 0, 0));
printf("NanoVDB GPU; %lu\n", acc.idx(100, 0, 0));
printf("NanoVDB GPU; %4.2f\n", acc( 0, 0, 0));
printf("NanoVDB GPU; %4.2f\n", acc( 99, 0, 0));
printf("NanoVDB GPU; %4.2f\n", acc(100, 0, 0));
}
// This is called by the client code on the host
extern "C" void launch_kernels(const nanovdb::NanoGrid<nanovdb::ValueOnIndex>* gpuGrid,
const nanovdb::NanoGrid<nanovdb::ValueOnIndex>* cpuGrid,
cudaStream_t stream)
{
gpu_kernel<<<1, 1, 0, stream>>>(gpuGrid); // Launch the device kernel asynchronously
cpu_kernel(cpuGrid); // Launch the host "kernel" (synchronously)
}
@@ -2,6 +2,7 @@
// SPDX-License-Identifier: MPL-2.0
#include <nanovdb/util/GridBuilder.h>
#include <nanovdb/util/CreateNanoGrid.h>
#include <iostream>
@@ -11,14 +12,14 @@
int main()
{
try {
nanovdb::GridBuilder<float> builder(0.0f);
auto acc = builder.getAccessor();
nanovdb::build::Grid<float> grid(0.0f);
auto acc = grid.getAccessor();
acc.setValue(nanovdb::Coord(1, 2, 3), 1.0f);
printf("GridBuilder: (%i,%i,%i)=%4.2f\t", 1, 2, 3, acc.getValue(nanovdb::Coord(1, 2, 3)));
printf("GridBuilder: (%i,%i,%i)=%4.2f\n", 1, 2,-3, acc.getValue(nanovdb::Coord(1, 2,-3)));
printf("build::Grid: (%i,%i,%i)=%4.2f\t", 1, 2, 3, acc.getValue(nanovdb::Coord(1, 2, 3)));
printf("build::Grid: (%i,%i,%i)=%4.2f\n", 1, 2,-3, acc.getValue(nanovdb::Coord(1, 2,-3)));
auto handle = builder.getHandle<>();
auto handle = nanovdb::createNanoGrid(grid);
auto* dstGrid = handle.grid<float>(); // Get a (raw) pointer to the NanoVDB grid form the GridManager.
if (!dstGrid)
throw std::runtime_error("GridHandle does not contain a grid with value type float");
@@ -0,0 +1,47 @@
// Copyright Contributors to the OpenVDB Project
// SPDX-License-Identifier: MPL-2.0
#undef NANOVDB_USE_OPENVDB // Prevents include/openvdb/points/AttributeArray.h:1841:25: error: ‘stride’ cannot be used as a function
#include <nanovdb/util/GridBuilder.h>
#include <nanovdb/util/CreateNanoGrid.h>
#include <nanovdb/util/cuda/CudaDeviceBuffer.h>
#include <iostream>
extern "C" void launch_kernels(const nanovdb::NanoGrid<float>*,// GPU grid
const nanovdb::NanoGrid<float>*,// CPU grid
cudaStream_t stream);
/// @brief Creates a NanoVDB grids with custom values and access them.
///
/// @note This example only depends on NanoVDB.
int main()
{
try {
using GridT = nanovdb::build::Grid<float>;
GridT grid(0.0f);// empty grid with a background value of zero
auto acc = grid.getAccessor();
acc.setValue(nanovdb::Coord(1, 2, 3), 1.0f);
printf("build::Grid: (%i,%i,%i)=%4.2f\n", 1, 2,-3, acc.getValue(nanovdb::Coord(1, 2,-3)));
printf("build::Grid: (%i,%i,%i)=%4.2f\n", 1, 2, 3, acc.getValue(nanovdb::Coord(1, 2, 3)));
// convert build::grid to a nanovdb::GridHandle using a Cuda buffer
auto handle = nanovdb::createNanoGrid<GridT, float, nanovdb::CudaDeviceBuffer>(grid);
auto* cpuGrid = handle.grid<float>(); //get a (raw) pointer to a NanoVDB grid of value type float on the CPU
if (!cpuGrid) throw std::runtime_error("GridHandle does not contain a grid with value type float");
cudaStream_t stream; // Create a CUDA stream to allow for asynchronous copy of pinned CUDA memory.
cudaStreamCreate(&stream);
handle.deviceUpload(stream, false); // Copy the NanoVDB grid to the GPU asynchronously
auto* gpuGrid = handle.deviceGrid<float>(); // get a (raw) pointer to a NanoVDB grid of value type float on the GPU
launch_kernels(gpuGrid, cpuGrid, stream); // Call a host method to print a grid values on both the CPU and GPU
cudaStreamDestroy(stream); // Destroy the CUDA stream
}
catch (const std::exception& e) {
std::cerr << "An exception occurred: \"" << e.what() << "\"" << std::endl;
}
return 0;
}
@@ -0,0 +1,36 @@
// Copyright Contributors to the OpenVDB Project
// SPDX-License-Identifier: MPL-2.0
#include <nanovdb/NanoVDB.h> // this defined the core tree data structure of NanoVDB accessable on both the host and device
#include <nanovdb/util/cuda/CudaGridHandle.cuh>// required since GridHandle<CudaDeviceBuffer> has device code
#include <stdio.h> // for printf
// This is called by the host only
void cpu_kernel(const nanovdb::NanoGrid<float>* cpuGrid)
{
auto cpuAcc = cpuGrid->getAccessor();
for (int k=-3; k<=3; k+=6) {
printf("NanoVDB cpu: (%i,%i,%i)=%4.2f\n", 1, 2, k, cpuAcc.getValue(nanovdb::Coord(1, 2, k)));
}
}
// This is called by the device only
__global__ void gpu_kernel(const nanovdb::NanoGrid<float>* deviceGrid)
{
if (threadIdx.x != 0 && threadIdx.x != 6) return;
int k = threadIdx.x - 3;
auto gpuAcc = deviceGrid->getAccessor();
printf("NanoVDB gpu: (%i,%i,%i)=%4.2f\n", 1, 2, k, gpuAcc.getValue(nanovdb::Coord(1, 2, k)));
}
// This is called by the client code on the host
extern "C" void launch_kernels(const nanovdb::NanoGrid<float>* deviceGrid,
const nanovdb::NanoGrid<float>* cpuGrid,
cudaStream_t stream)
{
// Launch the device kernel asynchronously
gpu_kernel<<<1, 64, 0, stream>>>(deviceGrid);
// Launch the host "kernel" (synchronously)
cpu_kernel(cpuGrid);
}
@@ -2,6 +2,7 @@
// SPDX-License-Identifier: MPL-2.0
#include <nanovdb/util/GridBuilder.h>
#include <nanovdb/util/CreateNanoGrid.h>
#include <nanovdb/util/IO.h>
#include <iostream>
@@ -11,22 +12,20 @@
/// @note This example only depends on NanoVDB.
int main()
{
using namespace nanovdb;
try {
const float background = 5.0f;
nanovdb::GridBuilder<float> builder(background, nanovdb::GridClass::LevelSet);
auto acc = builder.getAccessor();
const int size = 500;
auto func = [&](const nanovdb::Coord &ijk){
auto func = [&](const Coord &ijk){
float v = 40.0f + 50.0f*(cos(ijk[0]*0.1f)*sin(ijk[1]*0.1f) +
cos(ijk[1]*0.1f)*sin(ijk[2]*0.1f) +
cos(ijk[2]*0.1f)*sin(ijk[0]*0.1f));
v = nanovdb::Max(v, nanovdb::Vec3f(ijk).length() - size);// CSG intersection with a sphere
v = Max(v, Vec3f(ijk).length() - size);// CSG intersection with a sphere
return v > background ? background : v < -background ? -background : v;// clamp value
};
builder(func, nanovdb::CoordBBox(nanovdb::Coord(-size),nanovdb::Coord(size)));
auto handle = builder.getHandle<>();
nanovdb::io::writeGrid("data/funny.nvdb", handle, nanovdb::io::Codec::BLOSC);
build::Grid<float> grid(background, "funny", GridClass::LevelSet);
grid(func, CoordBBox(Coord(-size), Coord(size)));
io::writeGrid("data/funny.nvdb", createNanoGrid(grid), io::Codec::BLOSC);
}
catch (const std::exception& e) {
std::cerr << "An exception occurred: \"" << e.what() << "\"" << std::endl;
@@ -2,6 +2,7 @@
// SPDX-License-Identifier: MPL-2.0
#include <nanovdb/util/GridBuilder.h>
#include <nanovdb/util/CreateNanoGrid.h>
#include <nanovdb/util/IO.h>
// Helper struct to create a default value for the type.
@@ -36,11 +37,9 @@ void buildGridForType(std::vector<nanovdb::GridHandle<>>& gridHandles, T const&
try {
nanovdb::GridBuilder<ValueT> builder(bgValue);
auto acc = builder.getAccessor();
nanovdb::build::Grid<ValueT> grid(bgValue, typeNameStr);
auto acc = grid.getAccessor();
const int radius = 16;
for (int z = -radius; z <= radius; ++z) {
for (int y = -radius; y <= radius; ++y) {
for (int x = -radius; x <= radius; ++x) {
@@ -50,8 +49,7 @@ void buildGridForType(std::vector<nanovdb::GridHandle<>>& gridHandles, T const&
}
}
}
gridHandles.push_back(builder.template getHandle<>(1.0, nanovdb::Vec3d(0), typeNameStr));
gridHandles.push_back(nanovdb::createNanoGrid(grid));
}
catch (const std::exception& e) {
std::cerr << "An exception occurred: \"" << e.what() << "\"" << std::endl;
@@ -83,8 +81,11 @@ int main()
*/
buildGridForType(gridHandles, float(0), double(0), int16_t(0), int32_t(0), int64_t(0), uint32_t(0), nanovdb::Vec3f(0) /*, nanovdb::Vec3d(0)*/ /*, bool(false)*/ /*, uint16_t(0)*/);
nanovdb::io::writeGrids<nanovdb::HostBuffer, std::vector>("data/custom_types.nvdb", gridHandles);
#if 0
nanovdb::io::writeGrids("data/custom_types.nvdb", gridHandles);
#else
nanovdb::io::writeUncompressedGrids("data/custom_types.nvdb", gridHandles);
#endif
}
catch (const std::exception& e) {
std::cerr << "An exception occurred: \"" << e.what() << "\"" << std::endl;
@@ -148,8 +148,8 @@ int main()
std::vector<nanovdb::GridHandle<MapPoolBuffer>> gridHdls;
// create two grids...
gridHdls.push_back(nanovdb::createLevelSetSphere(100.0f, nanovdb::Vec3f(-20, 0, 0), 1.0, 3.0, nanovdb::Vec3R(0), "spheref", nanovdb::StatsMode::BBox, nanovdb::ChecksumMode::Partial, -1.0f, false, bufferContext));
gridHdls.push_back(nanovdb::createLevelSetSphere(100.0, nanovdb::Vec3d( 20, 0, 0), 1.0, 3.0, nanovdb::Vec3R(0), "sphered", nanovdb::StatsMode::BBox, nanovdb::ChecksumMode::Partial, -1.0f, false, bufferContext));
gridHdls.push_back(nanovdb::createLevelSetSphere<float >(100.0, nanovdb::Vec3d(-20, 0, 0), 1.0, 3.0, nanovdb::Vec3d(0), "spheref", nanovdb::StatsMode::BBox, nanovdb::ChecksumMode::Partial, bufferContext));
gridHdls.push_back(nanovdb::createLevelSetSphere<double>(100.0, nanovdb::Vec3d( 20, 0, 0), 1.0, 3.0, nanovdb::Vec3d(0), "sphered", nanovdb::StatsMode::BBox, nanovdb::ChecksumMode::Partial, bufferContext));
// share grid[0]'s buffer into a parent-scope handle to prevent deletion.
anotherHdl = nanovdb::GridHandle<MapPoolBuffer>(bufferContext.copy(gridHdls[0].buffer().mId));
@@ -0,0 +1,43 @@
// Copyright Contributors to the OpenVDB Project
// SPDX-License-Identifier: MPL-2.0
/// @brief This examples demonstrates how values in a NanpVDB grid can be
/// modified on the device. It depends on NanoVDB and CUDA thrust.
#include <nanovdb/util/Primitives.h>
#include <nanovdb/util/cuda/CudaDeviceBuffer.h>
extern "C" void scaleActiveVoxels(nanovdb::FloatGrid *grid_d, uint64_t leafCount, float scale);
int main()
{
try {
// Create an NanoVDB grid of a sphere at the origin with radius 100 and voxel size 1.
auto handle = nanovdb::createLevelSetSphere<float, nanovdb::CudaDeviceBuffer>(100.0f);
using GridT = nanovdb::FloatGrid;
handle.deviceUpload(0, false); // Copy the NanoVDB grid to the GPU asynchronously
const GridT* grid = handle.grid<float>(); // get a (raw) const pointer to a NanoVDB grid of value type float on the CPU
GridT* deviceGrid = handle.deviceGrid<float>(); // get a (raw) pointer to a NanoVDB grid of value type float on the GPU
if (!deviceGrid || !grid) {
throw std::runtime_error("GridHandle did not contain a grid with value type float");
}
if (!grid->isSequential<0>()) {
throw std::runtime_error("Grid does not support sequential access to leaf nodes!");
}
std::cout << "Value before scaling = " << grid->tree().getValue(nanovdb::Coord(101,0,0)) << std::endl;
scaleActiveVoxels(deviceGrid, grid->tree().nodeCount(0), 2.0f);
handle.deviceDownload(0, true); // Copy the NanoVDB grid to the CPU synchronously
std::cout << "Value after scaling = " << grid->tree().getValue(nanovdb::Coord(101,0,0)) << std::endl;
}
catch (const std::exception& e) {
std::cerr << "An exception occurred: \"" << e.what() << "\"" << std::endl;
}
return 0;
}
@@ -7,10 +7,10 @@
#include <thrust/iterator/counting_iterator.h>
#include <thrust/for_each.h>
#include <nanovdb/util/Primitives.h>
#include <nanovdb/util/CudaDeviceBuffer.h>
#include <nanovdb/util/cuda/CudaDeviceBuffer.h>
#include <nanovdb/util/cuda/CudaGridHandle.cuh>
void scaleActiveVoxels(nanovdb::FloatGrid *grid_d, uint64_t leafCount, float scale)
extern "C" void scaleActiveVoxels(nanovdb::FloatGrid *grid_d, uint64_t leafCount, float scale)
{
auto kernel = [grid_d, scale] __device__ (const uint64_t n) {
auto *leaf_d = grid_d->tree().getFirstNode<0>() + (n >> 9);// this only works if grid->isSequential<0>() == true
@@ -23,37 +23,4 @@ void scaleActiveVoxels(nanovdb::FloatGrid *grid_d, uint64_t leafCount, float sca
thrust::counting_iterator<uint64_t, thrust::device_system_tag> iter(0);
thrust::for_each(iter, iter + 512*leafCount, kernel);
}
int main()
{
try {
// Create an NanoVDB grid of a sphere at the origin with radius 100 and voxel size 1.
auto handle = nanovdb::createLevelSetSphere<float, float, nanovdb::CudaDeviceBuffer>(100.0f);
using GridT = nanovdb::FloatGrid;
handle.deviceUpload(0, false); // Copy the NanoVDB grid to the GPU asynchronously
const GridT* grid = handle.grid<float>(); // get a (raw) const pointer to a NanoVDB grid of value type float on the CPU
GridT* deviceGrid = handle.deviceGrid<float>(); // get a (raw) pointer to a NanoVDB grid of value type float on the GPU
if (!deviceGrid || !grid) {
throw std::runtime_error("GridHandle did not contain a grid with value type float");
}
if (!grid->isSequential<0>()) {
throw std::runtime_error("Grid does not support sequential access to leaf nodes!");
}
std::cout << "Value before scaling = " << grid->tree().getValue(nanovdb::Coord(101,0,0)) << std::endl;
scaleActiveVoxels(deviceGrid, grid->tree().nodeCount(0), 2.0f);
handle.deviceDownload(0, true); // Copy the NanoVDB grid to the CPU synchronously
std::cout << "Value after scaling = " << grid->tree().getValue(nanovdb::Coord(101,0,0)) << std::endl;
}
catch (const std::exception& e) {
std::cerr << "An exception occurred: \"" << e.what() << "\"" << std::endl;
}
return 0;
}
@@ -0,0 +1,59 @@
// Copyright Contributors to the OpenVDB Project
// SPDX-License-Identifier: MPL-2.0
#include <openvdb/tools/LevelSetSphere.h> // replace with your own dependencies for generating the OpenVDB grid
#include <nanovdb/util/CreateNanoGrid.h> // converter from OpenVDB to NanoVDB (includes NanoVDB.h and GridManager.h)
#include <nanovdb/util/cuda/CudaDeviceBuffer.h>
#include <nanovdb/util/NodeManager.h>
extern "C" void launch_kernels(const nanovdb::NodeManager<float>*,
const nanovdb::NodeManager<float>*,
cudaStream_t stream);
extern "C" void cudaCreateNodeManager(const nanovdb::NanoGrid<float>*,
nanovdb::NodeManagerHandle<nanovdb::CudaDeviceBuffer>*);
/// @brief This examples depends on OpenVDB, NanoVDB and CUDA.
int main()
{
using SrcGridT = openvdb::FloatGrid;
using BufferT = nanovdb::CudaDeviceBuffer;
try {
cudaStream_t stream; // Create a CUDA stream to allow for asynchronous copy of pinned CUDA memory.
cudaStreamCreate(&stream);
// Create an OpenVDB grid of a sphere at the origin with radius 100 and voxel size 1.
auto srcGrid = openvdb::tools::createLevelSetSphere<SrcGridT>(100.0f, openvdb::Vec3f(0.0f), 1.0f);
// Converts the OpenVDB to NanoVDB and returns a GridHandle that uses CUDA for memory management.
auto gridHandle = nanovdb::createNanoGrid<SrcGridT, float, BufferT>(*srcGrid);
gridHandle.deviceUpload(stream, false); // Copy the NanoVDB grid to the GPU asynchronously
auto* grid = gridHandle.grid<float>(); // get a (raw) pointer to a NanoVDB grid of value type float on the CPU
auto* deviceGrid = gridHandle.deviceGrid<float>(); // get a (raw) pointer to a NanoVDB grid of value type float on the GPU
if (!deviceGrid || !grid) {
throw std::runtime_error("GridHandle did not contain a grid with value type float");
}
auto nodeHandle = nanovdb::createNodeManager<float, BufferT>(*grid);
auto *nodeMgr = nodeHandle.template mgr<float>();
#if 0// this approach copies a NodeManager from host to device
nodeHandle.deviceUpload(deviceGrid, stream, false);
auto *deviceNodeMgr = nodeHandle.template deviceMgr<float>();
#else// the approach below constructs a new NodeManager directly for a device grid
nanovdb::NodeManagerHandle<BufferT> nodeHandle2;
cudaCreateNodeManager(deviceGrid, &nodeHandle2);
auto *deviceNodeMgr = nodeHandle2.template deviceMgr<float>();
#endif
if (!deviceNodeMgr || !nodeMgr) {
throw std::runtime_error("NodeManagerHandle did not contain a grid with value type float");
}
launch_kernels(deviceNodeMgr, nodeMgr, stream); // Call a host method to print a grid value on both the CPU and GPU
cudaStreamDestroy(stream); // Destroy the CUDA stream
}
catch (const std::exception& e) {
std::cerr << "An exception occurred: \"" << e.what() << "\"" << std::endl;
}
return 0;
}
@@ -0,0 +1,37 @@
// Copyright Contributors to the OpenVDB Project
// SPDX-License-Identifier: MPL-2.0
#include <nanovdb/NanoVDB.h> // this defined the core tree data structure of NanoVDB accessable on both the host and device
#include <nanovdb/util/NodeManager.h>
#include <nanovdb/util/cuda/CudaGridHandle.cuh>// required since GridHandle<CudaDeviceBuffer> has device code
#include <nanovdb/util/cuda/CudaNodeManager.cuh>
#include <stdio.h> // for printf
// This is called by the host only
void cpu_kernel(const nanovdb::NodeManager<float>* cpuMgr)
{
printf("NanoVDB cpu; %4.2f\n", cpuMgr->tree().getValue(nanovdb::Coord(99, 0, 0)));
}
// This is called by the device only
__global__ void gpu_kernel(const nanovdb::NodeManager<float>* deviceMgr)
{
printf("NanoVDB gpu: %4.2f\n", deviceMgr->tree().getValue(nanovdb::Coord(99, 0, 0)));
}
// This is called by the client code on the host
extern "C" void launch_kernels(const nanovdb::NodeManager<float>* deviceMgr,
const nanovdb::NodeManager<float>* cpuMgr,
cudaStream_t stream)
{
gpu_kernel<<<1, 1, 0, stream>>>(deviceMgr); // Launch the device kernel asynchronously
cpu_kernel(cpuMgr); // Launch the host "kernel" (synchronously)
}
// Simple wrapper that makes sure nanovdb::cudaCreateNodeManager is initiated
extern "C" void cudaCreateNodeManager(const nanovdb::NanoGrid<float> *d_grid,
nanovdb::NodeManagerHandle<nanovdb::CudaDeviceBuffer> *handle)
{
*handle = std::move(nanovdb::cudaCreateNodeManager<float>(d_grid));
}
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: MPL-2.0
#include <openvdb/tools/LevelSetSphere.h> // replace with your own dependencies for generating the OpenVDB grid
#include <nanovdb/util/OpenToNanoVDB.h> // converter from OpenVDB to NanoVDB (includes NanoVDB.h and GridManager.h)
#include <nanovdb/util/CreateNanoGrid.h> // converter from OpenVDB to NanoVDB (includes NanoVDB.h and GridManager.h)
#include <nanovdb/util/IO.h>
/// @brief Convert an openvdb level set sphere into a nanovdb, access a single value in both grids, and save NanoVDB to file.
@@ -13,9 +13,7 @@ int main()
try {
// Create an OpenVDB grid of a sphere at the origin with radius 100 and voxel size 1.
auto srcGrid = openvdb::tools::createLevelSetSphere<openvdb::FloatGrid>(100.0f, openvdb::Vec3f(0.0f), 1.0f);
auto handle = nanovdb::openToNanoVDB(*srcGrid); // Convert from OpenVDB to NanoVDB and return a shared pointer to a GridHandle.
auto handle = nanovdb::createNanoGrid(*srcGrid); // Convert from OpenVDB to NanoVDB and return a shared pointer to a GridHandle.
auto* dstGrid = handle.grid<float>(); // Get a (raw) pointer to the NanoVDB grid form the GridManager.
if (!dstGrid)
throw std::runtime_error("GridHandle does not contain a grid with value type float");
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: MPL-2.0
#include <openvdb/tools/LevelSetSphere.h> // replace with your own dependencies for generating the OpenVDB grid
#include <nanovdb/util/OpenToNanoVDB.h> // converter from OpenVDB to NanoVDB (includes NanoVDB.h and GridManager.h)
#include <nanovdb/util/CreateNanoGrid.h> // converter from OpenVDB to NanoVDB (includes NanoVDB.h and GridManager.h)
#include <nanovdb/util/IO.h>
// Convert an openvdb level set sphere into a nanovdb, use accessors to print out multiple values from both
@@ -15,7 +15,7 @@ int main()
auto srcGrid = openvdb::tools::createLevelSetSphere<openvdb::FloatGrid>(100.0f, openvdb::Vec3f(0.0f), 1.0f);
// Convert the OpenVDB grid, srcGrid, into a NanoVDB grid handle.
auto handle = nanovdb::openToNanoVDB(*srcGrid);
auto handle = nanovdb::createNanoGrid(*srcGrid);
// Define a (raw) pointer to the NanoVDB grid on the host. Note we match the value type of the srcGrid!
auto* dstGrid = handle.grid<float>();
@@ -2,22 +2,23 @@
// SPDX-License-Identifier: MPL-2.0
#include <openvdb/tools/LevelSetSphere.h> // replace with your own dependencies for generating the OpenVDB grid
#include <nanovdb/util/OpenToNanoVDB.h> // converter from OpenVDB to NanoVDB (includes NanoVDB.h and GridManager.h)
#include <nanovdb/util/CudaDeviceBuffer.h>
#include <nanovdb/util/CreateNanoGrid.h> // converter from OpenVDB to NanoVDB (includes NanoVDB.h and GridManager.h)
#include <nanovdb/util/cuda/CudaDeviceBuffer.h>
extern "C" void launch_kernels(const nanovdb::NanoGrid<float>*,
const nanovdb::NanoGrid<float>*,
cudaStream_t stream);
/// @brief This examples depends on OpenVDB, NanoVDB and CUDA.
int main()
int main(int, char**)
{
using SrcGridT = openvdb::FloatGrid;
try {
// Create an OpenVDB grid of a sphere at the origin with radius 100 and voxel size 1.
auto srcGrid = openvdb::tools::createLevelSetSphere<openvdb::FloatGrid>(100.0f, openvdb::Vec3f(0.0f), 1.0f);
auto srcGrid = openvdb::tools::createLevelSetSphere<SrcGridT>(100.0f, openvdb::Vec3f(0.0f), 1.0f);
// Converts the OpenVDB to NanoVDB and returns a GridHandle that uses CUDA for memory management.
auto handle = nanovdb::openToNanoVDB<nanovdb::CudaDeviceBuffer>(*srcGrid);
auto handle = nanovdb::createNanoGrid<SrcGridT, float, nanovdb::CudaDeviceBuffer>(*srcGrid);
cudaStream_t stream; // Create a CUDA stream to allow for asynchronous copy of pinned CUDA memory.
cudaStreamCreate(&stream);
@@ -2,6 +2,7 @@
// SPDX-License-Identifier: MPL-2.0
#include <nanovdb/NanoVDB.h> // this defined the core tree data structure of NanoVDB accessable on both the host and device
#include <nanovdb/util/cuda/CudaGridHandle.cuh>// required since GridHandle<CudaDeviceBuffer> has device code
#include <stdio.h> // for printf
// This is called by the host only
@@ -3,6 +3,7 @@
#pragma once
#define _USE_MATH_DEFINES
#include <cmath>
#include <chrono>
#include <fstream>
@@ -5,9 +5,9 @@
#include <iostream>
#include <nanovdb/util/IO.h>
#include <nanovdb/util/Primitives.h>
#include <nanovdb/util/CudaDeviceBuffer.h>
#if defined(NANOVDB_USE_CUDA)
#include <nanovdb/util/cuda/CudaDeviceBuffer.h>
using BufferT = nanovdb::CudaDeviceBuffer;
#else
using BufferT = nanovdb::HostBuffer;
@@ -26,7 +26,7 @@ int main(int ac, char** av)
handle = nanovdb::io::readGrid<BufferT>(av[1]);
std::cout << "Loaded NanoVDB grid[" << handle.gridMetaData()->shortGridName() << "]...\n";
} else {
handle = nanovdb::createFogVolumeSphere<float, float, BufferT>(100.0f, nanovdb::Vec3f(-20, 0, 0), 1.0, 3.0, nanovdb::Vec3d(0), "sphere");
handle = nanovdb::createFogVolumeSphere<float, BufferT>(100.0f, nanovdb::Vec3d(-20, 0, 0), 1.0, 3.0, nanovdb::Vec3d(0), "sphere");
}
if (handle.gridMetaData()->isFogVolume() == false) {

Some files were not shown because too many files have changed in this diff Show More