file_path
stringlengths 21
202
| content
stringlengths 19
1.02M
| size
int64 19
1.02M
| lang
stringclasses 8
values | avg_line_length
float64 5.88
100
| max_line_length
int64 12
993
| alphanum_fraction
float64 0.27
0.93
|
---|---|---|---|---|---|---|
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2020-06-04.md | Minutes from 51st OpenVDB TSC meeting, June 4th, 2020, (GMT)
Attendees: *Nick* A., *Jeff* L., *Ken* M., *Dan* B.
Additional Attendees: Johannes Meng (Intel), JT Nelson (Blender),
Peter Cheng (DW), Andre Pradhana (DW), Bruce Chernia (Intel),
Ibrahim Sani Kache (DW)
Regrets: *Peter* C.
Agenda:
1) Confirm quorum
2) Secretary
3) Fast Sweeping
4) Python 3
5) Other
6) Next meeting
1) Quorum was confirmed.
2) Secretary was Nick Avramoussis
3) Fast Sweeping
Ken has pushed up his implementation of his approach to the re-computation of
signed distance fields, Fast Sweeping:
http://www.museth.org/Ken/Publications_files/Museth_SIG17.pdf
The code is available on Ken's fork of OpenVDB:
https://github.com/kmuseth/openvdb/tree/OVDB-133_FastSweeping
Ken to open a draft pull request into VDB for others to comment on and trial the
implementation. Ken, some work still to be done however the bulk of the
algorithm is complete. There exists a variety of new public methods to perform
re-computations of level sets, conversions of scalar fields (signed fog) to
level sets and the value extrapolation of level sets, potentially coupled with
another scalar grid. CI build is currently failing due to some strict C++
checks which should be easy to fix. It was noted that the extension of anything
other than a scalar grid (i.e. vector grid) currently requires multiple
invocations of the algorithm, something that could be improved.
4) Python 3
Ibrahim asked about python 3 support and OpenVDB. We currently have CI images
that run in VFX 2020 which test with 2020's python version, currently at 3.7.
There have been some reported issues with python 3.8, however this should only
be specific to the architecture of the unit tests and not actually the python
plugin itself. TSC unaware of any other issues regarding python 3. Note that the
VFX 2021 container has now be drafted.
https://vfxplatform.com/
5) Other
Discussion into OpenVDB's dependencies. Ken, one of the biggest complaints he
hears is VDB's dependency list. Having some of these dependencies as VFX
platform candidates could help - mainly referring to blosc. Jeff, LLVM (as a
requirement of AX) should not really be a part of the VFX platform (due to its
volatility w.r.t API/ABI), with downstream software instead opting for always
hiding LLVM symbols. Boost python is heavily relied on - pybind would be a
reasonable alternative but that also does not appear as part of the VFX platform.
Note, OpenEXR have decided to split out Imath and potentially advocate it as a
math library for VFX:
https://github.com/AcademySoftwareFoundation/Imath
Ken mentioned open source licensing rules for contributors - would it matter if
an addition to OpenVDB was made under a different Open Source license? Nick, AX
has opted to use the same license as OpenVDB so there are no concerns there.
Potentially would have to be deferred to the Linux foundation.
6) Next meeting
June 18th, 2020. 2pm-3pm EDT (GMT-4).
| 2,964 | Markdown | 39.616438 | 81 | 0.78475 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2020-06-30.md | Minutes from 54th OpenVDB TSC meeting, June 30th, 2020, (GMT)
Attendees: *Nick* A., *Jeff* L., *Ken* M., *Dan* B.
Additional Attendees: Johannes Meng (Intel), JT Nelson (Blender),
Peter Cheng (DW), Andre Pradhana (DW)
Regrets: *Peter* C.
Agenda:
1) Confirm quorum
2) Secretary
3) New Meeting Time
4) 7.1 Fast Sweeping
5) 7.1 Sharpening
6) Dilation Improvements
7) Next meeting
1) Quorum was confirmed.
2) Secretary was Nick Avramoussis
3) New Meeting Time
New meeting time to be scheduled an hour earlier.
Every Tuesday at 10am PST / 1pm EDT / 6pm BST.
Johannes to check with Bruce about a possible conflict.
4) 7.1 Fast Sweeping
Jeff and Nick have posted reviews on the PR. Jeff, various comments on input
types and exception behaviour. Nick, primarily concerned about const casting and
redundant code. Ken to attempt to address the feedback. Andre had tested the new
SDF dilation based algorithms which are working and will continue to work with
Jeff to prepare a SOP component. Noted that vector grid processing still
requires per component extension via vector splits and merges. Ken to see how
feasible it would be to avoid this step. Dan, CI builds are still failing on
this PR, requires local builds to build with -DOPENVDB_CXX_STRICT to reproduce
the problems.
5) 7.1 Sharpening
Ken, approved implementation but unable to checkout/copy peters changes to
ASWF/fork so still needs unit tests. Two ways to resolve this, either clone the
fork or merge into a temporary branch in the ASWF repo. Dan to take a look at
achieving the latter. Nick, concern that no unit tests now mean none later. Ken
to take another look at the result of Dan's merge of Peter's branch. Touched
again on the fact that Peter's implementation of the sharpening kernel is not
separable and thus trades some performance for more robustness. Ken, Peter's
benchmarks look promising and the alternative implementation (unsharpen masking
i.e. signal processing, low pass filter to remove high freq) may not work on
levelsets.
6) Dilation Improvements
Nick, new PR which fully implements the proposed changes from #675 will be up
shortly. Aims to deprecate the existing dilateVoxels and erodeVoxel methods with
new functions that provide a more uniform interface and support matching
functionality. Adds support for edge/vertex erosion based on inverse dilation.
Significant performance improvements to large dilations. Note that the result of
the threaded dilation differs due to the behaviour of topologyUnion. This is
addressed by #751.
7) Next meeting
July 7th, 2020. 1pm-2pm EDT (GMT-4).
| 2,584 | Markdown | 36.463768 | 80 | 0.787926 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2019-01-24.md | Minutes from 6th OpenVDB TSC meeting, Jan. 24, 2019
Attendees: John M., *Jeff* L., *Nick* A., *Ken* M., *Peter* C., *Dan* B., Andrew P.
Additional Attendees: Bruce Chernia (Intel), naren vadaplli, Thanh Ha, Greg Gewickey
Agenda:
1) Confirmation of quorum
2) Selection of secretary
3) SIGGRAPH Course proposal (Ken)
4) Update on permissions, release process, jira & code coverage (Dan)
5) Cleanup and improve repository (Ken)
6) Road map (Ken)
7) Schedule next meeting
1) Quorum was confirmed
2) Secretary - Jeff Lait.
3) Siggraph Course
Nick, Dan and Ken confirmed they are interested and likely have topics to
present as a 1.5 hour course submission.
4a) Update on permissions
admin status is restricted to ASWF admin, so will not be granted to TSC.
Dan will submit a help desk ticket to increase minimum reviews to one
from zero.
4b) Release Process
4b1) Website
Website repo is built and functional. DNS transfer is still on-going, but
may have just been approved. Doxygen build step is still missing, but
that can be fixed later.
4b2) Release Process documentation
Peter will draft a release document to roughly cover the current release
process.
4b3) Conflicts in Changes file
With the non-linear nature of pull requests, the changes file generates
conflicts.
One approach is to use openstack reno. Dan will investigate reno, as used in
https://docs.releng.linuxfoundation.org/projects/lftools/en/latest/release-notes.html
as one option.
Another suggestion is to submit changes as separate files that are then merged
after the pull request is approved.
Any automated system should document all the changes since the last
version and preserve links by to DOxygen documentation.
4c) JIRA
Jeff & Ken still have to sign into JIRA.
Ideally we have JIRA & GitHub integration. Most solutions seem to cost
money. Thanh will investigate what are practical as this may show
up for other ASWF projects. Ken will raise this in the next ASWF TAC meeting.
4d) Continuous Integration Update
Cmake transition is unclear. It seems other projects are waiting on
our decisions, so we may need to move first to cmake. Pushing to Jenkins
may be a way to trigger a push to Cmake.
Currently in process of increasing warning level in CI to match that at
DreamWorks so CI compliant checkins don't fail at DWA.
Interest in adding the Intel Compiler to CI; but the licensing implications
have to be determined.
4e) Code Coverage
There is a unit code coverage plugin that we need approval for.
Unanimous consent for installing CodeCov plugin (https://codecov.io/)
We also have interest in some form of tab/whitespace validation.
The DCO test has probot that seems to be able to handle these. However,
pre-commit was suggested as another option. It can also hook into
git-hooks so the enforcment can be done before CI.
5/6) Cleanup and Roadmap
A lot of time is spent on adminstration. When can we talk about the
actual product?
- Improve build time
- split up unit tests, avoid trailing tests
- Unit test coverage
- Documentation
- Cook books - completely out of date
- Source tree messy?
- Headers that define many classes
- Consolidate methods that do the same thing
- What are we planning on adding?
- Provide tasks
We resolved 20 minutes of next meeting to be devoted to roadmap.
7) The next TSC meeting is scheduled for Thursday Jan 31, 2019, 11am-12pm PST.
| 3,392 | Markdown | 29.845454 | 85 | 0.775354 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2020-07-07.md | Minutes from 55th OpenVDB TSC meeting, July 7th, 2020, (GMT)
Attendees: *Nick* A., *Jeff* L., *Ken* M., *Dan* B.
Additional Attendees:
Bruce Cherniak (intel), Johannes Meng (Intel), Andre Pradhana (DW),
JT Nelson (Blender), Peter Cheng (DW)
Regrets: *Peter* C.
Agenda:
1) Quorum was confirmed.
2) Secretary was Jeff Lait
3) Forum
Discussions about debug builds. There is advice on how to improve it, the
changes are agreed upon, the question is who will do it. This is to fix
multi-target cmake generators on Windows. The default version looks for debug
variants, the downstream is supposed select. This is showing up because we
finally have a working Windows build. We want to ensure we can still build
debug symbols on Linux with an optimized build.
4) CI Review
Now builds Houdini from actions cache. Seems to be mostly fine. One PR failed
to download so populated an empty cache. Added a check to avoid this. When
the download stops failing occasionally we can move from the Azure pipeline.
5) Sharpen PR
Lots of stuff has changed. Dan tried to rebuild back at the point it was
submitted, which also failed. So tried moving the branch, which was protected.
So tried to close and repoen. But this re-did the CLA test so failed. So
created a fresh clean PR for this. A few small changes but mostly getting it
compiling.
This re-introduced a boost dependency for a multi-array reference on a flat
array. We will have to remove this later.
There is now PR to work from. Ken to look at, skim the API, and add some unit
tests.
6) Fast Sweeping
Ken will go over the review comments today. Dan proposes that you can bucket
the slices without sorting. A particular leaf node, for example, has 21 slices
on the diagonal. So you don't need a list of indices to each slice. The
current system has a hash to slices. Ken is unsure if the details will hold
up. We should investigate this sooner after the PR is in.
Andrew Pearce is still proofing the PR from DW. Hopefully done by this week.
What is the best way to create a mask grid from a Houdini grid? There is a
boolean grid. If we use an SDF as a mask it would be confusing that the center
isn't filled. We should copy the VDB tools::clip that uses topology.
Andre is an author on a paper with another approach than fast sweeping, Ken and
him will investigate its applicability.
7) 7.1
For 7.1, we will aim to have Fast Sweeping complete. Or, put another way, when
fast sweeping is in we can release 7.1. We will not stress over vector
support, and not add to the SOP. Instead it will be up to the tool to support
it if it can.
8) PR 747.
We seem to be using the wrong attribute name here. This is a bad merge from
the Houdini side.
9) Merging Trees together
Originally did level-by-level merge. Now is an operator you pass into a node
manager. However, the node manager has a pre-cache so it can't modify during
building, but has to keep rebuilding. Proposal to add a for-each top-down
dynamic method that builds the cache at each level as you progress down. This
means the node manager now has two modes - flat and static, or dynamic. OTOH,
it always had a clear method. This is mostly a way to have a non pre-built
constructor. Is a node manager a reference to a tree? Or is it just a set of
leaf nodes? Maybe a dynamic node manager subclassing that does the auto
rebuilding? We note a lot of operations already have to be careful of node
managers, suggesting it is already a state machine.
Dan will create a PR and we will look at it.
10) Next meeting
Tuesday July 14th 2020, 1pm EDT (GMT-4)
| 3,611 | Markdown | 38.260869 | 79 | 0.759346 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2019-11-14.md | Minutes from 32nd OpenVDB TSC meeting, November 14th, 2019, (GMT)
Attendees: *Nick* A., *Dan* B., *Jeff* L., *Peter* C.
Additional Attendees: Bruce Chernia (Intel), Daniel Elliott
Regrets: *Ken* M.
Agenda:
1) Confirm quorum
2) Secretary
3) Peter's Status
4) Const Grid Copying
5) PR 547: LOD Metadata
6) PR 548: Rename Translate
7) POPCNT.
8) PR 498: Install directory
9) VDB Points Merge SOP
10) Windows Update
11) Leaf Node Data
12) Meeting Time
13) Next Meeting
1) Quorum was confirmed.
2) Secretary was Jeff Lait
3) Peter's Status
With Peter's departure from DreamWorks he feels it is likely he will not
be able to contribute as much to the project. We note that DreamWorks
does not need to have a TSC member in order to attend the meetings, and TSC
members are to be active contributors. We unanimously agreed that Peter will
retain his TSC status for the next few months. At that time we will better
know how involved with the project he chooses to be.
4) Const Grid Copying
The PR to allow deep copy of only metadata or transforms was unresolved
due to disputes about how to name. We concluded that copyFrom was
too ambiguous and the consensus was copyGridReplacingMetadata
5) PR 547: LOD Metadata
We agree we need a more comprehensive solution. In particular, user
meta data tends to be lost. A common meta data is something to link
VDBs together that has to survive both .vdb and .bgeo export.
This particular PR is to be pushed, however, as the band-aid is better
than awawiting a fuller version.
6) PR 548: Rename Translate
Similar to PR547, the identified fix would be more righteous. But this
PR will keep in sync with Houdini pending such a better fix.
7) POPCNT.
It has been verified to be 40% faster. Compiler flags can
secretly undo the instrinsic, making it seem slower. We need a CMAKE
flag for SSE4.2 and AVX. We will have this off by default but turn
it on by default in the future. Dan will provide a step-by-step guide
of how to make the PR something we can bring in. Dan will also
offer taking over the PR and resubmitting if the author just wants
the PR in.
8) PR 498: Install directory
This has not been tested on other platforms. But as it adds the LIBDIR
tuple it might possible solve our install directory problem without
special casing.
9) VDB Points Merge SOP
The initial question was how to detect if grids are unique. This would
be a GU_PrimVDB::isGridUnique, which Jeff will investigate implementing.
This will not make the 18.0 gold window.
A bigger problem was discovered: the compile SOP world has an INPLACE
but no mode to let you steal all your inputs. For a many-merge VDB
SOP you want to steal all of them. It is possible the duplicateInputStealable
doesn't work properly for this (but it has been used in production) Jeff
is to look at the code and comment.
A VDB Merge Points will be done without the clever stealing, then we
can investigate how to fix Verbs to work with a steal all world.
10) Windows Update
Biggest hiccup for compiling on Windows was setting the 64-bit flag.
The set of PRs submitted should make this a lot more turn key. They
also remove the magic statics that aren't needed any more.
11) Leaf Node Data
We investigated if there was room to store data in the leaf node. In
particular, Ken wanted to free up 8-bytes as a general utility. We
knew we had 4 bytes at the tail, but it would be nice to future proof.
One idea is to have fileinfo always be present. If we don't purge
fileinfo once a node is paged in, we can then also move the mutexs
into the fileinfo structure. The absense of a fileinfo node is a signal
there is no need to use those mutexes. One concern is they may have
already been re-used as an internal flag in some algorithms, but
those may have just been planned uses.
A serious problem raised is that we don't have a good window for these
changes. It is likely too late for ABI 7, but we couldn't have done it
earlier as we were on ABI6. This suggests we should have these projects
sitting as PRs lying dormant until the start of a new ABI where we
can bring them in.
12) Meeting Time
The meeting will stay the same regardless of anyone's daylight savings. Some
confusion existed as it was often reported as EDT/EST. This means the default
time is now 2-3 EST.
13) Next Meeting
Next planned meeting is:
Novemeber 22nd 2019. 2pm-3pm EST (GMT-5).
| 4,391 | Markdown | 34.419355 | 78 | 0.77135 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2020-05-07.md | Minutes from 48th OpenVDB TSC meeting, May 7th, 2020, (EDT)
Attendees: *Nick* A., *Jeff* L., *Ken* M., *Dan* B.
Additional Attendees: Johannes Meng (Intel), JT Nelson (Blender),
Andre Pradhana (DWA), Bruce Chernia (Intel)
Regrets: *Peter* C.
Agenda:
1) Confirm quorum
2) Secretary
3) Google Summer of Code
4) ASWF TAC Meeting Update
5) Forum Posts
6) Promotional Videos
7) AX Presentation
8) Next Meeting
1) Quorum was confirmed.
2) Secretary was Dan Bailey
3) Google Summer of Code
The ASWF was only awarded three slots for all five projects by Google. OpenVDB
have given up their slot in favour of other projects which had stronger
submissions. There's motivation to collectively accept our best submissions as
each successful GSOC project will make it more likely Google will give us more
slots next year. Dan to reach out to our candidate(s) and encourage their
contribution or re-submission for next year.
4) ASWF TAC Meeting Update
Ken attended the recent TAC meeting and gave a quick summary. The ASWF is
looking to create an ASWF fund to help support developers affected by Covid19 as
many companies are scaling down or furloughing employees.
5) Forum Posts
Windows build should work now. Nick to reply to recent post which is related to
building the OpenVDB Houdini plugin on Windows using Python3.
6) Promotional Videos
Hard to find the time to assemble videos, but all see the value in doing so to
building the community and attracting new developers to the library. Ken
proposed that AX might be a good candidate.
7) AX Presentation
Nick gave an overview on AX. The plan for integration into OpenVDB is to start
with the core OpenVDB AX library, then look to tackle the tools and the Houdini
SOP soon after that. Some discussion about the level of integration. The key
question is whether it should be an option to the core library itself that would
require LLVM as a dependency or as a separate AX library that depends on the
core OpenVDB library (and LLVM). While the latter is the simplest, there are
some challenges. There is an extension to the VDB viewer that can support AX
which would result in a cyclic dependency chain. The Python module may also be
problematic with this model. General agreement that the unit tests should remain
part of the core library, but perhaps this is an opportunity to reconsider where
the binaries and Python module should live. With CMake now being the primary
build system, restructuring the library is easier. Decision is to continue with
AX being a separate library, but more discussion needed on the other questions.
8) Next Meeting
May 14th 2020. 2pm-3pm EDT (GMT-4).
| 2,642 | Markdown | 36.757142 | 80 | 0.789175 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2020-12-01.md | Minutes from 72nd OpenVDB TSC meeting, Dec 1st, 2020, (EDT)
Attendees: *Nick* A., *Jeff* L., *Ken* M., *Dan* B.
Additional Attendees: Andre Pradhana (DW)
Regrets: *Peter* C.
Agenda:
1) Confirm quorum
2) Secretary
3) 7.2.0 / 8.0.0 Release
4) Google Test Migration
5) Extrapolating Integer grids in Fast Sweeping
6) Next Meeting
1) Quorum was confirmed.
2) No secretary by accident, brief notes prepared by Dan Bailey
3) 7.2.0 / 8.0.0 Release
Dan to carry out 7.2.0 and 8.0.0 releases, Ken to do announcements. Work ongoing
to assess which PRs will make it into the 8.0 release.
4) Google Test Migration
Decision to adopt Dan's Google Test migration of core library to prevent it
becoming stale. Releases before the end of the year will still use CppUnit for
AX unit tests, Nick to revisit to migrate to Google Test in early 2021.
5) Extrapolating Integer grids in Fast Sweeping
Andre running into some problems attempting to extrapolate integer grids in the
fast sweeping. Right behavior should be nearest neighbor rather than an
interpolation.
6) Next Meeting
Next meeting is December 1st, 2020. 1pm-2pm EST (GMT-5).
| 1,132 | Markdown | 25.97619 | 80 | 0.757951 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2020-02-13.md | Minutes from 40th OpenVDB TSC meeting, February 13th, 2020, (GMT)
Attendees: *Ken* M., *Nick* A., *Dan* B., *Jeff* L.
Additional Attendees: Bruce Chernia (Intel)
Regrets: *Peter* C.
Agenda:
1) Confirm quorum
2) Secretary
3) Summary of annual TAC/ASWF meetings
4) Mres from Autodesk
5) Google summer of code - revisited
6) SIGGRAPH
7) Roadmap
8) GitHub Actions / develop branch
9) GPU discussion (unplanned)
10) Quick review of outstanding PRs
11) Next meeting
1) Quorum was confirmed.
2) Secretary was Dan Bailey
3) Summary of annual TAC/ASWF meetings
Ken presented an overview of OpenVDB and brief summary of the project activites
over the last year at the annual face-to-face TAC meeting. Not a lot of progress
this last year, main achievement has been CMake. Ken spoke to someone who might
be interested in helping with our CMake build system.
USD is a big focus of the ASWF, new working group being set up. Like us,
developers at Pixar are suffering from support burden from many studios building
the project and asking questions.
Security is still a concern.
4) Mres from Autodesk
Ken received version from Autodesk, will aim to get it building in preparation
for developing a VDB alternative starting sometime in the next month or so.
5) Google summer of code - revisited
Project proposals made and submitted as part of ASWF application, organizations
announced 20th Feb.
6) SIGGRAPH
Deadline has passed for a Course, however all agreed there should only be a BOF
this year.
7) Roadmap
Putting off until next meeting as Jeff has no mic. Intend for it to be a
dedicated meeting.
8) GitHub Actions / develop branch
The plan is to make the develop branch the default merge target for PRs. All
external contributors will make PRs into the develop branch and once approved,
one of the TSC members will take responsibility for merging into develop, adding
release notes and making any other edits, then making an additional PR from
develop into master. TSC members will predominantly make PRs directly into
master.
This will tie into adopting GitHub Actions as our sole CI and deprecating our
use of Azure. The develop branch will have fewer CI checks to attempt to reduce
the barrier to entry and will only run the Houdini checks if the user has set a
Houdini CLA environment variable. All TSC members will be required to set this
environment variable so that Houdini checks are always run when making PRs into
master.
GitHub Actions will also be used for other automation such as preparing releases
and keeping the develop branch synced up with the master branch.
Dan has a PR into the TAC to list requirements for one TSC member of each
project having admin access. Once permissions have been granted, this migration
can start.
9) GPU discussion (unplanned)
Ken has tried a linear read-only implementation of the grid for the GPU and it
works well. Considering extending to incorporate min/max. Question about making
just the topology read-only and allow value edits, not currently implemented but
should be feasible. Jeff very interested, Ken to share his implementation in the
next few weeks.
Still room to modify tree data structure to make it more amenable to the GPU, in
particular allowing for custom allocators (ABI change). Dan suggested we
dedicate one TSC meeting to focus on the GPU and invite some domain experts.
10) Quick review of outstanding PRs
PR605 - Ken happy for this to be merged.
PR455 - what to do with the sharpen, Nick suggests we integrate true gaussian
implementation first. Still waiting Ken approval.
PR623 - Jeff to review and give feedback.
PR589 - Nick has verbally approved, awaiting final approval from Ken.
11) Next meeting
February 20th 2020. 2pm-3pm EST (GMT-5).
| 3,744 | Markdown | 33.357798 | 80 | 0.789263 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2018-11-17.md | Nov. 15, 2018
Secretary – Andrew Pearce
Attendees – Nick A., Andrew P., Ken M., Jeff L., John M., Dan B., Peter C., Doug Walker
11:05 – Quorum achieved, all 5 TSC voting members on line
Ken Museth nominated as chair. Discussion of chair role & responsibility.
- Technical direction
- Press release
- Represent the project on the TAC
- Run TSC meetings
11:13 - Dan nominated, Nick seconded. Vote called. The TSC unanimously ratified Ken Museth as chair.
Discussion of Technical Charter
Discussion of CLA Corp. vs. Individual & DCO
There is a LF CLA system – John will follow up with info. For now – email CLA to email address on the site, one of the TSC can add them to the CONTRIBUTOR file at the head of the github repo.
One person from the company can state the DCO for other individuals, or each contributor can sign the individual CLA and be added to the CONTRIBUTOR file.
TSC needs to update the license file template at the top of files. Recommend to move to SPDX. Recommend not to add dates to the license header unless TSC wants to make massive changes every January 1.
Andrew will check with the notices change for file headers & copyright holders re: DreamWorks language.
John offered to provide a modified governance document that may cover initial needs.
Target for recurring meeting is Thursday’s at 11am-12pm Pacific. For now weekly, starting Thursday, Nov 29, 2018.
When is the next major release? Pressure from the VFX Ref Platform. A new release is not realistic within two weeks. Proposal for an API / ABI change release with light-weight functional changes to prepare for future changes without having to wait a year. Dan will ask VFX Ref Platform if OpenVDB can delay until early Dec to allow time for changes to be reviewed and stabilized for a release. Also will re-send the pull request discussion around to the TSC.
Ken will maintain and set future meetings.
12:10 PM Pacific, meeting adjourned.
| 1,937 | Markdown | 49.999999 | 458 | 0.780589 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2019-10-31.md | Minutes from 31st OpenVDB TSC meeting, October 31st, 2019, (GMT)
Attendees: *Nick* A., *Dan* B., *Jeff* L., *Ken* M., *Peter* C.
Additional Attendees: Bruce Chernia (Intel)
Agenda:
1) Confirm quorum
2) Secretary
3) EasyCLA (PRs #227 #493 #498)
4) PR 537
5) OVDB-119
6) OVDB-122
7) OVDB-124
8) Refactoring Tree (OVDB-121 / PR536 + PR539)
9) OVDB-123 (Gaussian and principal curvatures)
10) Follow Up on Leaf Node Memory Usage
11) Next Meeting
1) Quorum was confirmed.
2) Secretary was Nick Avramoussis
3) EasyCLA (PRs #227 #493)
Jeff confirmed that the EasyCLA has started working on his pull requests. We
are now in a position to start asking for contributors to update their PRs and
go through the automated CLA process. Jeff to follow up on PR 227. Dan to follow
up with PR 493 with additional comments about his brief tests. Nick to follow
up with PR 498.
4) PR 537
Changes confirmed by Peter. Jeff to re-trigger the build and then merge. There
seems to be no easy way to re-trigger builds through the github UI/API due to
the LF setup. Nick to mention this to John.
5) OVDB-119
Reported by Jeff, there is a reproducible case where level set construction from
a closed water-tight surface seems to be failing with artifacts similar to
those seen with failures during signed flood filling. Bringing this to the
attention of TSC members.
6) OVDB-122
Reported by Jeff, there was an issue with the way group membership was
transfered to VDB points from Houdini geometry, due to the mixed and incorrect
use of GA_Index and GA_Offet. Nick believes this was fixed in PR263 which has
since been merged. Jeff to check and report back.
7) OVDB-124
Reported by Dan, this is the result of a continued investigation by the TSC into
ways in which VDB tools are designed, primarily comparing tools which exist as
methods on the Tree to those that exist as free functions. This particular
ticket represents the only method (RootNode::addChild()) which has been
highlighted thus far to be missing for an example VDB merge free function which
would not have private member access. There were concerns that accessors that
are caching the current node being added may be referencing different trees
after the child has been set, however it was generally agreed that it is the
responsibility of whoever is providing the child to invalidate the accessor. Dan
mentioned that you are already able to set arbitrary nodes on Internal nodes by
leveraging the Tree Iterators setItem() function, however it was generally
agreed that this was not its intended public use and that, were we to pursue
this, we should consider adding methods to the InteralNode too. Some discussion
around the function name (addNode vs addChild), where addChild is only capable
of adding a child type. addNode is a more powerful method as it lets users add
any node type are the appropriate descendant location.
Discussion also around the addLeaf and addLeafAndCache methods. These exist on
the Tree and on the ValueAccessors. The intended use of addLeafAndCache is
mainly through the ValueAccessor API which ensures that a given ValueAccessor's
cache is updated to cache the descendant path to added leaf nodes. This is
intended to provide performance improvements on subsequent leaf additions which
reside within the same branch of the Tree. Noted that adding addChild methods to
the ValueAccessor which mimic those proposed to the RootNode would provide no
benefit as no branch traversal need be performed.
8) Refactoring Tree (OVDB-121 / PR536 + PR539)
Next TSC meeting to attempt to progress this discussion. TSC members to look at
both PRs. One additional thing to consider is what to do with other possible
counting methods which benefit heavily from better parallelization. General
consensus was that both methods could coexist whilst we continue this
investigation.
9) OVDB-123 (Gaussian and principal curvatures)
Ken's methods to compute principal curvature, Gaussian curvature and
disconnected components are almost completed. These will slot into existing
frameworks in VDB however an initial PR will most likely not expose them
to Houdini. The Gaussian curvature analysis also allows for computation of the
genus value of a given surface.
10) Follow Up on Leaf Node Memory Usage
Still some investigation to do here, but agreement that it is a priority due to
an ABI 7 release date approaching. Ken mentioned that his read-only Tree
implementation was able to cut down memory usage from ~90 to ~16 bytes.
Agreement that focus should be on ABI 7 changes for the next few weeks.
11) Next Meeting
Next planned meeting is:
November 14th 2019. 2pm-3pm EST (GMT-5)
| 4,652 | Markdown | 40.918919 | 80 | 0.795572 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2019-07-11.md | Minutes from 23rd OpenVDB TSC meeting, July 11, 2019
Attendees: *Dan* B., *Peter* C., *Ken* M.
Absent: *Nick* A., *Jeff* L.
Additional Attendees: Bruce Chernia (Intel), John Mertic (LF)
Agenda:
1) Quorum
2) Secretary
3) Round-Robin: Current and upcoming PRs
4) Graduation
5) Next Meeting
1) Quorum was confirmed.
2) Secretary was Dan Bailey
3) Round-Robin: Current and upcoming PRs
Ken:
Fast sweeping, value extension tool to be shared very soon. Initially this will
just be the core library implementation with subsequent discussion about the
right approach for a Houdini integration to follow.
Peter:
PR 455 - Some issues raised on the Sharpening PR that need consideration.
Optimization to repopulate stencil in Z-axis could be generalized to more axes
and extended to support jumps of more than one voxel. Also, Peter has been asked
by artists at DWA for a more generic convolution kernel and this PR could be
seen as a proof of concept of doing that.
Ken proposed (and has already implemented) an alternative technique which is
well established (actually dates back to the 1930s) and often referred to as
"unsharp masking". Peter wasn't able to get satisfactory results using this
technique, however that does not mean that it doesn't work - it certainly does
for Ken. However, it suggests that Peter might have found a better solution
which of course remains to be proven. Both methods are based on separable filter
kernels so Ken doesn't see why there should be a significant difference in the
computational efficiency, but cannot speak to the difference in quality since he
hasn't had a change to do a direct comparison.
The current implementation only works on level sets, but could be relatively
easily extended to support fog volumes and vector fields. Ken mentioned that
vector fields would be very useful to him. One option is to complete the current
PR and then introduce a new PR for the extension.
Peter didn't have access to his list of forthcoming work.
Dan:
PR 487 - Fixes CI issue where Houdini builds are skipped rather than fail when
run outside of ASWF Azure account. Trivial fix, anyone can approve.
PR 483 - Adds code coverage support to CMake, Nick currently reviewing. Minor
issue where code coverage takes a very long time to run (2 hours+) so can only
be run sporadically. A number of options to resolve this. Ken suggested running
the unit tests concurrently, though there may be issues if the tests themselves
run in parallel. Dan suggested using a smaller data set for some of the heavy
tests, perhaps with a flag that enables the more expensive tests for a less
frequent test run. Peter suggested using a mode that he added to the unit tests
where you can supply a file that defines which unit tests to execute. This
would allow for partitioning the tests into groups to be run concurrently
across multiple vdb_test processes.
All agreed there's lots of maintenance work to do around unit tests, improving
code coverage, breaking up some of the bigger tests like TestTools, etc.
PR 482 - An attempt to resolve the vulnerabilities reported by SonarCloud. Low
priority PR, merely included to start conversation. This adds a log or error to
empty catch statements based on whether they are expected to fail or not. Peter
commented that this might be problematic for the matrix inverse in particular,
Dan suggested we slightly refactor this one to not communicate with exceptions.
PR 479 - Meeting notes from last meeting, would quite like a meeting attendee to
approve before merge.
PR 464 - Unification PR. Peter to look into the spare data API and how to
retrieve a value previously inserted. Peter prefers exposing a non-const
OP_Table than communicating the labels to hide down into the OP_Factory, Dan to
change this.
PR 452 - Dan to address remaining feedback by adding syncNodeVersion support to
VDB Scatter SOP to be able to add position compression option now that spare
data API has been introduced.
PR 436 - Delay-loading PR. One remaining question from Peter about what happens
to the metadata when loading just the metadata in the VDB file as a preliminary
process to loading the rest of the file. Dan to investigate and reply to this
then Peter to do a final pass before we merge.
PR 402 - Peter to look into improving VDB SOP documentation, low priority item.
Main upcoming feature includes an extension to point moving to provide merging
grid functionality. Two options for exposing in Houdini, extending the VDB
Combine SOP and adding a new VDB Point Merge SOP. Dan presented Nick's argument
for the latter and all agreed that this is the better option considering compile
times and the existing node parameterization.
4) Graduation
Quick review of the graduation requirements. One remaining item needs looking at
before presenting for graduation - Steve Winslow has raised an issue in the
proprietary license notices included in the Houdini plugin, Dan to mail Jeff to
detail the specifics. Everything else seems in good shape, so hope to achieve
graduation before Siggraph.
Not necessarily a strict requirement for graduation but would be nice if all
could seek to sign the digital CCLA. Dreamworks and DNeg have already signed. If
the paper CLA that has been signed is not the Dreamworks-based CLA, but the more
recent one, this can be imported without needing to sign a new one. Send John
any signed paper CLAs to import if so.
5) Next Meeting
No meeting next week, next one scheduled for just before Siggraph.
July 25th 2019. 3pm-4pm EDT (GMT-4).
| 5,533 | Markdown | 43.629032 | 80 | 0.797217 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2020-04-30.md | Minutes from 47th OpenVDB TSC meeting, April 30th, 2020, (EDT)
Attendees: *Nick* A., *Jeff* L., *Ken* M., *Dan* B.
Additional Attendees: Johannes Meng (Intel), JT Nelson (Blender),
Andre Pradhana (DWA), Bruce Chernia (Intel)
Regrets: *Peter* C.
Agenda:
1) Confirm quorum
2) Secretary
3) Github protected branches
4) VDB Activate PR #692
5) Multithreaded File Compression
6) AX Update
7) Siggraph
8) Forum Posts
9) USD
10) Next Meeting
1) Quorum was confirmed.
2) Secretary was Jeff Lait
3) Github protected branches
All branches are protected. So as soon as you create a branch it can't be deleted. Only master should not be deleted.
Possible v3.3 and 6.2 branches should also be protected.
This showed up because we've started making branches on the master branch to hold changes. Unanimous consent to propose new rules for protected branches.
4) VDB Activate PR #692
Awaiting Ken's feedback. If he has not replied we can push it through tomorrow.
5) Multithreaded File Compression
Require big enough data sets to break into blocks. The grid's are working at too fine of a layer to benefit. We'd need to add a paging support to be able to coalesce the operations
6) AX Update
Most feed back has been addressed, other than the matrix issues.
A feature branch will be updated showing how it can be integrated on Nick's fork. Matrix is still an outstanding issue, specifically scalar matrix promotion.
CMake is still blocking this. Next week ideally will have demonstration.
Easiset way to build AX is to add LLVM to VDB as an option. This would allow VDB core to experiment with LLVM. However, the concern is that LLVM is hard to support so we should avoid locking down one version.
7) Siggraph
We have a BOF that will have to be virtual.
8) Forum Posts
Managed to defeat the Google UI and approve 15 people for the forum.
An issue with points docs was pointed out.
Our Vec3D code somewhere hard codes down to floats that needs to be fixed.
Question about associating grids together. 100 grids with same topology need duplicate accessors. Blind data could work. Or a way to get a linear node number into an offset table. We should reply and suggest solutions. The origin info in the node can be re-used as a blind data. This ties back to the float[N] grid type discussed previously. Dan will attempt to form a response.
9) USD
Some schemas exist already. They don't seem very VDB specific. Is there a problem we need to solve? Does VDB have to be more than an opaque volume format. As a render format, it doesn't need any over-operations. But what about USD as an interchange format? USD is a metadata format, so VDB can live within that without needing to be exposed at the USD level. What are images in USD? They seem to be references to file on disk.
10) Next Meeting
May 7th 2020. 2pm-3pm EDT (GMT-4).
| 2,862 | Markdown | 37.689189 | 434 | 0.7645 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2020-08-25.md | Minutes from 62nd OpenVDB TSC meeting, Aug 25th, 2020, (EDT)
Attendees: *Nick* A., *Jeff* L., *Ken* M., *Dan* B.
Additional Attendees: Johannes Meng (Intel), JT Nelson (Blender),
Bruce Chernia (Intel), Andre Pradhana (DW), Ahmed Mahmoud
Regrets: *Peter* C.
Agenda:
1) Confirm quorum
2) Secretary
3) Forum
4) Siggraph Recap
5) Roadmap
6) Next Meeting
1) Quorum was confirmed.
2) Secretary was Nick Avramoussis
3) Forum
Ken to reply to post about large VDBs/OOC.
4) Siggraph Recap
Good response from the ASWF Open Source days, presentations are now live. Good
idea to present the roadmap. Multiple questions w.r.t NanoVDB vs GVDB, it would
be good to clarify to the community the differences and scopes. Ken, comparing
the two directly is difficult.
ASWF forum vs Google forum question - unclear reply. We should dedicate a
meeting soon to come up with a stance. Dan is monitoring the ASWF slack. We
could deprecate the google forum. Ken, would be a shame to lose users. TBD.
5) Roadmap
We only have a few months for a 7.2/8 release window. Ken, main focus is
NanoVDB, Nick, main focus is AX. AX is ready to go. OpenVDB repo needs some
adjustments before a PR can be made. Ken, feature branch approvals is
frustrating, Dan to investigate if it can be removed.
Dependencies are a big focus. Ken, NanoVDB uses a utility header/wrapper around
TBB to abstract away the implementation. Dan, all we need is a threaded/
non-threaded switch to begin with and users can subsequently implement their
own threading constructs. Nick, TLS constructs are slightly tricker. The wrapper
should all be task based threading which provides an interface for others to
extend. All agree this is a worthwhile investment to port to OpenVDB. Dan to
investigate some of the other dependencies - primarily zlib, half and boost
(w.r.t delay loading). Need to make sure not to break ABI with any delay loading
changes. However ABI 8 could provide a nice opportunity for more substantial
change. All skeptical of how useful the per leaf delay loading granularity
thats currently implemented is - it convolutes the tree. Lots of work in this
area, no obvious/agreed on solution, though enabling/disabling through an
optional dependency is a good start.
Makefiles, vote to remove. Unanimous consent. Nick to action.
Bump to CMake 3.12. Unanimous consent. Nick to action.
Look over deprecated code for removal for 7.2/8.
Pruning of tree methods. Dan, proposed new CSG methods make a bunch of methods
(primarily the visit methods) obsolete and could be deprecated. All agreed that
this concept is still worth pursuing. Dan, once this PR is in, can contribute
the Merge SOP.
Locking down the tree structure. Non-obvious timeframe, would most likely be
significant work. Jeff, for VDB 8, see if we can make it harder for this to
be customized or to build in compiler warnings for users who are doing so.
Tile support for all tools. Ken, there's no one size fits all - each tool will
treat tiles differently. Nick, will push an extension to Filter.h which supports
tiles. Ideally this should be generalised such that all tools can call the same
tool to configure tile topologies. Indirect goal to remove the Densify SOP.
Andre, continuing to work on the Extrapolate SOP for 7.2/8. Seems to be a
problem with extensions of non-float grid types. Andre to provide an example to
Ken to fix.
Ken to take another look at the sharpen PR #756 and merge.
Nick, Morphololgy PR #754 is ready for review and can be targeted for 7.2.
JT, preparing a demonstration of VDB in blender, both on master and other more
experimental features.
Dan, will merge CI changes.
Dan, release notes conflicts are still annoying. Jeff, can we implement custom
conflict rules for github. All agreed this would be ideal, but unsure on
githubs support for this. Dan to investigate.
In future meetings, we should discuss how to better organise the roadmap for
"good first issue" tasks to on-board more developers.
6) Next Meeting
September 1st, 2020. 1pm-2pm EDT (GMT-4).
| 4,028 | Markdown | 39.29 | 80 | 0.780288 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2019-08-22.md | Minutes from 25th OpenVDB TSC meeting, August 22, 2019
Attendees: *Nick* A., *Dan* B., *Peter* C.
Absent: *Ken* M., *Jeff* L.
Additional Attendees: Bruce Chernia (Intel), John Mertic (LF)
Agenda:
1) Quorum
2) Secretary
3) CMake / CI updates?
4) SPDX changeover
5) Upcoming Point Partitioner refactoring
6) Modifying deprecation policy
7) Where to start with modifying Tree classes
8) Next Meeting
1) Quorum was confirmed.
2) Secretary was Nick Avramoussis
3) CMake / CI updates
Windows builds are still an issue. We believe this is due to the manual system
path setup which omits windows and disables CMake's automatic path detection
when given a toolchain file. The README should be updated to clarify the build
instructions listed are a starting point for CMake builds, intended for users to
be able to iteratively run and react to any CMake warnings/errors presented.
Nick believes PR #504 will help resolve some of these issues but there are some
outstanding questions with the implementation. Nick to continue to investigate.
CLA/PRs
Some PRs are becoming stalled on the CLA. All TSC members to chase/ensure they
have signed the digital LF CLA.
Older PRs/github issues are becoming awkward due to new submissions superseding
or re-implementing them. In the next TSC we should decide on a system for
closing or declining unresponsive or old PRs/issues.
4) SPDX changeover
Peter to take the lead on this change due to DreamWorks owning the current
license. Dan to provide Peter with examples of the requested changes that need
to occur. Chat links:
Dan: https://github.com/imageworks/OpenColorIO/pull/799
John: https://github.com/AcademySoftwareFoundation/openvdb/blob/master/LICENSE
John to start a discussion with DreamWorks legal on the migration to SPDX.
5) Upcoming Point Partitioner refactoring
Dan working on a refactor to the internals of the current point partitioner to
better work with OpenVDB Points. Currently it requires a two pass system (for
VDB Points) which isn't ideal. There are also a number of C++11 improvements
which can be made. Nick asked if the changes also benefit arrays of positions
(non VDB Point data). Dan reported faster performance with linear arrays.
6) Modifying deprecation policy
Discussed adding deprecation warnings in the next releases of VDB. VDB 6.2.0
will be the last supported VFX17 release which should introduce all related
deprecation warnings based on the VFX18 requirements. VDB 7.0.0 planned to bump
all minimum versions to the VFX18 platform (notably C++14). Support for ABI 2,
3, 4 and 5 to be maintained until VDB 7.0.0, with the plan to remove them at
the end of the year.
7) Where to start with modifying Tree classes
Discussion around the free function vs base (untyped) member function
implementation of grid/tree methods (prune, clip, topologyUnion etc). prune and
clip are interesting cases as they live on the untyped base version of the grid
object. This delegates runtime branching of the grid type to the virtual
function table rather than forcing the user to perform boilerplate switching on
unknown grids. This is particularly useful for the clip method which is used in
file IO. It's unclear whether we should continue to remove these methods because
of this. Methods that live solely on the typed derived classes can more easily
be moved into standalone header/free function combinations. However a decision
should be made as to how we want to leverage the base class API before we
consider this, as an argument could also be made to make some of these methods
on the derived grid/tree also available as pure virtual methods on the base
class. Discussion to continue.
8) Next Meeting
August 29th 2019. 3pm-4pm EDT (GMT-4).
| 3,721 | Markdown | 39.901098 | 80 | 0.795754 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2019-03-28.md | Minutes from 12th OpenVDB TSC meeting, Mar. 28, 2019
Attendees: *Ken* M., *Nick* A., *Dan* B., *Peter* C.
Additional Attendees: Andrew Pearce (DWA), Thanh Ha (LF)
Apologies: *Jeff* L.
Agenda:
1) Confirmation of quorum
2) Selection of secretary
3) TAC Update
4) Multi-Res Grid
5) Out-of-Core Read-only Grid
6) Instantiation / Compile-times
7) Tools vs Grid Methods
8) Release Schedule
9) CMake/CI Update
10) Improve / Update Cookbooks
11) CLA Check
12) Update Website
13) Documentation on how to file bug-reports or ask questions
14) Grid Iterator Performance
15) Next Meeting
1) A quorum was confirmed. Ken was phoning in, so Dan chaired.
2) Secretary - Dan Bailey
3) TAC Update
No-one available to represent OpenVDB in TAC Meeting the day before. Dan sent
Daniel Heckenberg a brief summary of OpenVDB updates which were shared. Thanh
gave a brief update from the TAC Meeting. The ASWF board are in support of using
Circle CI but remain interested in being able to provide reproducible builds
outside of Circle. Thanh also announced he was leaving the Linux Foundation for
a startup. Andrew Grimberg is taking over his responsibilities and is already
up-to-speed. It is envisioned that Andrew will attend the TAC and CI working
group meetings, but likely not the project TSC meetings.
4) Multi-Res Grid
Ken has received a comprehensive response from Autodesk answering the TSC
questions regarding Autodesk's proposal for introducing the Multi-Res Grid to
OpenVDB. He will be sending it around to the group shortly for discussion in the
next meeting. First impressions look promising.
5) Out-of-Core Read-only Grid
Ken has a working implementation of an out-of-core VDB grid. It is read-only,
supports random access with a pre-defined fixed memory footprint and can be
built from a standard out-of-core VDB grid. A fully out-of-core VDB grid
requires half the memory footprint of a standard VDB grid in out-of-core mode.
Savings are also possible through not supporting very old file formats. Ken
plans to release at Weta and then to look to introduce to the OpenVDB codebase.
Some concerns from Peter and Dan about introducing a new Grid structure, but
keen on understanding more of the implementation details.
6) Instantiation / Compile-times
Compilation of applications and plugins built against OpenVDB is slow and uses a
lot of memory, which we wish to address. Peter wants to consider baking the
configuration of the grid so as to improve compilation times and suggests asking
users whether they ever change the grid configuration. Ken mentioned that he
knows people change the size of the leaf node for GPU and other uses, but
unaware of many people changing the configuration of the tree. He wants to find
out if this is a consideration for Autodesk's Multi-Res Grid. Potential
investigation around where the compilation time is going could help direct our
efforts. Explicit template specialization also worth looking into.
7) Tools vs Grid Methods
Over time, there has been a gradual migration towards using free functions in
the tools directory instead of adding to the Grid and Tree classes. Question of
whether it's a good time to introduce a policy around this and to look at
removing some of the Grid and Tree methods. Ken proposed that the first step is
to look at all the methods and confirm whether they can currently be removed or
whether they need new access functions to be able to remove them. This change is
also expected to improve compilation times. Removing virtual functions needs to
be done in a major release, so they would need to be marked deprecated in a
prior release.
8) Release Schedule
Peter proposes we do a new release in the next few weeks. It was decided that
the next release should be 6.1.0, as there is a lot of new functionality and
some of the changes appear that they may affect the API. Unanimous vote in
favour. Potentially hold off to ensure we can include CMake changes. Peter
proposes adding static casts to fix the precision warnings as a temporary
solution so that we can make this release compile with strict mode enabled
without behavior changes. Ken proposes another minor/patch release shortly
before Siggraph. Rough plan is to do a new 7.0 release in September / October
which changes ABI, so we should start gathering ideas now. This new major
release can also be when we mark methods as deprecated that we intend to remove
in early 2020.
9) CMake/CI Update
Nick gave an update on his progress with refactoring CMake, his stage branch
contains further improvements. Main issues are around IlmBase/OpenEXR version
suffixes and case-sensitivity of CMake modules. Peter is currently testing with
DWA infrastructure and has run into a few issues, particularly around GLFW. Dan
has added CircleCI support which now builds all third-party dependencies from
scratch. More testing to come. Dan proposes changing the syntax, Nick suggested
after this PR gets merged is a good time. Peter asked about improved ways to
help users build against OpenVDB instead of using openvdb_print, Dan suggested a
"Hello World" sample might be a nice way of getting people started. Nick says
there is still some work needed on introducing a CMake module and improving the
find package mechanism for building against OpenVDB.
10) Improve / Update Cookbooks
Dan suggested building the cookbooks as part of the CI. Peter and Ken proposed
instead turning the cookbook examples into samples modeled after the SideFX HDK
samples with links from the documentation where relevant.
11) CLA Check
Thanh says to follow up with John regarding the progress of this.
12) Update Website
Website originally designed by Mihai Alden, needs some updating. All present
should seek permission for images from their respective studios to add to the
website with the aim for an update to be completed by Siggraph.
13) Documentation on how to file bug-reports or ask questions
General desire to keep Google forum around to avoid having to ask 600 or so
users to re-subscribe. Need a proposal on what to do with other communication
mechanisms such as GitHub issues and mailing lists. Dan to do a first draft of
changes to contributing.md.
14) Grid Iterator Performance
Dan raised performance issues with the grid iterator. When used in
tools::extrema(), it represented as much as 30x performance differential. Ken
mentioned that it's a significant problem and often his first question to a user
asking about performance is around which iterator they are using. The main issue
is poor ability to split when threading. Peter highlighted that this iterator
was designed for convenience, not performance and that performance varies based
on the use. Ken believes people are using it by accident without realizing the
performance consequences and better documentation wouldn't necessarily address
this. Two potential solutions were discussed - removing the grid iterator
entirely and re-writing it to offer a faster, underlying implementation.
15) Next Meeting
Our next TSC meeting is scheduled for Thursday April 11, 2019 11am-12pm PST.
| 7,074 | Markdown | 45.546052 | 80 | 0.804213 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2021-01-19.md | Minutes from 76th OpenVDB TSC meeting, Jan 19th, 2021, (EDT)
Attendees: *Nick* A., *Jeff* L., *Ken* M., *Dan* B.
Additional Attendees: Johannes Meng (Intel), JT Nelson (Blender),
Andre Pradhana (DW), Richard Jones (DNeg), Bruce Chernaik (Intel),
Laura Lediaev
Regrets: *Peter* C.
Agenda:
1) Confirm Quorum
2) Secretary
3) AX
4) Andre joining TSC
5) Images
6) TAC Survey
7) VDB Activate SOP
8) CSG Intersection Bug
9) Inline Half
10) Next Meeting
1) Confirm Quorum
Quorum is present.
2) Secretary
Secretary is Dan Bailey.
3) AX
Nick looking to get PR931 merged as soon as possible. This is the last piece
that requires maintaining a separate DNeg repo which is time-consuming.
Attributes to create needs fixing so that it includes pattern matching. Jeff
suggests looking into using UT_String::multimatch() for this.
Active tiles should be densified by default, as constant tiles should be
primarily considered a space-saving optimization and not affect which data gets
evaluated. Easiest solution is to globally densify and constify. Better approach
would be to stream - densify and constify each tile in turn as it's processed -
this is more challenging to implement but would likely reduce memory footprint.
Easiest solution is likely most appropriate here as additional optimization can
be performed later without changing behaviour.
Currently, a missing attribute errors on read. This is different to how VEX
works, which errors on write but not read.
There should not be a mode for running over inactive voxels. For now, acceptable
to include a compile guard to disable this option.
4) Andre joining TSC
Ken has reached out to Peter Cucka and Peter agrees to allowing Andre to replace
him on the TSC. Motion to make Peter an Emeritus TSC member, update the website,
remove him from GitHub OpenVDB group membership and as an OpenVDB code owner. 4
of 5 TSC members approve. Peter not present, but approved offline.
Andre Pradhana accepts the invitation to become a TSC member. Will follow up
with DWA leadership.
5) Images
ASWF has obtained a few more OpenVDB images from studios, still need more. Andre
believes DWA may be able to contribute some new images.
6) TAC Survey
Ken has requested an OpenVDB-specific survey to the TAC, as the most useful
questions appear late in the ASWF distributed survey.
7) VDB Activate SOP
Deactivation is a slow, single-threaded method. Jeff believes it may have
existed prior to tools::deactivate() but is in favour of switching it out.
8) CSG Intersection Bug
Jeff has reported a bug in the new CSG Intersection method and had to roll back
Houdini 18.5 to 7.1 as a result. Dan to investigate and look to release 7.2.2 /
8.0.1 with the bug addressed.
9) Inline Half
No objections regarding licensing from TAC.
Lots of questions regarding the correct level of integration of Half. It would
be preferrable to be able to swap out an embedded OpenVDB Half implementation
with the third-party library to easily test and adopt improvements, however this
is not trivial to achieve. Jeff's PR embeds Half in openvdb/math and uses an
openvdb::math namespace. This means we are essentially forking the
implementation for OpenVDB. Is this a problem? Not much has changed in Half in a
long time, though there are ongoing plans to update it. Not simply a matter of
changing the namespaces as we also wish to bake the auto-generated lookup table.
Half support is coming in C++23, but it will take a long time before we can
adopt that. Also, there is potential to switch to using Imath as a math library
in the future. Would this affect the decision here? Conversation ongoing on the
PR about the right approach to take here.
10) Next Meeting
Next meeting is Jan 26th, 2021. 12pm-1pm EST (GMT-5).
| 3,752 | Markdown | 34.40566 | 80 | 0.784648 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2020-10-13.md | Minutes from 65th OpenVDB TSC meeting, Oct 13th, 2020, (EDT)
Attendees: *Nick* A., *Jeff* L., *Ken* M., *Dan* B.
Additional Attendees: Johannes Meng (Intel), JT Nelson (Blender),
Andre Pradhana (DW), Bruce Cherniak (Intel)
Regrets: *Peter* C.
Agenda:
1) Confirm quorum
2) Secretary
3) Forum
4) AX Follow-up
5) Filter Tile Support
6) Paged Array Segfault
7) USD Support
8) Next Meeting
1) Quorum was confirmed.
2) Secretary was Dan Bailey
3) Forum
One question on the forum about using Visual Studio and CMake. No-one in the TSC
has much experience in this area. Still might be useful to post that we don't
know the answer and encourage others in the community to comment. D&I group are
looking at how to improve onboarding. Many people who use OpenVDB through
Windows use vcpkg rather than compiling from source.
4) AX Follow-up
Nick to review all feedback. Will take a while to get through everything,
priority is the core library at the moment. SOP feedback will follow.
Int conversion is proving tricky. No JIT compilation based on the type in VEX.
In AX, there is a separate accessor per-type, so hard to resolve integer issues.
Most likely route forward is to introduce explicit integer types for bindings
and then in future turn these into an alias to make them all int. That would
avoid backwards compatibility issues.
Looking for alternatives to running over inactive values, however Nick relies on
this mechanism heavily. Jeff prefers the ability to provide an optional stencil
mask as an optimization.
Don't use VEX language editor, not only will it highlight syntax incorrectly,
but it will reference the VEX documentation. Currently no hooks to introduce a
custom language editor in Houdini. Easiest route is likely to incorporate this
into VDB then let SideFX introduce a new language editor when natively
integrating AX into Houdini.
5) Filter Tile Support
Nick has submitted a PR to add tile support to the filter methods. It eliminates
tile artefacts in smoothing.
6) Paged Array Segfault
Nick has reported a number of sporadic segfaults related to the PagedArray data
structure. Last instance of a segfault in PagedArray was fixed by switching from
vector to deque. May be related to a standard library implementation offering a
deque implementation that is not thread-safe. However, there does not appear to
be any pattern in compiler, standard library or platform.
Nick to provide Ken with a bit more data to help try and track down the root
problem.
7) USD Support
All agreed that it could use some work as the current VDB integration is fairly
basic.
8) Next Meeting
Next meeting is October 20th, 2020. 1pm-2pm EDT (GMT-4). Dan to present PR785
for discussion and review.
| 2,716 | Markdown | 33.392405 | 80 | 0.787555 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2020-07-21.md | Minutes from 57th OpenVDB TSC meeting, July 21st, 2020, (GMT)
Attendees: *Nick* A., *Jeff* L., *Ken* M., *Dan* B.
Additional Attendees: Johannes Meng (Intel), Bruce Chernia (Intel),
JT Nelson (Blender), Peter Cheng (DW), Andre Pradhana (DW),
Robin Rowe (Cinepaint), Roman Zulak
Regrets: *Peter* C.
Agenda:
1) Confirm quorum
2) Secretary
3) Forum Issues
4) Windows/Blosc Issues
5) Fast Sweeping
6) #739
7) Merge/Dynamic Load Manager
8) 7.1 Deadline
9) AX Merge
10) Next meeting
1) Quorum was confirmed.
2) Secretary was Nick Avramoussis
3) Forum Issues
None to discuss
4) Windows/Blosc Issues
Ken, issues at NVIDIA with OpenVDB reading/writing examples files with blosc
compression (on Windows). Believe to be related to blosc setup but, as they're
confident 1.5 is being used, it could be something else. All agree that an
investigation into blosc versioning is a major issue. NVIDIA to open up an issue
with more information for us to diagnose.
5) Fast Sweeping
Dan, performance improvements have been completed and discussed with Ken.
Between 2-4x faster, however it does use more memory - this along with some
minor additional improvements remain but can be completed at a later date.
Remaining work mostly related to the return behaviour and type of the available
free functions. Discussion around the automatic termination behaviour of some of
the methods. Ken to investigate adding tolerance controls to detect increases
(or negligible decreases) from previous iterations and exit accordingly.
6) #739
PR to change the attribute transfer field on the VDB From Polygons SOP to a
string field with some common defaults as options. Dan, added point.v as a
default, perhaps point.Cd/.N should also be added? All agreed that the main
use of these drop down options are to educate users on how to specify
attributes and we can add more options later. Dan, confirmed that the PR will
not break existing scenes. Dan to merge as is.
7) Merge/Dynamic Load Manager
Dan, still investigating how best to provide this support. Tests with perfectly
overlapping SDFs perform significantly faster than the current NodeManager,
however completely non-overlapping SDFs are slower as they still need to iterate
over all levels of the tree. Could design user functors to return true or false
if subsequent iteration is required, however it would be nice if functors could
work with any NodeManager. Discussed free-function support in the context of a
merge header. Dan, could provide signatures which behave differently on const
presence. Concern that this behaviour is too obscure to users and may cause
unintended results when user implementation changes. Questions as to where this
functionality should live; in a dedicated Merge header or in the NodeManager
header.
8) 7.1 Deadline
Deadline for 7.1 changes set to 2 weeks from today (deadline 4th August).
9) AX Merge
Whilst all TSC members still want to work towards an AX merge for 7.2, may have
to consider the possibility of delaying either the 7.2 release or AX depending
on TSC review time. Nick to also contribute the AX Houdini SOP as part of the
initial AX merge.
10) Next meeting
July 28th, 2020. 1pm-2pm EDT (GMT-4).
| 3,191 | Markdown | 35.272727 | 80 | 0.787841 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2019-12-05.md | Minutes from 35th OpenVDB TSC meeting, December 5, 2019, (GMT)
Attendees: *Nick* A., *Dan* B., *Jeff* L., *Ken* M.
Additional Attendees: Andrew Pearce (DreamWorks), Daneil Elliot (Weta)
Regrets: *Peter* C.
Agenda:
1) Confirm quorum
2) Secretary
3) Outstanding 7.0 Items
4) PR568
5) PR578
6) Optional build dependencies/Thread pools and TBB
7) VDB Merge SOP
8) Roadmap discussion
9) OpenVDB Blog post by Emily
10) Website Logos
1) Quorum was confirmed.
2) Secretary was Nick Avramoussis
Update by Andrew with TSC recommendations from DreamWorks. The TSC has discussed
with Peter C his desired involvement going forward, with the plan being to wait
a few months to gauge how active Peter would be. Andrew confirmed that no one at
DreamWorks is currently in a position to replace Peter as a TSC member. All
members of the TSC express lots of interest for more people to contribute to all
levels of the project.
3) Outstanding 7.0 Items
An issue exists with PR 536 (merged), where virtual methods introduced to the
Tree have not been guarded in an ABI clause. This produces crashes when VDBs
created in other applications prior to these changes are passed to custom
builds. These needs to be fixed before the 7.0 release. Ken to fix and push up
changes, Nick to release once this has been tested and confirmed. All members in
agreement that we should investigate ABI tests (OVB-118).
4) PR568
Needs an additional approval before merge.
5) PR578
Houdini 18 now requires a license when certain functions from its CMake modules
are used (as they run hython). Our CI can work around this by manually providing
an install path. Questions raised whether using hython here is necessary.
6) Optional build dependencies/Thread pools and TBB
It would be nice if as many as possible of OpenVDB's dependencies were optional
(tbb, zlib, ilmbase, openexr, boost are not). Specifically with TBB,
generalizing our threading infrastructure would be extremely useful. A shared
utility header/some other type of higher level abstraction providing common
macros/links which can be used to implement custom schedulers or even completely
disable threading would help provide more custom control over multi-threaded
methods. Note that the C++ committee is currently working on a TBB "replacement"
(executors), but this is not expected to arrive until C++20.
7) VDB Merge SOP
Dan proposing a merge SOP which merges all types of volumes. This could
incorporate a subset of the combine SOPs features, the most obvious of which
would be union type functionality. There currently exists a Vector Merge SOP
which will be confusing. Initial TSC reaction positive, Dan to put together a
more detailed proposal.
8) Roadmap discussion
Discussion to be delayed until after release. AX mentioned as a significant
contribution, Nick is looking to priorities this.
9) OpenVDB Blog post by Emily
Not many exciting things to include for a blog post bar those we've already
mentioned. Consensus was that if we could wait until next year that would be
ideal.
10) Website Logos
Consensus that we shouldn't shy away from reaching out to companies who release
software with VDB support with logo requests. The VFX platform logo should be
last on the list on the website. Ken to reach out to some vendors.
11) Next planned meeting is:
December 19th 2019. 2pm-3pm EST (GMT-5).
| 3,354 | Markdown | 35.868131 | 80 | 0.790698 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2019-05-30.md | Minutes from 18th OpenVDB TSC meeting, May 30, 2019
Attendees: *Ken* M., *Nick* A., *Dan* B., *Peter* C., *Jeff* L.
Additional Attendees: John Mertic (LF)
Regrets: We have no regrets.
Agenda:
1) Quorum Secretary
2) Secretary Selection
3) CI Update (Dan)
4) CLA Update (John)
Non-Planned A) Siggraph
Non-Planned B) Floodgates
5) Mainline Remote Branches (Nick)
6) Switch to Relative Header Paths (Peter)
7) OpHiding Next Steps (Dan)
8) GitHub Issues Cleanup / Process for Submitting Bug Reports (Nick/Jeff)
9) VDB Delayed Loading (Dan)
10) Maya Plugin (Nick)
11) Level Target Pruning/Voxelization (Nick)
12) Speed of hasActiveTiles/voxelizeActiveTiles (Nick)
13) Schedule Next Meeting
1) A quorum was confirmed
2) Secretary - Jeff Lait
3) General concerns and remarks about the project (Ken/Peter)
A wide ranging discussion about the state and purpose of the VDB
project was held. The rate of PRs has made it difficult to
adequately review them, and people are feeling rushed into
approval. There also doesn't seem to be any real "meat" to
show for all the PRs - the 6.0 and 6.1 releases don't seem
to generate a lot of attention to users as they seem to involve
no new exciting features.
We agreed it would be good to use the TSC meetings to discuss
upcoming plans rather than administration. In particular,
we could prioritize what features are coming rather than just
having them appear suddenly.
Different opinions are held on whether a release needs to have
any major features. The majority opinion holds that the users
don't care about version numbers, so we shouldn't hold ourselves
to any release cadence. The minority feels that without press-release
relevant features VDB may fall out of favour.
We agreed that part of the TSC meetings should be dedicatd to
actual feature discussion. One proposal was to alternate the purpose,
another was to have a fixed timeslot reserved for this to avoid
being crowded out.
It is acknowledged that some PRs will inevitably come out of the
blue as they are from production rather than TSC needs. Likewise,
bug fixes are unlikely to have any advanced notice. But where
possible we would like all feature PRs to be announced at a TSC
meeting to give the other members an advanced notice of what
might be coming down the pipe.
It is planned to do explicit roadmap discussion at Siggraph this year.
4) Plans for v6.2 (all)
No precise date is present at the moment. Siggraph is still a
tentative date. Integration with Houdini++ likely requires
a release around that date.
It is expected that AX will exist as a feature branch by that point.
Action Item: TSC members are to make a short list of contributions
they plan for Siggraph by next meeting.
Non-Planned A) Siggraph
The course appears to be a go ahead, the issues with course
notes seems to have been addressed.
There will be a Birds of the Feather with two blocks devoted
to VDB.
Non-Planned B) Floodgates
It was noted that if we start getting external contributions, we
should keep in mind to groom potential future maintainers.
5) Response to Autodesk (Ken)
Not done yet. Being worked on. Should meet with them at Siggraph.
6) Memory pools and custom allocators (Ken)
Should we add memory pools and custom allocators to our
tree structures? Useful for host/device and out-of-core computations.
Needs to be somehow backwards compatible.
7) CII badge status (John M)
It is important not to overthink these badges.
The bug reporting would likely be solved by Nick's planned progress.
No one wants to volunteer to be known as the security expert.
MITM attacks are likely handled by github's distribution model.
8-12) Time
13) Schedule Next Meeting
June 6th 2019. 3pm-4pm EDT (GMT-4).
| 3,731 | Markdown | 31.452174 | 73 | 0.778344 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2019-06-20.md | Minutes from 21st OpenVDB TSC meeting, June 20, 2019
Attendees: *Nick* A., *Dan* B., *Peter* C., *Jeff* L., *Ken* M.
Additional Attendees: Bruce Chernia (Intel)
Agenda:
1) Quorum
2) Secretary
3) Siggraph planning
4) PagedArray unit test fix
5) SOP unification and hiding
6) SOP tab sub-menu and suffix
7) Static Pointer Memory Leaks (PR 227)
7a) CI Update
7b) Houdini status
8) Memory Allocators
9) VDB Points MMB bug (OVDB-100)
10) Speed of hasActiveTiles/voxelizeActiveTiles
11) GCC and Dual ABI
12) Next Meeting
1) Quorum was confirmed.
2) Secretary was Jeff Lait
3) Siggraph planning
We have a dedicated meeting slot in the BoF for discussing development
issues rather than as an open forum. The plan is Wednesday 11am-Noon
to discuss with Autodesk the MultiResolution issues.
With both a course and a BoF, it is unclear how to handle the BoF. Less
need to just dump new updates as the course will cover that. "What would
you like to see?" was a goo conversation starter in the past. Previous
answers were Multi Res and Delayed Loading.
4) PagedArray unit test fix
Still trying to build a PR for this. Unfortunately, git is very
painful to work with. Might end up just being a patch forwarded.
gitk is listed as a good tool to figure out what git is trying to do.
5) SOP unification and hiding
We now have separate PRs for both adding spare data to OP_Operator
and for creating a pythonrc to do the hiding. Consensus is both the
env-variable and pythonrc can go in as the overlap has been minimized.
It would be a good if it triggered a warning if you turned both on.
The SpareData technique should be adopted by Houdini some day to allow
generic sparedata on all OP_Operators. RFE: 97588 has been submitted
for this.
The environment variable should match the pythonrc, so be a three way toggle.
CMake should let you set both, but with a warning that you likely will
confuse yourself.
6) SOP tab sub-menu and suffix
Previous default menu was Custom. Instead, by using a named menu we
can ensure conflicts get a suffix automatically. ASWF isn't a good
top level menu as no one will know to look in it. Renaming nodes is
finicky, so consensus is the tab suffixing is a better approach to
deal with ambiguity.
Bug: 97465 for suffixes not working has been fixed in 17.0.620, 17.5.295.
7) Static Pointer Memory Leaks (PR 227)
This is a long standing PR from Autodesk. We should at least answer.
It wasn't merged because older versions of MSVC did not conform to C++11
for function statics. It also isn't a memory leak, as it will be
freed on destruction in either case. Further, destruction order causes
its own risks so safest to not delete. OTOH, C++11 is now a requirement
and going forward we can support function statics.
Next version will be C++14 so this implies 2017 MSVC. We should
state this on the upgrade.
While this PR isn't necessary, it would be a good test for the new CLA
process. Jeff will comment on the PR and ask them to wait for the
CLA mechanism to be active.
7a) CI Update
Switching over to a host repository on a ASWF docker. This will have
a pre-installed CentoS7 with all the dependencies pre-built. All is
working except the Houdini install. Installing glfw is problematic,
however. Bumping glfw (which is only used by vdbview) to a higher version
will likely simplify. Unanimous consent to bump to 3.1 to match
Ubunut 16.04.
Minimum is currently 3.0. But 3.1 is what you get with apt-get. However,
vdbview crashes on close with unpatched glfw due to EGL problems.
Recommendation is 3.3.
7b) Houdini status
Attempt to upgrade HEAD Houdini to latest VDB ran into a problem with
the VDB Clip changes. The question of if primitive attributes or vdb
metadata should be authoritative when processing SOPs (and when processing
VDB code) is thorny and error prone. In this case, file_bbox is generated
on save to .bgeo streams. So reloaded .vdbs have the value as metadata
and do not have matching primitive and vdb data. Interestingly,
file_bbox is off in the open source build. Should it be on by default
in all builds?
8) Memory Allocators
Discussion at Siggraph on memory allocators and file format changes.
9) VDB Points MMB bug (OVDB-100)
Jeff Lait is to look at this.
10) Speed of hasActiveTiles/voxelizeActiveTiles
Time
11) GCC and Dual ABI
Time
12) Schedule Next Meeting
June 27th 2019. 3pm-4pm EDT (GMT-4).
| 4,405 | Markdown | 33.155039 | 77 | 0.772077 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2020-04-09.md | Minutes from 45th OpenVDB TSC meeting, April 9th, 2020, (GMT)
Attendees: *Nick* A., *Jeff* L., *Ken* M.
Additional Attendees: Johannes Meng (Intel), JT Nelson (Blender),
Peter Cheng (DW), Andre Pradhana (DW)
Regrets: *Peter* C., *Dan* B.
Agenda:
1) Confirm quorum
2) Secretary
3) OpenVDB AX recap
4) Forum/Github Issues update
5) Plan for Improved Morphology
6) Google Summer of Code
7) CI Updated
8) VDB Activate/Activate SDF
9) OVDB-136
10) OpenVDB & USD
11) Next meeting
1) Quorum was confirmed.
2) Secretary was Nick Avramoussis
3) OpenVDB AX recap
Discussion ongoing between Nick and Jeff as various AX features are nailed down.
A number of proposed changes have been approved - bitwise operations on
integer vectors, restricting comparison operation on container types and correct
implementation of fmod. Two outstanding requests are the beahviour of
matrix and scalar operations and container (vector) extension. Jeff's preferred
behaviour for the prior is to treat scalar promotion as an identity matrix
with its identity components set to the corresponding scalar. For the latter,
VEX currently extends vectors with a value of one to better match the behaviour
of various applications against matrices of otherwise incompatible sizes and to
better correspond to a default value of colour (alpha) or homogeneous coordiante
(w). The alternative would be to explicitly error on this behaviour. AX
currently already errors on assignment of containers of mismatching sizes.
4) Nick proposed that every TSC meeting additionally begin with a quick recap
of newly opened forum posts or github issues. Unanimous consensus. Two topics
for discussion.
4a) OpenVDB Documentation
New forum post requesting update on OpenVDB documentation. Agreement that
OpenVDB technical documentation needs a revamp and could benefit from extension.
This is a significant task with no obvious starting point. Andre mentioned that
the unit tests have served as a good place to observe various intended usage of
VDB methods. Using the unit tests would provide a base set of examples to start
writing documentation. Nick, concern that as the unit tests have not necessarily
been designed for this that some of the logic in there could be "inaccurate" in
terms of an optimal implementation solution. Additional care to be taken that
the unit tests are first and foremost that, with clear documentation of the
intended example. Nick to create a ticket with a task to identity some of the
larger tools missing documentation and corresponding unit tests which could be
used as a first doc attempt.
4b) Hessian computation of VDB grids
Github issue asking if OpenVDB supports the computation of the Hessian matrix
from a scalar Grid. Currently unsupported. Ken, should be fairly trivial to
implement. However, as the result per value is a matrix, there is no native way
to store this information as VDB does not register matrix grids by default.
Registering these grid types would be one option - however compile and runtime
variants of "strided" grids (where each voxel/tile value contains an array of
scalar values of a fixed size) were discussed as alternative solutions which
could add more flexibility. Some potential confusion when inferring values on
a grid with an "intrinsic" type i.e. Vec3f vs float[3] collocated vs staggered
interpretation. General agreement that runtime variants would be interesting to
pursue. Nick to create a ticket and reply to issue.
5) Plan for Improved Morphology
Ken and Nick to catch up at a later date.
6) Google Summer of Code
Two mentors are needed. Dan has already volunteered to be one. Nick has
volunteered to be the second, with an agreement with Ken to share responsibility
if required.
7) CI Updated
General notice that all VDB builds should now be passing on new PRs and that PRs
should not be merged if any builds fail. Dan has a fix in the works to re-enable
the Houdini 18 Debug builds.
8) VDB Activate/Activate SDF
Two open PRs (PR692, PR695) could do with additional review from Ken and Nick.
9) OVDB-136 (Point Merging/Moving)
Nick needs to review PRs PR652 and PR631.
10) OpenVDB & USD
Additional discussion to be had next meeting.
11) Next meeting
April 16th 2020. 2pm-3pm EDT (GMT-4).
| 4,245 | Markdown | 38.682243 | 80 | 0.797173 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2019-07-25.md | Minutes from 24th OpenVDB TSC meeting, July 25, 2019
Attendees: *Nick* A., *Dan* B., *Jeff* L., *Ken* M., *Peter* C.
Additional Attendees: Emily Olin, Daniel Elliott
Agenda:
1) Quorum
2) Secretary
3) Siggraph
4) Graduation
5) Delayed Loading PR
6) Copyright
7) Outstanding Bugs
8) Next Meeting
1) Quorum was confirmed.
2) Secretary was Jeff Lait
3) Siggraph
We have three engagements.
A) Course: Sunday 9-10:30
Nick, Dan, and Ken are presenting.
Nick will be covering AX exclusively for a 30 minute slot. He may have
a live demo pending laptop issues.
Dan will cover in a 30 minute window:
* VDB/OpenVDB renaming
* Delayed Loading (still outstanding PR)
* Point Moving (a new implementation)
* Scattering/Merging multithreading solution.
Ken will cover parallel fast sweeping and general optimization techniques
focusing on multithreading.
B) BOF: Tuesday 9-10am
This will have a projector with HDMI but we need our own laptops.
Mikes will be setup, so we should arrive 10 minutes early. This
will be recorded. It is expected Q&A will be difficult so we should
have something prepared. We can re-arrange chairs but only if we
fix it before the next session.
We have the slide templates distributed in the TSC private.
We decided discussion of the CMake project best fits in this BOF,
not in the course.
C) Internal TSC Meeting, Wednesday 11-Noon
Will be the meeting with Bifrost over multiresolution questions.
4) Graduation
TAC met to discuss the graduation and ran a vote over the email thread now
that we fulfilled the requirements. A check of commit logs shows that we
are now graduated! Hurrah!
Announcement of graduation will be part of press release on Tuesday,
but we can refer to it prior to then.
6.0, 6.1, and 6.2 releases should likely be grouped as 6.X release.
5) Delayed Loading PR
An existing delayed loading PR is awaiting approval. Peter okayed
it being pushed through by Dan.
6) Copyright
The thread on how to setup copyright boilerplate on DNegs new files
for AX was left a bit vague. We will resurrect that thread and verify
we are on the same page for what should be done.
7) Outstanding Bugs
Nick idenfitied some new issues on Mac. Linking to python is failing
and the current concurrent allocator is crashing on his version of OSX.
8) Next Meeting
Between SIGGRAPH and various vacations this has been delayed considerably
to:
August 22nd 2019. 3pm-4pm EDT (GMT-4).
| 2,449 | Markdown | 25.630435 | 74 | 0.766435 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2019-06-13.md | Minutes from 20th OpenVDB TSC meeting, June 13, 2019
Attendees: *Nick* A., *Dan* B., *Peter* C., *Jeff* L.
Additional Attendees: Bruce Chernia (Intel)
Regrets: *Ken* M.
Agenda:
1) Quorum
2) Chair and Secretary Selection
3) AX Update
4) Security Policy
5) Namespacing/SyncNodeVersion/GetVersion
6) OpHiding
7) Delayed Loading
8) File Format Version
9) 64-bit Metadata
10) Speed of hasActiveTiles/voxelizeActiveTiles
11) GCC and Dual ABI
12) Memory Allocators
13) Topology Replace
14) Schedule Next Meeting
1) A quorum was confirmed.
2) Secretary - Nick Avramoussis. Chair - Dan Bailey.
3) AX Update
Significant changes on the way for AX, primarily focused around future proofing
the code base and upstreaming improvements and new features in preparation for
migration into a feature branch. Currently time-line is for this to become
available at the start of July. There was some discussion on the best migration
plan. Consensus was to simply copy the codebase directly onto a feature branch
once TSC members had a chance to look at the proposed repository structure,
which will be available in the current OpenVDB AX repository. No PR is to be
required for the initial migration. Subsequent changes and feedback will then go
through full review. It is expected there won't be a complete merge into the
mainline branch of OpenVDB for Siggraph and there should be no rush with this
process.
4) Security Policy
Jeff to make a PR of the proposed security policy which all members should
accept before merge. A private email alias still needs to be created and
advertised on the website for users to report security concerns. Noted that
this is the only thing that is actually required for the CII best practices
badge.
5) Namespacing/SyncNodeVersion/GetVersion
Discussion on the best way to proceed with node versioning. SyncNodeVersion
is specific to the Houdini Verison. GetVersion is a method on the Operator class
which has been designed not to incorporate any VDB dependencies. Ideally we would
be looking for methods on the node class. It was suggested to investigate using
sparedata/metadata which should solve both current use cases (ophiding for native
naming and the new OpenVDB Scatter default behavior). We would attach version
string information via this approach which would avoid introducing new dependencies
to the base houdini utility library. Note that this version information would have
to correlate to the OpenVDB release or commit version for this to work. General
consensus was that we should feel comfortable bumping the library version with
problems like these, which are clear examples of changes in behavior. Peter
to look at updating the OP Builder workflow to support this.
6) OpHiding
Two solutions put forward are named simply as the compile side and script side
solutions. To avoid both workflows being active in a given installation, CMake
could be used to configure the OpenVDB install to only activate one or the other.
Concerns were raised that this could cause confusion even if documented well.
Peter to look at the script side solution. Dan to put in a simpler PR for the
compiled solution.
7) Delayed Loading
No major concerns with the current solution, however it would be better if the
problem was solved on a larger scale by tackling the file format rather than
the proposed temporary metadata. Note that for the proposed solution to work,
all users must adopt the metadata changes.
8) File Format Version
The file format version warning can cause confusion for users loading OpenVDB files
into different readers. If subsequent problems arise, this is generally highlighted
as the fault when it may be irrelevant. One solution would be to save out each VDB
file with the lowest possible file format version number corresponding to the
feature set required by the file. This would be extremely tricky to do with VDB
currently and it also changes the interpretation of the file format number to a file
"feature" version.
9) 64-bit Metadata
Currently metadata size is capped at the value of an unsigned 32 bit integer.
The goal suggested here is to provide the ability to write out metadata with a size
up to a 64 bit integer. The proposed solution is to limit current VDB metadata
serialization to the size of a signed 32 bit integer so that the last bit can be
used to represent metadata that exceeds signed 32 bits in the future. This is not
guaranteed to be 100% safe - old readers will either crash or produce undefined
behavior with larger metadata sizes. It was proposed that VDB should ideally
check the full size of the file prior to seeking so that overflows can be safely
caught.
Concerns were raised that the general metadata workflow in OpenVDB assumes metadata
to be relatively small and trivial to copy/read (methods such as copying OpenVDB
grids and file deserialization). 64 bit support would require some restructuring to how
these methods and others deal with that assumption, highlighting the possibility that
a new framework would be needed. It was suggested that all these changes could be
bundled into one massive file version update, which would also include all the
necessary IO hooks that have been identified.
10) Topology Replace
There are no methods to perform topology replacement given two OpenVDB trees
(specifically, no methods akin to the topologyIntersction/Difference/Union member
functions). The desired outcome given a->topologyReplace(b), would be 'a' containing
active topology that matches 'b', leaving other node values and topology hierarchy
untouched but inactive. This can be achieved through a combination of Intersection +
Union, however this can be slightly more expensive and even produce 'incorrect' value
results due to Intersection potentially deleting branches of 'a'. A more efficient
method would be to perform a deactivation of all nodes in 'a' followed by a union.
Note that an ideal solution would only have to deactivate the values not represented
in 'b'.
11) Speed of hasActiveTiles/voxelizeActiveTiles
12) GCC and Dual ABI
13) Memory Allocators
Time.
14) Schedule Next Meeting
June 20th 2019. 3pm-4pm EDT (GMT-4).
| 6,140 | Markdown | 44.488889 | 87 | 0.807818 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2020-04-16.md | Minutes from 46th OpenVDB TSC meeting, April 16th, 2020, (GMT)
Attendees: *Nick* A., *Jeff* L., *Ken* M., *Dan* B.
Additional Attendees: Johannes Meng (Intel), JT Nelson (Blender),
Peter Cheng (DW), Andre Pradhana (DW), Bruce Chernia (Intel)
Regrets: *Peter* C.
Agenda:
1) Confirm quorum
2) Secretary
3) Forum/Github Issues update
4) PR review
5) Google Summer of Code
6) Changing VDB background value in Houdini
7) Expected release date for 7.1.0?
8) OpenVDB & USD
9) Next meeting
1) Quorum was confirmed.
2) Secretary was Dan Bailey
3) Runtime Grids and Compile Times
Discussion about runtime grids and follow-on from last weeks discussion. In
general all in agreement that it would be useful and a nice new flexible
mechanism for the library. Preferred over continuing to add more compile-time
grid types. However, implementation is not trivial, including extending the file
format and figuring out a new value access mechanism.
Subsequent discussion about tackling the orthogonal, but related issue of
compile times in the library. In many cases this is down to using excessively
templated classes or functions in order to optimize inner loops, we should be
vigilant to ensure each template parameter is translating into improved runtime
performance to reduce the template bloat where possible.
There is also a general desire to reduce redundant template instantiation time
that is repeated across multiple translation units. Modules in C++17 will likely
improve our ability to address this, but that's a minimum of three or four years
away. An alternative approach is to perform compile-time registration of grid
types in the library requiring users to recompile the library itself if they
wish to add new types. General agreement to do this. Jeff cautioned that
explicit template instantiation can easily result in some messy preprocessor
code.
3) Forum/Github Issues update
One new issue concerning Python 3.8 - time.clock has been removed.
time.perf_counter can be used but is not available in Python 2.7. Will likely
need a solution that branches on Python version.
4) PR review
697 - Jeff has approved, can now be merged
692 - Dan has approved, ideally needs another reviewer to approve the code
style, Ken to review
690 - Dan to progress this soon
675 - Ken to discuss with Nick soon
671 - few minor doc updates needed then ready to merge, Nick to progress this
soon
670 - wider discussion needed about documenting package manager installation,
tabled for now
654 - mostly ready, solving a number of issues but not perfectly, Nick to break
it up into smaller PRs
652 - Dan and Nick to meet offline to discuss next steps with this PR along
with OVDB-116
651 - Dan to take this on at some point
650 - awaiting progress on 652
631 - Nick reviewed recently, Dan to finish
623/598 - Dan to progress this at some point
455 - awaiting Ken's final approval to progress this
5) Google Summer of Code
Plan is to formally ask for one slot. Dan and Nick to mentor.
6) Changing VDB background value in Houdini
No way to change the VDB background value in Houdini as the core VDB tool is not
currently exposed. Ken mentioned that at DWA they were initially reluctant to
offer this to the artists for fear it may get misused. General feeling that it
would be best to avoid a dedicated SOP if possible. One option is to add it to
the native Houdini primitive SOP, but other parameters relate to metadata so
performance cost may not be clear. All in favour of adding it to the newly
introduced VDB Activate SOP.
Nick mentioned that there will be functionality in AX to modify all inactive
values.
7) Expected release date for 7.1.0?
No rush for Houdini integration, some time before Siggraph is good.
8) OpenVDB & USD
Time. To discuss in a future meeting.
9) Next meeting
Johannes Meng has proposed that Intel will present on OpenVKL. Meeting to remain
open for all interested parties to attend, so Intel will present with that in
mind.
April 23rd 2020. 2pm-3pm EDT (GMT-4).
| 3,996 | Markdown | 36.009259 | 80 | 0.787037 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2020-01-23.md | Minutes from 39th OpenVDB TSC meeting, January 23rd, 2020, (GMT)
Attendees: *Nick* A., *Dan* B., *Jeff* L.
Additional Attendees: Bruce Chernia (Intel), John Metric (Linux Foundation)
Regrets: *Ken* M., *Peter* C.
Agenda:
1) Confirm quorum
2) Secretary
3) Google summer of code
4) Default GitHub branch
5) Devirtualization
6) Mantra
7) Siggraph
8) Next meeting
1) Quorum was confirmed.
2) Secretary was Jeff Lait
3) Google summer of code
We covered the samples in the shared document.
a) Delayed Loading. Cleaning up temporary files is already an issue. Why is there a temporary file? Is it possible to have a asynchronous copy update in the background? The recalled purpose of the temporary file is to stop the application from crashing if it changed. We currently have a transition at 500MB, which means large vdb would still crash.
Why not background this copy? Which then becomes a future?
Backgrounding would increase the scope of this project. Maybe we should have a background process to fill in the data?
b) CSG operations without rebuilding. Does it rebuild after? Header functions call renormalize. We can definitely can avoid resampling one of them. We should investigate if the SOP needs a rebuild operation.
Does this require a rebuild? The VDB Combine in particular requires it for SDF.
"How to do iterative CSG without changing the rest of your VDB"
Jeff to produce a melting VDB example to hopefully demonstrate what we
want fixed.
c) Erosion Improvements
Find out from Ken why not possible, seems like a good idea if possible.
d) Sequential Tree Methods
A good straightforward pattern for people to follow in the implementation.
e) Faster Statistics
Implementations is well known, some discussion needed for top level.
Support the sum-prototypes - build a new constant tile grid of a higher level version of the grid. This may answer the requirements of the rendering meeting.
f) Fix Filter Operations for Tiles
Straightforward, but lots of corner cases.
Likely builds on dialateActive? Match Volume Box Blur.
g) Optimizations by Intrinsics
Internal operations are key. Masked operations may work well for intrinsics.
Meta) The two tasks, Combine Faster Statistics and Sequential Tree, are both generic breadth-first parallel operations so might be combined.
Meta) Are the first issues good? TSC to look at it.
4) Default GitHub branch
Adds a layer to stage external contributions so we can restage. We can also reduce CI checks on the incoming to make it faster.
Await Ken's approval.
Should we get Admin rights? Current thread with TAC to acquire permissions. Will be at last a month. Granting admin has casued problems in the past. For us, the CI changes are the big sticking point. Git Hub actions are also locked out, which we need for more automation.
5) Devirtualization
Dan will run some stats on this to verify it makes a difference. Link time optimization off by default. Much FUD about link time optimization causing hard to find bugs, hopefully if we restrict it to the library we'll catch them in the tests. So add a link time option to test it out. Add final keyword to the map derive classes. Does adding final change ABI?
So first add ABI test, then add final keyword and see if it changes ABI.
Another option is to have a fastIndexToPos(). This is a lot of code.
Another option is explicitly devirtualizing with this->MAPTYPE::indexToPos()
6) Mantra
Mantra does not have interesting code for the bound summation, it is a boring min/max process.
7) Siggraph
Should we start thinking about a course? Or a BOF?
8) Next meeting
January 30th 2020. 2pm-3pm EST (GMT-5).
| 3,672 | Markdown | 35.73 | 365 | 0.776961 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2019-03-21.md | Minutes from 11th OpenVDB TSC meeting, Mar. 21, 2019
Attendees: *Nick* A., *Dan* B. (late), *Peter* C., *Jeff* L.
Additional Attendees: Bruce Chernia (Intel), Andrew Pearce (DWA),
Thanh Ha (LF)
Agenda:
1) Confirmation of quorum
2) Selection of secretary
3) Update on CMake
4) Reno Change
5) Documentation.
6) Warnings as Errors
7) Unifying SOP Labels (postponed)
8) JIRA is not working
9) Deprecation (added)
10) Next Meeting
1) A quorum was confirmed. Nick was selected to chair the meeting.
Ken had announced he could not attend due to pre-existing conflict,
and had approved the meeting proceeding without him.
2) Secretary - Jeff Lait
3) Update on CMake from Nick
3a) CMake
The PR is in a good place. Required more work than expected, but mostly
tidying up and testing on Mac and Linux. Not tested on Maya-Windows.
Blosc, ILM-Half, TBB, and a few others do not have CMake modules yet.
Houdini and GLFW modules done - using the CMake examples from SideFX.
There will be a PR add a custom module for numpy to avoid it requiring CMake
3.14.
Call for everyone to test the CMake on their own platforms.
3b) Circle CI and Travis
The TAC has enabled CircleCI so we can move forward with that and it should
work. Dan will help with CircleCI additions to the CMake PR so it can
be merged with very basic CI support (Houdini 17 / ABI 6). Initially
CircleCI will be turned on as an optional check and TravisCI as the
required check as we build up CircleCI support.
sesitag causes problems with .dsos not being cacheable as they keep
changing. SideFX should provide insight on a better workflow.
4) Reno Change
Proposal is to use reno to do intra-release change files. This involves
any change to the change file being stored as a separate yaml text
file, so avoid any conflicts on out-of-order resolution of PRs.
Concerns were raised about the doxygen and plain text requiring separate
verbage. One idea is to generate all the doxygen text when doing final
flattening. Another is to have two headers in the yaml, one for text
and one for doxygen.
Concerns were raised that reno is too heavyweight. Dan will provide
an example of what the contributing text will look like so we can ascertain
how heavyweight this process is.
5) Documentation.
Should published doxygen be all releases or only the current release?
ReadTheDocs may have a neat way to have multiple releases in one page;
but it may also require Sphynx and/or restructured text. Generally
acknowledged that doxygen workflow doesn't require an extra tool, but
just requires automation of existing tool.
Agreed that CI & CMake should be processed first. Then consider
documentation process improvements.
6) Warnings as Errors
PR for removing all warnings, allowing warnings to be treated as errors,
in target gcc platform is largely complete. Most are from trivial
casting conversions and escaping casts. This forces us to make
an explicit choice of where precision is gained or lost.
In some cases, like interpolation, we may have a float grid with a double
position. Should it upcast everything to double, tri-lerp, and then
down cast to float? Or downcast the position to float, then do all
the computation? First will give more precision, second possibly more
speed (but this should be verified). The current situation where we
repeatedly cast up and down is likely worst of all worlds.
Nick will cut the contentious components out of the PR so it can go
in and build a new PR that deals with the precision questions.
8) JIRA is not working
Dan is currently manually adding everyone to every ticket. Thanh
requested a helpdesk ticket is made to resolve this.
9) Deprecation
Removal of deprecated code will wait until after the CI/CMake issues are clear.
Dan will start to add deprecation warnings according to the new deprecation
policy. Code will not be removed until the next release. (Note: I'm unclear
if this means minor or major)
10) Next Meeting
Our next TSC meeting is scheduled for Thursday March 28, 2019 11am-12pm PST.
| 4,043 | Markdown | 34.78761 | 79 | 0.781845 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2019-05-09.md | Minutes from 16th OpenVDB TSC meeting, May 9, 2019
Attendees: *Ken* M., *Nick* A., *Dan* B., *Peter* C., *Jeff* L.
Additional Attendees: Bruce Chernia (Intel), John Mertic (LF)
Agenda:
1) Confirmation of quorum
2) Selection of secretary
3) 6.1 release
4) Plans for next release
5) Siggraph Course
6) CI Update
7) SOP OpHiding - OVDB-64 / PR404
8) Schedule next meeting
1) A quorum was confirmed
2) Secretary - Dan Bailey
3) 6.1 Release
Peter has completed the 6.1.0 release, Ken to announce the release on the Google
Forum.
4) Plans for next release
Next minor release scheduled for around Siggraph, ideally before but preferably
no later than August to allow SideFX time to integrate it into the next release
of Houdini. Intention for this next release to include a number of big changes -
AX from Nick, tools previously shared via Google Doc from Ken, delayed-loading
and improved VDB points advection from Dan, generic convolution and sharpening
tools from Peter. We are hoping for progress towards receiving a contribution
from Autodesk too. The following release will be a major ABI one in Q3/Q4.
There was discussion around using feature branches that live in the main
repository to allow large new contributions such as AX and Multi-Res to mature.
Proposal is to use PRs in the normal way and to continue using one approval on
every PR for the time being. No opposition to this.
5) Siggraph Course
There appears to have been a change in how Course Notes are shared at Siggraph
requiring them to have been prepared by 14th May this year, which is
significantly sooner than previous years. Jeff suggested Ken reach out to
Michael Reed as the Courses Chair for clarification. Nick and Dan to share slide
decks with Ken from previous years to help with preparing material.
6) CI Update
With integration of CMake, migration to Circle CI from Travis CI has been
completed. Two outstanding issues, a segmentation fault that appears to happen
sporadically, most commonly on the ABI=4 branch. Dan has recently merged a PR to
migrate the ABI=4 branch from TBB 4.4.0 to 4.4.6 which seems to have improved
stability. Need to wait a little longer to fully assess the impact. A build
failed in the ABI=5 build today so question about whether this may have been
related to TBB. Nick suggested perhaps it was related to memory allocators. Ken
suggested we enable asserts in release mode. The second issue is that the Circle
CI configuration is not setup correctly which manifests in an issue where the
builds are kicked off from a PR but not linked back to it rendering the PR
un-mergeable. Dan has emailed Andrew Grimberg at the Linux Foundation about
resolving the issue and is waiting to hear back. Circle checks have been
downgraded to not required for the time being.
7) SOP OpHiding - OVDB-64 / PR404
Artists are regularly confused about having duplicate VDB/OpenVDB SOPs show up
in the tab menu in Houdini when installing the open-source SOPs. Peter says at
Dreamworks, many shows use opcustomize scripts to alleviate this issue, Nick
reports that DNeg is also using opcustomize scripts.
The committee was largely split on how best to solve this problem. Dan and Jeff
have discussed one proposal and Dan has submitted as PR OVDB-64 which Jeff has
approved. Peter has concerns with this approach in that there would be two
contradictory mechanisms for hiding nodes, one using the SideFX ophide script
mechanism and one using a compiled ophide policy mechanism and would prefer to
see them unified. Jeff highlighted an example scenario where a facility may wish
to hide all of the open-source SOPs except for one which they had modified and
extended. The solution to this scenario under this proposal would require
modification of the SOP definition itself by either manipulating the existing
policy flags or adding a new flag which would need support added to all existing
SOPs. Otherwise, the facility would fall back on using an opcustomize script.
The simple alternative to this proposal is a single script that has all the
ophide commands in it to allow users to customize as they chose and then install
it. However, there are a number of key problems with this approach. It requires
users to deploy a new configuration file which adds an extra source of
unreliability in deployment. It doesn't support users installing only a subset
of the nodes without running the risk of neither SOP being visible. It requires
contributors to the project to maintain a side-car file in addition to the
existing SOPs. Nick and Peter briefly discussed auto-generating an opcustomize
file using CMake but not yet clear how that might work.
The meeting wrapped up without a clear consensus on the way forward on this
issue. Dan mentioned that Siggraph would be a nice opportunity to share a
solution with the community if possible and invited others to contribute an
alternative implementation for discussion in a future meeting. The Committee is
also looking to gather more feedback from production to better inform this
decision.
8) Next Meeting
May 23rd 2019. 3pm-4pm EDT (GMT-4).
| 5,091 | Markdown | 47.495238 | 80 | 0.801414 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2019-10-24.md | Minutes from 30th OpenVDB TSC meeting, October 24th, 2019, (GMT)
Attendees: *Nick* A., *Dan* B., *Jeff* L., *Ken* M., *Peter* C.
Additional Attendees: Bruce Chernia (Intel), John Mertic (LF)
Agenda:
1) Confirm quorum
2) Secretary
3) EasyCLA
4) Dropping Support ABI 2/3 (PR534)
5) New Methods for Const Copying Grids (OVDB-54/PR535)
6) OpFactory Deconstructor (OVDB-102/PR531)
7) Tree vs Tool Methods (OVDB-121/PR539/PR536)
8) Next Meeting
1) Quorum was confirmed.
2) Secretary was Dan Bailey
3) EasyCLA
EasyCLA has been working for Ken and Nick using ICLA and for Dan using CCLA.
Jeff having issues with CCLA, John to follow up on helping track down the issue
Jeff is facing. Peter signed up to CCLA but hasn't submitted a PR since it was
switched on. Goal is to get this working for all TSC members before requesting
external contributors to use it. Autodesk have used EasyCLA for OpenColorIO, so
be smooth for them.
Confusion over which email is important, the one attached to GitHub account, the
one in the commit or the one in the DCO sign-off. From a legal standpoint, John
confirms that the DCO one most important, but not clear which one EasyCLA is
actually relying on.
No problem merging TSC PRs with failed EasyCLA checks as we have all signed
paper CLA.
4) Dropping Support ABI 2/3 (PR534)
Unanimous consent, Dan to merge.
5) New Methods for Const Copying Grids (OVDB-54/PR535)
Peter and Dan discussing method names on PR, but currently unresolved. Request
for others to contribute.
6) OpFactory Deconstructor (OVDB-102/PR531)
Nick votes that this change should go in, Dan to merge once approved.
7) Counting and Tree vs Tool Methods (OVDB-121/PR539/PR536)
Ken submitted PR536 for a new nodeCount() method implemented on Tree, Dan
submitted draft PR539 for nodeCount() and activeVoxelCount() implemented as
tools. Dan's nodeCount() implementation marginally faster than Ken's due to
threading but also more complicated, activeVoxelCount() significantly faster
than current implementation due to threading. Ken would prefer counting methods
to live on tree as convenient. TreeBase print method also needs counting
functionality so there's a snowball effect.
General question as to which methods should live on tree and which in tools. Dan
proposed line should be between functionality that benefits from threading, ie
navigates more than just one path through the tree. Some cases like merging and
topology methods would clearly benefit in terms of performance if extracted.
Counting functionality is closer to the line.
Ken's priorities are that the methods should be intuitive, performant and not
require exposing private tree data. Potential cost of asking people to change
their code a consideration too.
Dan feels that the breadth-first merge is fairly representative and noted that
it required just one private member access in RootNode. Dan to look into the
details again and to consider how this could be provided in a safe way.
Jeff proposed making TreeBase methods non-virtual and using dispatch. One option
is to introduce TreeBase::apply() to perform dispatch of a compile-time list of
grid types. Peter and Ken against limiting core functionality like counting to
only be available for known grid types. Jeff and Nick suggested mechanism to
register types at compile time. Peter proposed introducing a counting visitor
pattern.
NodeManager leaf node pointer caching was a performance bottleneck in
activeVoxelCount(), Ken highlighted that the NodeManager could be optionally
cached only up to a certain level, Dan to look into this.
Time. No clear direction yet, discussion to continue.
8) Next Meeting
Next planned meeting is:
October 31st 2019. 3pm-4pm EDT (GMT-4). Costumes encouraged.
| 3,738 | Markdown | 38.776595 | 80 | 0.79374 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2020-09-22.md | Minutes from 64th OpenVDB TSC meeting, Sep 22nd, 2020, (EDT)
Attendees: *Nick* A., *Jeff* L., *Ken* M., *Dan* B.
Additional Attendees: Johannes Meng (Intel), JT Nelson (Blender),
Andre Pradhana (DW), Bruce Cherniak (Intel)
Regrets: *Peter* C.
Agenda:
1) Confirm quorum
2) Secretary
3) Forum
4) NanoVDB
5) PRs Outstanding
6) Checksums
7) Next Meeting
1) Quorum was confirmed.
2) Secretary was Jeff Lait
3) Forum
Ken still to reply to the out of core question. The answer to the question is straightforward, but what would we like in the future?
4) NanoVDB
NanoVDB also has interest in delayed loading.
Jeff does not want NanoVDB to be more complicated than it has to be.
There are some additional changes still coming to support DirectX.
An improved C-port also exists.
5) PRs Outstanding
What is the process for external PR. Does the second Reviewer merge or the first? Or someone else does? We will continue to work ad-hoc.
Feature branches, however, must be merged by the owner of the feature branch.
Likewise, if a PR is for a particular person's domain, that person will be left with the merge.
a) PR 829, sync names. To be merged
b) PR 823, make delayed loading/iostreams optional.
This disables delayed loading. This does change the File::Impl, but this should be name-spaced and internal, so not cause actual ABI changes.
Should we have ENABLE or DISABLE? First we should have config flags in the source file only where possible. Flag names depending on cmake defaults is scary. Our Find Module is not yet powerful enough yet. So we want to keep Find Module as simple as possible.
If we tried to move the delayed loading to the C file we'd lose the ability to remove the mutex.
Configuration of the build system is USE_FOO. These Cmake variables then drive -D variables. These vary currently. Should half and delayed loading be off by default? Apparently our models on the web are all half...
Ideally the default is no dependency.
The define will be DISABLE for delayed loading.
C) PR 819. Remove half.
Should we just bring in a Half.C/Half.h rather than removing Half.h?
In future version of OpenEXR it will be its own header we can include.
What should we do with missing dependencies? A runtime check is required because we don't know the source of the grid, it can come from another library that has support. We will go for runtime errors, not compile time or linker error.
D) PR 818, all of AX
This has AX based CI. It has to install multiple versons of LLVM, which eventually evicts the Houdini caches. But as LLVM isn't EULA based, we should be able to pre-populate the containers with them.
We should read over this prior to the next TSC, especially any questions inside.
6) Checksums
Ken is researching CRC-variants, some are parallel, so fast. Three modes have been added. No checksum. Checksum for the metadata only. Full checksum. Separate CRC are for grid, tree, root, and else.
One use is debugging, quickly verifying things are identical.
Validation tool for NanoVDB to verify no pointers go out of scope. The security member approves.
7) Next Meeting
Focus on AX.
Tuesday September 29th 2020, 1-2pm EDT (GMT-4)
| 3,201 | Markdown | 34.577777 | 262 | 0.762887 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2018-12-13.md | Minutes from 4th OpenVDB TSC meeting, Dec. 13, 2018
Attendees: Nick A., Ken M., Jeff L., Dan B., John M.
A quorum was confirmed.
Secretary - Dan Bailey.
3) Decision on coding guidelines. Ken initially suggested a policy of at least one code owner should
approve every commit, Jeff raised that a best practice would be better so that simple reformatting
commits wouldn't require approval and that a commit that touched lots of areas of code wouldn't then
require every TSC member to approve. It was agreed that this was a better approach. In lieu of
demoting this from being a policy, a cooling-off period was suggested as a best practice to allow
time for feedback to be gathered, particularly from code owners. 72 hours was proposed as the
recommended time to wait. With these additional changes, the TSC members present unanimously agreed
on merging the proposed code review guidelines.
4) Decision on questions for Autodesk. Ken will send out a final email with questions shortly. The
hope is that after the initial information gathering, that this can turn into a back-and-forth
discussion to find out the best way to proceed here.
5) Update on merge permission for TSC members. All TSC members now have write access except Nick.
Dan to loop Nick into the Linux help desk ticket to follow up. In addition to write access, this now
opens up the ability to add requested reviewers and to approve pull requests. However it is
understood the Linux Foundation (ie Thanh) are the only ones with Admin permissions, so the TSC
members will need to communicate with them for adjusting repository settings (such as enforcing the
code review policies).
6) Latest update on plan for version 6.0.0. The ABI 6 pull request has already been merged in by
Peter in preparation for a release. All present agreed on moving forward with doing a soft release
for 6.0.0 to be compliant with the VFX Reference Platform for next year and then to follow up with
an announcement in January, once Peter has had a chance to update the website. This will include a
couple of outstanding pull requests such as the H17 fixes from Nick and a change to minor change
remove a test function suggested by Ken. The process for doing the release is to update the list of
changes and to send round to all TSC members to review before tagging the release. Once the release
has been tagged, a subsequent update will then mark the codebase in development once again and to
bump the version to 6.1.0 which is planned to be a big release with many more updates to come! A
follow-on discussion to be had about software dependency deprecations.
7) Misc. OpenVDB won a Luminaire Tech award from the Advanced Imaging Society! John joined the call
towards the end and brought up the recent discussions held by the TAC about licensing for DCC
dependencies. Jeff clarified that SideFX's recommendation is to use a Houdini Apprentice license and
highlighted that there is a Linux standard license exception that approves including code from a
third-party in released binaries and headers.
8) Our next TSC meeting is scheduled for Thursday Jan 3, 2018 2pm-3pm.
| 3,121 | Markdown | 65.425531 | 100 | 0.801025 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2020-07-14.md | Minutes from 56th OpenVDB TSC meeting, July 14th, 2020, (GMT)
Attendees: *Nick* A., *Jeff* L., *Ken* M., *Dan* B.
Additional Attendees: Johannes Meng (Intel), JT Nelson (Blender),
Peter Cheng (DW), Andre Pradhana (DW)
Regrets: *Peter* C.
Agenda:
1) Confirm quorum
2) Secretary
3) Forum Issues
4) Siggraph
5) Fast Sweeping
6) Morphology Improvements
7) Next meeting
1) Quorum was confirmed.
2) Secretary was Dan Bailey
3) Forum Issues
User running into issues with Centos8 compilation, should have been fixed in
later release of OpenVDB. Nick to suggest using CMake >= 3.12 to resolve
subsequent Python3 issue.
There is an unrelated issue that Ken and Nick have run into attempting to use
Mac OSX Catalina and a later Clang compiler(?) which manifests as a deprecation
warning about a random number generator. Currently, our CI only tests one
configuration on Mac which doesn't expose this error. More investigation needed.
4) Siggraph
Have to decide between a 25 minute and 55 minute session. Our preference is for
the free user event instead of the official Siggraph birds of a feather event
which requires a paid registration.
Discussion about what the target audience is for such an event. Decision to opt
for 55 minute session split into two - the first half an introductory overview
of the library for new users and how to start contributing, the second half a
more advanced session. Ken feels the most useful for us is the discussion with
the community so would rather dedicate the advanced session entirely to this.
Jeff mentioned that we should at least present a quick overview of new and
upcoming features first. Dan likely not able to present due to being on an
unreliable internet connection for this session.
Question about how well the ASWF format will lend itself to a group discussion
rather than being geared towards presentations from the TSC. Ken to reach out to
ASWF to ask about what we can do here to improve our ability to hear from the
community. Dan mentioned that David Morin frequently uses a poll to allow the
audience to pose questions and upvote on other questions asked by the audience,
this could be a good way to direct the discussion towards the areas of most
interest.
Need to put together title slides.
5) Fast Sweeping
What to do when the algorithm fails. Jeff highlighted a number of cases where
not having a zero crossing for a level set should be acceptable. One such
example is disconnected level set regions arising from a fluid simulation. The
algorithm shouldn't generate an exception in this case because it's not an
exceptional case. Ken to revisit this.
Andre still awaiting DWA approval for the Extrapolate SOP, hoping to push up a
PR soon.
Dan and Ken to discuss voxel slicing optimization offline.
6) Morphology Improvements
Currently, a topology union gives different results dependent on whether the
serial or parallel algorithm is used. Nick submitted PR751 to add a
preserveActiveTiles flag to Tree::topologyUnion() to avoid always densifying
active tiles. No objections to doing this. It is acceptable to treat this as a
bug and to change the existing behavior, especially as the documentation does
not mention tile behavior.
Nick also has improvements to dilation and erosion in PR754. Aim is to deprecate
the existing dilateVoxels and erodeVoxel methods with new functions that provide
a more uniform interface and support matching functionality. Adds support for
edge/vertex erosion based on inverse dilation. Significant performance
improvements to large dilations. Note that the result of the threaded dilation
differs due to the behaviour of topologyUnion (as discussed above). This PR also
fixes a bug where tools::erodeVoxels() always calls pruneLevelSet() regardless
of whether the input is a level set.
7) Next meeting
July 21st, 2020. 1pm-2pm EDT (GMT-4).
| 3,847 | Markdown | 39.505263 | 80 | 0.799064 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2020-06-18.md | Minutes from 52nd OpenVDB TSC meeting, June 18th, 2020, (GMT)
Attendees: *Nick* A., *Jeff* L., *Ken* M., *Dan* B.
Additional Attendees: JT Nelson (Blender), Brecht Van Lommel,
Larry Gritz, Andre Pradhana (DW), Bruce Chernia (Intel).
Regrets: *Peter* C.
Agenda:
1) Confirm quorum
2) Secretary
3) JE Malloc Issues
4) Boost
5) AX
6) Fast Sweeping
7) Next meeting
1) Quorum was confirmed.
2) Secretary was Jeff Lait
3) JE Malloc Issues
JE Malloc 5 has an issue that loading dynamically can fail. Latest Ubuntu has
an issue with this. Generating hard to trace memory problems from an
application that brings in OpenVDB, and OpenVDB's default build links in
jemalloc. So should jemalloc be included in openvdb at all? This should be
the top level application. So we should change the default to None. The
concern is that people will not know to use jemalloc, so end up with slow
performance. Maybe a way to check? Print out if it is missing with an env
variable? Having OpenVDB override the allocator makes it hard to even test
different allocators.
We can make a CMake target that also includes jemalloc.
The VDB applications should be using jemalloc. Unanimous consent on setting
the default to None.
4) Boost
Most of the easy boost dependencies are removed. So the hard ones are for the
rest of the TSC to fix.
Interprocess Module: Tricky
UUID: Ken believes this should be replaced with a hash, as it is just to find quickly same grids. Current UUID approach is too conservative so doesn't help find identical grids. The concern is that computing the hash would be significant. However we have to traverse the grid anyways to save; so a hash may just be CPU cost. Can be used for delayed loading.
Conversion Traits: To select numeric types of higher precision. Used primarily for selecting container sizes. Boost can handle nested container types. This is likely solveable.
PRs exist for replacing MPL. boost::string replacments. And replace boost::any with the existing MetaMap.
Most PRs have merit, but string is a re-invention problem.
We need to decide if we are trying to avoid future boost, and being willing to do extra work to get rid of existing boost requirements.
Motion: We will not introduce more boost
- unanimous
Motion: We will remove boost, possibly rewriting code, or making it optional. But not by adding more dependencies.
- unanimous
Dan will look at Half being optional and inteprocess optional.
Nick will look at conversion types/traits.
5) AX
New feature branch. Will address Dan's feedback. Question is if we should switch to a submodule implementation. Lot of changes are being pushed up. Be hard to keep syncing to the feature branch.
We are not sure of legality of submodules.
Instead try to get the feature_ax branch sent in, then replace the working branch at DNeg with a new version forked from the ASWF.
Still on target for Siggraph.
6) Fast Sweeping
New Draft PR for evaluation. Need feedback on the API.
No significant changes from a week ago.
Still wish for more performance. Sorting is a bottleneck.
7) Next Meeting
June 25th, 2020. 2pm-3pm EDT (GMT-4).
| 3,148 | Markdown | 34.784091 | 361 | 0.772236 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2020-08-11.md | Minutes from 60th OpenVDB TSC meeting, Aug 11th, 2020, (EDT)
Attendees: *Nick* A., *Jeff* L., *Ken* M., *Dan* B.
Additional Attendees: JT Nelson (Blender), Andre Pradhana (DW)
Regrets: *Peter* C.
Agenda:
1) Confirm quorum
2) Secretary
3) Forum
4) Fast Sweeping
5) 7.1 Release
6) NanoVDB
7) Next Meeting
1) Quorum was confirmed.
2) Secretary was Dan Bailey
3) Forum
Request to remove v3.3.0 branch, Dan has done this. Request to improve
benchmarks, this would be good to do. Request to move INVALID_IDX definition to
header, it is believed that this is indicative of a deeper linking issue rather
than an issue in itself, Nick to reply to question.
4) Fast Sweeping
Nick advocating removing testing logic from the PR. Ken to leave in until this
feature has matured slightly, then tidy up. Brief discussion about unit testing
in general as it is solving many purposes. Would be worth separating out
benchmarks, regression tests, sample code and debugging data from unit tests.
In case of no zero crossing in all or part of a grid, Jeff wants the same
topology but different values. Never useful to know if sweep did something or
not. Algorithm should return original grid not an empty grid. Ken agreed and
will revisit this.
Andre asked about what should happen at the SOP level if a vector field is
passed in to be used for zero crossing. Should produce an error in this case.
Fast sweeping SOP can either handle pairs of grids containing one SDF and one
extension field or one SDF with multiple extension fields. Not clear what to do
here. Best option seems to be to produce a warning if more than one SDF is
passed in.
5) 7.1 Release
Dan to do 7.1 release as Ken and Nick are preparing for Open Source Day. Last
two PRs are 746 (fast sweeping) and 775 (openexr 2.5 fix). Nick to merge 775,
Ken / Dan to look at DCO issue and then once merged, 7.1 can be released.
Decision to hold off on merging other PRs until after 7.1. Next time, a separate
release branch would be preferable here.
6) NanoVDB
Question about how to deploy. Two options were considered 1) adding NanoVDB into
the existing OpenVDB repository as a "feature branch" or 2) initially releasing
NanoVDB as a separate repository and then integrate it into openvdb later. All
voted in favour of option 1.
7) Next Meeting
August 18th, 2020. 1pm-2pm EDT (GMT-4). Open Source presentation will be August
20th. 1pm-2pm EDT (GMT-4). Dan unable to attend next meeting.
| 2,447 | Markdown | 33.478873 | 80 | 0.770331 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2019-10-10.md | Minutes from 29th OpenVDB TSC meeting, October 10th, 2019, (GMT)
Attendees: *Nick* A., *Dan* B., *Jeff* L., *Ken* M.
Additional: John Metric, Daniel Elliot.
Regrets: *Peter* C.
Agenda:
1) Confirm quorum
2) Select TSC member to take minutes
1) Quorum was confirmed.
2) Secretary was Jeff Lait
3) 18.0 Update
18.0 has updated to the core 6.2.0 library with the patch. It should, however, be updated to 6.2.1 to minimize confusion about versions. Node changes still have not been merged.
4) C++14
C++14 doesn't currently compile in 7.0, but it should. Dan has a PR active to fix this.
5) Interpolator Proposal
This is still outstanding. Ken is planning submitting Jira tickets about the proposal. This includes a few different things: curvature, fast sweeping, node count, etc.
It was pointed out that any new Jira ticket requires explictly adding all of the TSC as watchers.
6) ABI=7 and 7.0 Release
We want to maximize our ABI changes in this window. 7.0 will close off in the early December timeframe at the latest.
Do we want an extra 64-bit word in the leaf node? This can be useful for building references to external caches without hashmaps. But a 32-bit integer may also suffice, and might fit in existing padding rules of the coordinates. Likewise, there may be enough that we can trim away. For example, we store separate offsets for the Value Mask and Value Offsets for a disk file, but these are now contiguous. Indeed, we might be able to union those with the blind data as live algorithsm shouldn't need them.
We have a ticket with the ABI7 label to track the various stuff we couldn't do over the year due to ABI. Dan will send a link of all 4. Some are easy, but one of note is that you can't do a shallow copy of a tree and update the meta data or transform without doing a const cast.
Attribute Array seems to produce lots of warnings in ABI 7. This is under latest OSX clang.
7) CLA Easy Engaged
This has been turned on so we can beging to find out how things work.
8) Windows CI
There is a PR to enable python tests, but Windows is not building the python plugin. It is suggested the python module should be optional by default, like the Houdini and Maya support. Consensus was to disable by default so people can get a build, then add python.
9) CMake
Will look into improvements on default paths.
10) Mesh to Volume non determinism
Nick wishes someone other than himself to verify this does fail, so he can rule out hardware or some strange configuration issue on his end.
It appears to be isolated to the prim id tree. Next stage may be to remove thread local storage in case it is TBB non-re-entrancy. Valgrind or Address Sanitizer in Clang might be useful.
11) Next Meeting
Next planned meeting:
October 17th 2019. 3pm-4pm EDT (GMT-4).
| 2,808 | Markdown | 43.587301 | 510 | 0.763177 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2020-09-29.md | Minutes from 64th OpenVDB TSC meeting, Sep 29th, 2020, (EDT)
Attendees: *Nick* A., *Jeff* L., *Ken* M., *Dan* B.
Additional Attendees: Johannes Meng (Intel), JT Nelson (Blender),
Andre Pradhana (DW), Robin Rowe (Cinepaint)
Regrets: *Peter* C.
Agenda:
1) Confirm quorum
2) Secretary
3) Forum
4) PR 818 AX Review
5) Simd
6) Next Meeting
1) Quorum was confirmed.
2) Secretary was Nick Avramoussis
3) Forum
Still need to reply to some forum posts, Dan to take a look. A few issues w.r.t
VDB 7.x dependent software not building as users are not realizing C++14 is now
required. Dan to put in a compile time check in Platform.h to explicitly fail
if C++14 is not enabled.
4) PR 818 AX Review
Most of this meeting was spent reviewing the comments made on PR 818. Replies
are copied here for convenience.
AX CI
Currently the AX CI builds LLVM from source and caches it on the available
github actions cache. Dan has initiated conversations with the LF to see if they
can provide docker containers for different LLVM versions.
Precision of integers and strict type binding
https://github.com/AcademySoftwareFoundation/openvdb/pull/818#discussion_r496308313
AX currently support short, int and long signed integer values which are aliased
to 16, 32 and 64 bit respectively. This is primarily required due to the way AX
strictly binds to grids/attributes of the same type (i.e short@myattrib). Agreed
that, realistically, 32 or 64 bits should be exposed. There are some performance
considerations making everything 64 bit on some architectures. Best solution was
to first allow @ to bind to the same type category, remove short, rename int and
long to int32 and int64 and alias int to either int32 or int64 at compile time.
Same comments were made w.r.t float and double, however GPU support will
definitely need float and the lack of float for CPU code will make it impossible
to produce deterministic results.
$ syntax in Houdini
https://github.com/AcademySoftwareFoundation/openvdb/pull/818#discussion_r496311518
The AX Houdini SOP supports some vex functions like ch/chramp etc. It evaluates
the raw string to avoid $ expanding at the cost of no backtick support (though
this can be added). Ultimately the presence of ch means that this isn't an issue.
Attrib dependencies
https://github.com/AcademySoftwareFoundation/openvdb/pull/818#discussion_r496312075
No evaluation is performed on code values, so dead/unreachable code paths still
contribute to attribute/grid creation and dependencies.
C vs python style modulo
https://github.com/AcademySoftwareFoundation/openvdb/pull/818#discussion_r496312423
Currently uses LLVM's default IR builder modulo instruction which will be C
style remainder op. Agreed to instead switch to python style "true" modulo op.
Line directives, pre-processing and runtime errors
https://github.com/AcademySoftwareFoundation/openvdb/pull/818#discussion_r496315058
Currently no # directive support. Agreed adding it would be good. Catching
exceptions is not an ideal way to control top level behavior. Agreed that
custom logging would be better. This actually already exists but needs to be
upstreamed. This was going to be done as a subsequent PR but may as well be
bundled into this now.
lerp()
https://github.com/AcademySoftwareFoundation/openvdb/pull/818#discussion_r496317012
fit()
https://github.com/AcademySoftwareFoundation/openvdb/pull/818#discussion_r496318424
Agreed to investigate better formulation of lerp() and fit()
signbit()
https://github.com/AcademySoftwareFoundation/openvdb/pull/818#discussion_r496319359
Agreed to change to sign()
Function signature type support
https://github.com/AcademySoftwareFoundation/openvdb/pull/818#discussion_r496317548
Depending on the int precision work, this work will be simplified. Signatures
should really exist for all types unless it really doesn't make sense for some
specifically. Agreed to add a maxComponent style method for vector elements.
Determinant checking of polardecomp
https://github.com/AcademySoftwareFoundation/openvdb/pull/818#discussion_r496319863
Need to check the behavior of openvdbs polardecomposition function if the
calculated det is negative and document this.
AX namespace, API/ABI
https://github.com/AcademySoftwareFoundation/openvdb/pull/818#discussion_r496322339
https://github.com/AcademySoftwareFoundation/openvdb/pull/818#discussion_r496449902
Agree on the two options stated - either AX should use its own versioned namespace
or be locked to VDBs. This includes lib versioning too. Preference is to lock to
VDBs namespace. Will peruse this and see if any issues arise.
VDB changes
https://github.com/AcademySoftwareFoundation/openvdb/pull/818#discussion_r496433146
Although minor, agreed to split out VDB specific changes to a different PR.
Deprecated methods and odd implementations
https://github.com/AcademySoftwareFoundation/openvdb/pull/818#discussion_r496434030
https://github.com/AcademySoftwareFoundation/openvdb/pull/818#discussion_r496441704
For backwards compatibility and internal reasons, some design decisions were
made which now look odd in the open source version of AX. These still need to
exist in the standalone repo but can be removed and re-worked for the merge into
VDB. Agreed to action these.
Executable terminology
https://github.com/AcademySoftwareFoundation/openvdb/pull/818#discussion_r496439529
Agreeded to rename to Binary and see what it looks like.
Executable member interface and usage
https://github.com/AcademySoftwareFoundation/openvdb/pull/818#discussion_r496444627
https://github.com/AcademySoftwareFoundation/openvdb/pull/818#discussion_r496443272
In the current design, the executables store all settings on a sub struct unique
ptr. This produces a clean API with separation of the trivial execute calls
from the member settings. However it means that they must be copied to make
modifications if the exe is const (though this copying is cheap) and requires
explicit copy constructors/assignment operators. Another option would be to have
users provide these settings on each call to execute. This better ties in some
settings to the grid data being executed, produces a trivially copyable object
and means the executable can be const. Nick, will play around with these ideas.
Combination of Compiler to Executable
https://github.com/AcademySoftwareFoundation/openvdb/pull/818#discussion_r496446789
The templated compile methods exist for internal reasons and can be removed. It
may be better to introduce static creators on the executables which take a compiler
vs the friend implementation. No clear advantage currently, but agreeded that
the workflow between the code generators, compiler and exes could use some
attention.
ax::run() with multiple grids/attribute bindings
Agreed that this particular signature could use some more explicit behavior.
Agreed to error if points and volumes are provided. Custom way to bind attributes
to grids should exist that don't rely on the grid name (i.e. what if the grid is
const).
Below are the main action points which block the initial merge:
- Integer precision changes
- Modulo implementation
- Deprecated code removal
- lerp(), fit(), signbit() changes
- AX Versioning changes
5) Simd
Ken, working on some more intrinsic functionality for VDB. Nick, has code he'd
like to upstream which uses SIMD wrappers. TSC is open to including external
SIMD intrinsic wrapper software in VDB.
6) Next Meeting
Skipping next week.
Next meeting is October 13th, 2020. 1pm-2pm EDT (GMT-4).
| 7,526 | Markdown | 40.816666 | 83 | 0.809062 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2020-05-28.md | Minutes from 51st OpenVDB TSC meeting, May 28st, 2020, (EDT)
Attendees: *Nick* A., *Jeff* L., *Ken* M., *Dan* B.
Additional Attendees:
JT Nelson (Blender), Bruce Chernia (Intel), Andre Pradhana (DWA),
Peter Cheng (DWA), Robin Rowe (Cinepaint), Johannes Meng (Intel),
Ibrahim Sani (DWA)
Regrets: *Peter* C.
Agenda:
1) Confirm quorum
2) Secretary
3) Forum
4) PR Review
5) houdini_utils
6) Paraview
7) Next Meeting
1) Quorum was confirmed.
2) Secretary was Dan Bailey
3) Forum
Ken replied to a recent post about AMR.
4) PR Review
* PR 719 - Dan gave an overview of the caching workflow and the motivation. All
agreed with the strategy of running the scheduled cache job until it is
successful then switching on the reading of the caches in a subsequent PR. To
be merged this week.
* PR 720 - ABI=4 support removed with this PR. Should really deprecate ABI=5 in
preparation for removal next year. However, many studios still using ABI=5,
particularly for Houdini 17.5 so marking this deprecated will likely encourage
users to add the OPENVDB_USE_DEPRECATED_ABI flag to their builds. Not
remembering to remove this flag risks users not being made aware of future
deprecations if they aren't closely monitoring compiler warnings. Decision is
to change the compiler flag to OPENVDB_USE_DEPRECATED_ABI_5 so that the next
ABI flag will need to be explicitly added to turn compiler errors into
warnings as a result of using a deprecated ABI.
* PR 722 - This needs to be merged before AX can be introduced to VDB.
* PR 723 - Instantiating matrix grid types needs to work. Introducing a
cwiseCmp() method to the value type reduces chance of comparing matrix /
vectors incorrectly, but requires all types to have it (PointIndex, etc). This
is needed by the prune Grid method which should ultimately be deprecated in
favour of the prune tool. Ideal implementation would be a prune method that
takes a custom functor. The tuple type which vec types are derived from have
the less than operator, so matrix types should do too.
5) houdini_utils
Brief outline of the proposed plan here and potential impact on DWA of
deprecating this. Discussion to continue through email.
6) Paraview
Paraview are introducing VDB support. MPI distribution is one of the key
features.
7) Next Meeting
May 28st 2020. 2pm-3pm EDT (GMT-4).
| 2,324 | Markdown | 31.291666 | 79 | 0.774096 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2019-09-12.md | Minutes from 27th OpenVDB TSC meeting, September 12th, 2019, (GMT)
Attendees: *Nick* A., *Dan* B., *Jeff* L., *Ken* M., *Peter* C.
Additional Attendees: Bruce Chernia (Intel), Dan Elliott (Weta)
Agenda:
1) Quorum
2) Secretary
3) Latest on our release plans, specifically v6.2
4) Changes to unit-tests (Ken)
4b) Staggered Interpolation
5) SPDX Update
6) CLA Update
7) OP_Operator::getVersion format (PR502)
8) OpenVKL
9) Renderman and H18
10) Anisotropic Surfacing
11) Next Meeting
1) Quorum was confirmed.
2) Secretary was Dan Bailey
3) Latest on our release plans, specifically v6.2
Jeff would like a 6.2.0 release within the next ten days so it can be integrated
into Houdini 18.0 before the upcoming release. Peter has agreed to do this
release, but would like us to move to a model where others on the TSC can also
do releases. Primary barrier is improving the way Doxygen gets released as
currently this is a manual, offline process and would be better if automated.
Dan mentioned that there are a number of other admin tasks that are still
outstanding of which this is one.
Outstanding items to complete before we release:
* PR502 - Dan to finish, see discussion in (7).
* PR504 - Nick to do more testing, affects Windows builds, may not make the cut
for 6.2.
* PR506 - Nick to merge.
* CMake Deprecation Warnings - Nick to add a few deprecation warnings to CMake.
4) Changes to unit-tests (Ken)
Ken would like to see us move to Google Test over CppUnit. More modern C++ unit
testing framework actively developed by Google. Various useful features such as
parallel testing, running a test until failure, less finicky over type
mismatches, etc. Peter concerned about adding a new dependency, Nick suggested
Boost Test as an alternative. Some discussion about our policy regarding Boost,
general feeling that we have been trying to migrate towards using standard
library as functionality becomes available but no plan to try and accelerate
this. It is deemed more important to reduce the use of Boost in the core library
than the unit tests. It was also suggested that we should look at other
open-source projects and which unit test framework they use.
All agreed that we would benefit from the increased feature set provided in
Google Test, but less certainty about whether the migration would be worth the
effort. Ken to share an example as a test case of how complicated the migration
might be.
Dan to share a link to the SonarCloud code coverage so that all can get an
understanding of areas of the codebase that might be lacking in coverage.
4b) Staggered Interpolation
Ken mentioned that in writing a simple fluid solver, he ran into issues with
efficiency of interpolation of staggered grids, Nick concurred. It is currently
redundantly interpolating in axes that are not used and there is no stencil
caching as recently discussed in regards to sharpening. Ken to look at
contributing an improvement here.
5) SPDX Update
John Mertic not on the call, Dan to reach out to find out if there has been any
progress here.
Update: John Mertic and Steve Winslow had a conference call with Andrew Pearce.
Dreamworks have some concerns on the impact of removing the language from the
license moving to the SPDX license. John and Steve are exploring options to
resolve the non-standard license language while at the same time address
Dreamworks' concerns.
6) CLA Update
Ken, Jeff and Dan have not completed the digital CLAs. This is holding up our
ability to accept external contributions. Dan is still awaiting Lucasfilm/Disney
legal to proceed. Ken and Jeff to follow up on their end. Ken to look at signing
the individual CLA.
7) OP_Operator::getVersion format (PR502)
Peter has suggested both Houdini and VDB versions to be included in the version
string for possible future use and no objections to this. Question over whether
there is a benefit to align with existing version mechanism as
OP_Operator::getVersion is a public function. Jeff said that lots of hip file
nodes such as HDAs use custom strings which cannot be parsed so no real value in
attempting to do so. Jeff proposed "vdb6.1.0 houdini18.0.222" as the format. All
in agreement. Dan to make that change in time for inclusion in a 6.2.0 release.
8) OpenVKL
Bruce to discuss with Greg about the possibility of the TSC receiving an OpenVKL
update from Intel around October. Intel's plan is to incorporate VDB in Q4,
OpenVKL not intended to replace OpenVDB.
9) Renderman and H18
Dan mentioned a discussion being had offline with the Renderman group. Hope that
the developers will be able to join us in a future call to discuss and may even
be able to contribute to the project in the future.
10) Anisotropic Surfacing
Nick looking at open-sourcing this tool. Jeff not certain of the exact
implementation but confirmed that the Particle Fluid Surface SOP is the primary
tool for surfacing particles provided by Houdini.
11) Next Meeting
Next planned meeting is:
September 26th 2019. 3pm-4pm EDT (GMT-4). Option to hold one on September 19th,
depending on the status of the 6.2.0 release.
| 5,086 | Markdown | 39.696 | 80 | 0.790405 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2020-11-17.md | Minutes from 71st OpenVDB TSC meeting, Nov 17th, 2020, (EDT)
Attendees: *Nick* A., *Jeff* L., *Ken* M., *Dan* B.
Additional Attendees: Johannes Meng (Intel), JT Nelson (Blender),
Andre Pradhana (DW), Bruce Cherniak (Intel)
Regrets: *Peter* C.
Agenda:
1) Confirm quorum
2) Secretary
3) GitHub Issues
4) OpenVDB AX
5) PR #754 - Morphology
6) SOP Extrapolate
7) Corner vs Center Sampled
8) Google Test
9) Does the Meeting Survive Host Leaving?
10) Next Meeting
1) Quorum was confirmed.
2) Secretary was Jeff Lait
3) GitHub Issues
Initialize is on Dan's agenda. No one has looked into CMake issue yet.
4) OpenVDB AX
After merge deprecated code will be removed. Along with any additional feedback for 7.2. Unless Ken blocks, it can be committed tomorrow. Nick will make Jira tickets for the items that we wish to get to later.
5) PR #754 - Morphology
PR is for speeding up dilation, cleaning up the file and adding new methods for nearest neighbour algoirthms, and add the tile policies.
dilateVoxels now calls through to the new morphology class. They produce the same result, so un-updated code will work as expected. Free functions activate/deactivate have been moved to Activation.h to separate them out.
New erodeActiveValues supports neighbour rules as well as tile policies. dileate/erodeActiveLeafValues only runs over leaf nodes and is invoked by the higher level once the tiles are set.
PRESERVE_TILES followed by density is the same result as EXPAND_TILES, but PRESERVE_TILES has optimizations.
topologyUnion traditionally will always fully voxelize active tiles where there is overlap. The new preserveTiles will avoid this and leave active tiles active.
Grain size is not clear for this algorithm, which is why only a threaded flag is exposed.
There is now a choice to steal the node or collapse the tile into a constant tile that greatly speeds up the dilation of large trees.
To support the other choices for erosion, we dilate by one, subtract to get the wave front, then dilate this wave front the desired iterations. Subtracting this from the original gives us the erosion. Erode by face will use the old implemenation, other choices will use this new implementation that is slower, but not too much slower.
Methods that call this from Houdini have not been changed. We suggest we can change this now as it is a bug fix.
Excellent comments in the code.
How important is it to keep the broken paths around? We keep complicating the API to support broken behaviour. Should we have more documentation to solve this? It is important to know about PRESERVE vs IGNORE tiles as you need to be aware of tiles when working with grids. But doesn't dilate always activate, and the addition of new tiles is just chance?
Do we introduce a new method, dilate, that has the proper behaviour, and deprecate the old one? Maybe an API compatibility flag to adjust the defaults? We don't have a clear answer how to solve this, in this particular case it isn't relevant as the only one we'd want to change would be topologyUnion, that should be removed in any case.
6) SOP Extrapolate
PR has been updated, needs Jeff to look at it.
7) Corner vs Center Sampled
The PDF has been posted internally and is approved.
8) Google Test
We had already discussed this a year ago as well. Dan now has a version done swapping our own test out. We should put this in after AX.
9) Does the Meeting Survive Host Leaving?
Nope.
10) Next Meeting
Next meeting is December 1st, 2020. 1pm-2pm EST (GMT-5).
| 3,531 | Markdown | 43.149999 | 359 | 0.776834 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2019-02-14.md | Minutes from 8th OpenVDB TSC meeting, Feb. 14, 2019
Attendees: *Jeff* L., *Nick* A., *Ken* M., *Peter* C., *Dan* B., Andrew P.
Additional Attendees: Bruce Chernia (Intel), Thanh Ha
Agenda:
1) Confirmation of quorum
2) Selection of secretary
3) Update from TAC
4) SIGGRAPH course
5) Jenkins vs Travis
6) Bug Reporting / External PRs
7) Other
8) Schedule next meeting
1) A quorum was confirmed.
2) Secretary - Nick Avramoussis.
3) Ken gave a brief 5 minute overview of the TSC at the TAC meet. The majority
of our time thus far has been spent on process + gave a condensed overview of our
future work (ax, extended points support etc). OpenColorIO has been fully
approved as the second ASWF project. OpenEXR is on track for approval in March
2019.
Apple is now on the TAC, Andrew mentioned to them that they could provide
assistance through build system contributions for their platform for ASWF
projects. There is some concern with the level of emphasis on MacOS and Windows
support as they have not been specified as requirements by the ASWF.
The issue of a security consultant was again raised. Ken mentioned to the TAC
that the OpenVDB TSC have struggled to fill this position. Jim/Bruce at Intel
spoke that they might be able to provide assistance in this area. It's currently
not clear exactly what security issues the TSC needs to be responsible for. Jeff/
Nick gave examples of supported implementation that could be used maliciously.
Andrew: anything we provide from the ASWF should be signed that it's a valid file
in the given format.
4) Ken submitted a proposal for the OpenVDB SIGGRAPH Course on Feb. 12th. The
submission is still open for a 1h 30min time slot and has room for potentially
one more presentation. The first topic, presented by Ken, will be an update on
OpenVDB since the last course (4.1->6.1) and content about the new governance.
Nick will present OpenVDB AX, Dan's content may include delay loading and point
advection. There may be an opportunity to discuss the Autodesk's mres grid,
depending on their reply (still pending).
5) Dan: three points in favor of Travis/Circle/Github CI. The first is that the
current Jenkins setup uses an additional repository for the CI build system,
where as Travis uses the CI included in the OpenVDB repository. This is a
limitation of the way that Jenkins is currently configured in the ASWF. Having
the CI in the same repo makes it easier to sync, jump around the history, merge,
fork etc. Thanh mentioned that there is a way that Jenkins might be setup to
accommodate this, but it uses Jenkins's own proprietary systems. Second, the
logs in Travis have a much nicer layout to Jenkins. Third, Travis has inbuilt
ccache support. We also already have Travis integration. The additional
computational resources are the main benefit of the current Jenkins system.
Thanh has been investigating Circle CI and another LF group (the LF Networking
group) has been looking at alternatives. This group meets Fridays.
Meeting notes from the Tooling working group:
https://wiki.lfnetworking.org/display/LN/LFN+Infra+Work+Group+1+Feb+19
Meeting schedule/mailing list for the working group for anyone who's interested
in attending:
https://lists.lfnetworking.org/g/TAC/topic/lfn_tooling_subgroup/29576852?p=
Note that CMake support is unrelated to the CI and should be prioritized.
6) Main point of entry for reporting bugs isn't clear. There are four places:
JIRA, Github issues, e-mail, forum. The forum has recently been getting spam.
Membership is required for the forum which Ken has to confirm. We could enable
moderation so that posts have to be approved before they are visible. Jeff
mentioned that SideFX only moderate first posts.
Dan: Github issues are nice as they allow you to close the issue/mark as resolved.
Nick: the lack of documentation exacerbates the problem of potentially trivial
forum posts and dilutes the forum. Nick brought up the current issue with external
(non-TSC) pull requests stagnating. It was agreed that we need a Github check for
CLA. Dan mentioned that it might be worth consolidating the current contributing
.md files to have a clearer documented process for external PRs.
Dan's message on the above: https://lists.aswf.io/g/openvdb-dev/message/41
7) Jeff used the current statistics header in OpenVDB to introduce VDB reduction
support (for volumes, not points) in Houdini 17.5. Nick asked if the hscript
expression might also benefit from supporting VDBs.
Peter mentioned that the process functions in Houdini which operate on set types
of VDB grids could be changed to take a tuple of types to allow for cleaner
instantiation of supported grid types across Houdini SOPs.
TAC meeting discussed versioning. All projects should be using the same type of
versioning. Semantic versioning was the common thread.
OpenVDB ABI only for grid compatibility. Nick asked if this was written down
anywhere, it doesn't seem to be. Dan mentioned the issue with unsupported file
format warnings causing lots of confusion.
Peter asked about Clarisse render hooks for VDB points. Nick: we tried something
like this in the past but never completed it. Clarisse tools which work on
VDB Points pass around the grids with a final conversion to Clarisse geometry
when rendered.
Dan brought up the removal of deprecation warnings. Dan to write a proposal on
our deprecation policy to vote on at the next TSC meeting.
Jeff: should we remove GU/GR Prim VDB from the repository. Consensus was that as
long as they build, they are good to stay.
Andrew, chat log: is there someone that I can send the CII certification
spreadsheet document to so the TSC can begin to own the completion of the process?
We'll continue to help complete it as we can, but I think ownership of the doc
should transfer to the TSC.
8) The next TSC meeting is TBC. Pending agenda, this will either be on Feb 21st
or Feb 28th, 2019, 11am-12pm PST.
| 5,918 | Markdown | 47.917355 | 82 | 0.794356 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2019-01-31.md | Minutes from 7th OpenVDB TSC meeting, Jan. 31, 2019
Attendees: John M., *Jeff* L., *Nick* A., *Ken* M., *Peter* C., *Dan* B., Andrew P.
Additional Attendees: Bruce Chernia (Intel), Thanh Ha
Agenda:
1) Confirmation of quorum
2) Selection of secretary
3) TAC Presentation 2/7 (Ken)
4) SIGGRAPH Course (Ken)
5) Plans and roadmap (all)
6) Release process (Peter)
7) Web site (?)
8) CI/Jira update (Dan)
9) Other?
10) Schedule next meeting
1) Quorum was confirmed
2) Secretary - Dan Bailey.
3) TAC Presentation 2/7
Ken to present a 3-slide summary of the OpenVDB project since being accepted to
ASWF to the TAC. Dan to summarize and send Ken pull request stats before and
after acceptance. Dan and Jeff highlighted the improved process since being part
of ASWF and Peter concurred it had eased his workflow.
A roadmap for further process improvements was mentioned - Peter suggested we
better codify the process for contributing to OpenVDB as a non-TSC member,
including guidelines around code coverage and unit testing as well as a GitHub
check for the CLA. John to check on launch of an official CLA system from LF
using Docusign that would help with this. Thanh mentioned that he thought the
rollout had been delayed slightly.
4) Siggraph Course
Ken has shared a Google doc to collaborate on presentation details. He would
like to see some production-friendly sessions as well as features of the
library. Deadline is 12th February.
5) Plans and roadmap
Nick, Ken, Dan and Jeff all shared summaries of features they wish to
contribute, wish lists and desired library cleanup. Aim to put as much
functionality into the next release in time for next major release of Houdini.
This is intended to be broad bullet-points for now. Some more detail shared
through Google Docs, but a few highlights and points of discussion:
Nick:
* tools to merge, rasterize and surface VDB Points, Jeff suggested where SOPs
didn't support Houdini points to convert them into VDB points on-the-fly
* restructuring SOPs to move implementation details up into core library where
they can be unit tested - Remove Divergence SOP was highlighted as a good
example of where this is needed
* a Reduce SOP for performing deterministic reduction of volumes, Ken suggested
looking at using some of the functionality in tools/Diagnostics.h that solves
some of these problems, Jeff considering extending Volume Reduce SOP to support
VDBs
* performance of Advect SOP compared with Houdini volume advection, Jeff and Ken
mentioned that the bottleneck was the front-tracking that would make it hard to
get comparable performance but perhaps still improvements to be made
* core AX features include sampling and rasterization in order to reach a v1.0
for Siggraph
Ken:
* tools Ken has completed and wishes to push up soon include fast sweeping,
finding all active values within a bounding box, MLS and some higher-level
tools and higher-order alternatives to existing methods
* a more efficient way of building masks from meshes that doesn't use levelsets
* Ken would like a read-only out-of-core grid that allows for random-access with
a memory limit to page data in and out automatically. Jeff suggested looking at
a similar solution in OpenImageIO for inspiration in paging in and out tiles of
textures
Dan:
* wishlist includes distributed computing tools, faster levelset segmentation,
faster resampling of masks and more solvers including multigrid, FFT and
variational solves
* working on some higher-level sample applications
* better parallelization of multiple VDBs through combine SOP, Nick suggested
trying to put the existing combine SOP into a foreach SOP
* various VDB Points improvements include strided attribute arrays, dynamic
attribute arrays, curves and poly soups as well as a SOP to support creation,
delete, casting, renaming, etc of attributes
* extend point moving to support merging additional grids and work with Nick on
coming up with a common API for point merging
Jeff:
* would like to see a GPU representation of OpenVDB, may consider writing one
* 2D grids for OpenVDB would be useful for terrain, Ken mentioned using a
different leaf size but Jeff would like it kept consistent with standard 3D grid
configuration (ie 8x8 voxels)
* Dan asked about SideFX potentially contributing the VDB SOP and VDB Activate
SOP to help to unify open-source/DWA SOPs and SideFX SOPs
6) Release process
Not covered due to time constraints.
7) Web site
John highlighted an issue with the DNS of the website and Peter mentioned that
some of the download links are currently broken. Peter to ask Andrew (who had
just left the meeting).
8/9) CI/Jira update and Other
Jeff has signed into ASWF JIRA now.
Ken now the only TSC member that hasn't signed into JIRA (https://jira.aswf.io)
or accepted GitHub write permissions
(https://github.com/AcademySoftwareFoundation/openvdb/invitations). However, he
does now have a signed CLA from Weta.
10) The next TSC meeting is scheduled for Thursday Feb 14, 2019, 11am-12pm PST.
Note that the meeting scheduled for next week is cancelled due to a clash with
the presentations to the TAC.
| 5,128 | Markdown | 39.385826 | 83 | 0.795047 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2019-05-02.md | Minutes from 15th OpenVDB TSC meeting, May 2, 2019
Attendees: *Ken* M., *Nick* A., *Dan* B., *Peter* C., *Jeff* L.
Additional Attendees: Bruce Chernia (Intel)
Agenda:
1) Confirmation of quorum
2) Selection of secretary
3) Status update (6.1)
4) Release schedule
5) SIGGRAPH (course and BOF)
6) Response to MRES
7) Other
8) Schedule next meeting
1) A quorum was confirmed
2) Secretary - Nick Avramoussis
3) Status update (6.1)
The CMake refactor (#382) and Circle CI frameworks (#409) have been
merged and a ticket has been created to track outstanding CMake and
CI work (https://jira.aswf.io/browse/OVDB-89). There were a few minor
updates to the CMake implementation after merge, notably adding missing
unit tests to the source file list. #378 (warnings as errors) has also
been merged. A few outstanding PRs exist for 6.1; CMake syntax
improvements and Houdini deprecations.
The deprecations of some Houdini utility functions initiated discussion
on the Houdini utilities deployed with OpenVDB. Some are not actively
being used in the OpenVDB codebase. The original source of these methods
stems from a separate standalone library being used at Dreamworks. They
are a useful place for generalized Houdini development tools. It would
be worth considering a separate module for the Houdini utilities which
doesn't depend on OpenVDB (but could still be deployed with it). There
is interest outside of OpenVDB for users wishing to use some of these
methods, but who don't want to rely on or pull in an unnecessary OpenVDB
dependency.
Some methods in particular worth discussing. duplicateSourceStealable()
could be removed though it would force any users inheriting from
SOP_OpenVDBNode to verbify their SOPs to gain similar performance
benefits. Note that as long as a sop is marked as INPLACE, mainline
Houdini will perform a "duplicateSourceStealable" in the same
circumstances. Consensus to mark as deprecated for now. It would be worth
taking another look at the DS Houdini workflow for parameters to
better resolve parameter dependencies for verbified SOPs
(https://jira.aswf.io/browse/OVDB-22). Currently VDB doesn't know how
to handle 'disable whens' when resolving these. ScopedInputLock to
remain in place. OP_NodeChain was being used in the OpenVDB Filter
nodes but has been removed as part of removing the pre 16.5 logic (for
non verbified nodes). The Houdini mindset on these types of methods is
that nodes should not be analyzing the surrounding graph network for
optimizations. OP_NodeChain is theoretically slightly more efficient
than the verbification implementation as it doesn't need to construct
duplicates of the same filter classes, but the performance differences
should be minimal.
4) Release schedule
Consensus to release 6.1.0 early next week (beginning 6th May). The CI
has been completely transitioned to circle and travis implementation
has been removed. The Makefile is no longer being tested. AppVeyor is
running. We're still missing a Mac and Maya CI build. The TAC is
moving towards Azure pipelines over circle.
5) SIGGRAPH
The SIGGRAPH course has been accepted and there will also be an OpenVDB
Birds of a Feather with a block of time just for the OpenVDB TSC
(allocated by the ASWF). We should continue to collect course material
for submission and clarify the submission requirements and deadlines.
6) Response to MRES
Ken to put together an initial document with some feedback from the TSC
which other can extend. Primary question is that we're still unclear
why a stack of OpenVDB grids is not necessary better or as valid an
approach to the currently proposed MRES structure. We would ultimately
like to see a solution to one of the proposed problems outlined in the
response.
Discussion lead to OpenVDBs Tree resolution flexibility at compile
time. It was proposed to consider locking down the available Tree
templates instantiations to improve portability and compile times
whilst decreasing code bloat. It's still not clear if this is a
realistic goal due as we're unsure how users (if at all) are
utilizing the available flexibility of the Tree node structures and
how exactly we would introduce these limitations.
Additional discussion on the idea of a read only Tree (static or const)
following on from last weeks metadata conversation. It's not clear
what a static Tree configuration (specialized with potentially a
different ABI) would give over a const Tree, but it would be worth
exploring this idea.
7) Other
Briefly discussed the idea of blog posts and other more "user friendly"
ways of relaying documentation as alternatives to doxygen.
8) Next Meeting
May 9th 2019. 3pm-4pm EDT (GMT-4).
| 4,663 | Markdown | 42.185185 | 73 | 0.801844 |
NVIDIA-Omniverse/ext-openvdb/tsc/meetings/2019-04-25.md | Minutes from 14th OpenVDB TSC meeting, April 25, 2019
Attendees: *Nick* A., *Dan* B., *Peter* C., *Jeff* L.
Additional Attendees: Bruce Chernia (Intel), Andrew Pearce (DWA)
Regrets: *Ken* M.
Agenda:
1) Confirmation of quorum
2) Selection of secretary
3) VDB Visualize Changes
4) CMake Update
1) A quorum was confirmed. Dan chaired.
2) Secretary - Jeff Lait
3) VDB Visualize Changes
Proposal to remove meshing options from the open source version to
have it match the SideFX version. Unanimous consent.
It is too many clicks to setup the visualize to put-values-on-points
to work with the spreadsheet. Suggestion is to make a shelf
tool that shows up in the tab menu only to alias that functionality
(like how Extract All Points works in 17.5) Any change will
wait until after 6.1
4) CMake Update
It is unclear how much detail goes into readme vs the doxygen,
especially as doxygen only shows up after build, or from the
website that is out of date. Will merge and figure these
out afterwards as we want CI stabilized first.
VRay has to be installed only into one directory, the mantra
specific dso, not both.
Current CMake rules make it hard to install one SOP. (Not build,
install) Commenting out unwanted SOPs in the build list doesn't
work as some build rules refer to SOPs specifically. In particular,
the OpenVDB Write.
An uninstall target, while not common practice, would be useful.
Lint integration will be delayed until after CMake PR is successful.
Should we auto-install all available dependencies, or demand the
default library match a core requirement? In particular is BLOSC
which people are unlikely to have installed. OTOH, if you build
VDB without BLOSC you will not be able to inter-operate. Conclusion
was to require BLOSC by default.
We should make a list of missing CMake features so we can slowly
check them off.
5) Circle vs Azure
Azure is currently gcc 5.4 and slower. And Circle's Debian is nicer
to work with. But Azure has all 3 main platforms and supports GPU.
6) 6.1 Release
The deprecation ticket is complete.
VDB Point issue has had advection tested and is fine.
Note that ragged arrays are supported in Houdini and VDB Points, but not
in the glue between them. Probably should be.
Warnings as errors is almost finsihed.
7) Bug reporting
For bugs that come within the TSC, submit with JIRA.
8) Standard Types
3rd party uses uint32 datatype in VDB to Points, rendering their files
unreadable with standard install. Lack of uint32 is an intentional
choice to avoid type explosion. It is agreed the problems of unsigned
are not worth saving a bit, if you are at that boundary you should
just go to int64. Or, if absolutely necessary, cast on the client
end.
We should add a comment in the core library where types are registered
providing our reasoning and warning against adding a type there.
Registering a type from outside the core library should be locked
and generate a warning to avoid people accidentally becoming
incompatible.
9) VDB Course
Course approved! Everyone should do the rights management.
10) Renderman Handoff
Renderman requires a MIPMAP of min/max values, likely for early culling
and partial loading.
Not clear if this has to be a power of 2 pyramid, or could be min/max
on tiles.
Concerns about live min/max data in the VDB structure is it will be
swiftly out of date and cause confusion. Solved for pipelines by
always regenerating on write and ignoring any already on the
grid.
If load data from an old version that doesn't know how to regenerate
on write, throw away the data.
We need more clarity about what this metadata would consist of.
11) Next Meeting
May 2nd 2019. 3pm-4pm EDT (GMT-4).
| 3,713 | Markdown | 29.694215 | 72 | 0.778885 |
NVIDIA-Omniverse/IsaacSim-dockerfiles/README.md | # Isaac Sim Dockerfiles
## Introduction
This repository contains Dockerfiles for building an Isaac Sim container.
### Pre-Requisites
Before getting started, ensure that the system has the latest [NVIDIA Driver](https://www.nvidia.com/en-us/drivers/unix/) and the [NVIDIA Container Toolkit](https://github.com/NVIDIA/nvidia-docker) installed.
Use your [NGC Account](https://docs.nvidia.com/ngc/ngc-overview/index.html#registering-activating-ngc-account) to get access to the [Isaac Sim Container](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/isaac-sim) and generate your [NGC API Key](https://docs.nvidia.com/ngc/ngc-overview/index.html#generating-api-key).
## Build
Clone this repository and then build the image:
```bash
docker login nvcr.io
docker build --pull -t \
isaac-sim:2023.1.0-ubuntu22.04 \
--build-arg ISAACSIM_VERSION=2023.1.0 \
--file Dockerfile.2023.1.0-ubuntu22.04 .
```
## Usage
To run the container and start Isaac Sim as a headless app:
```bash
docker run --name isaac-sim --entrypoint bash -it --gpus all -e "ACCEPT_EULA=Y" --rm --network=host \
-e "PRIVACY_CONSENT=Y" \
-v ~/docker/isaac-sim/cache/kit:/isaac-sim/kit/cache:rw \
-v ~/docker/isaac-sim/cache/ov:/root/.cache/ov:rw \
-v ~/docker/isaac-sim/cache/pip:/root/.cache/pip:rw \
-v ~/docker/isaac-sim/cache/glcache:/root/.cache/nvidia/GLCache:rw \
-v ~/docker/isaac-sim/cache/computecache:/root/.nv/ComputeCache:rw \
-v ~/docker/isaac-sim/logs:/root/.nvidia-omniverse/logs:rw \
-v ~/docker/isaac-sim/data:/root/.local/share/ov/data:rw \
-v ~/docker/isaac-sim/documents:/root/Documents:rw \
isaac-sim:2023.1.0-ubuntu22.04 \
./runheadless.native.sh -v
```
To run the container and start Isaac Sim as a windowed app:
```bash
xhost +
docker run --name isaac-sim --entrypoint bash -it --gpus all -e "ACCEPT_EULA=Y" --rm --network=host \
-e "PRIVACY_CONSENT=Y" \
-v $HOME/.Xauthority:/root/.Xauthority \
-e DISPLAY \
-v ~/docker/isaac-sim/cache/kit:/isaac-sim/kit/cache:rw \
-v ~/docker/isaac-sim/cache/ov:/root/.cache/ov:rw \
-v ~/docker/isaac-sim/cache/pip:/root/.cache/pip:rw \
-v ~/docker/isaac-sim/cache/glcache:/root/.cache/nvidia/GLCache:rw \
-v ~/docker/isaac-sim/cache/computecache:/root/.nv/ComputeCache:rw \
-v ~/docker/isaac-sim/logs:/root/.nvidia-omniverse/logs:rw \
-v ~/docker/isaac-sim/data:/root/.local/share/ov/data:rw \
-v ~/docker/isaac-sim/documents:/root/Documents:rw \
isaac-sim:2023.1.0-ubuntu22.04 \
./runapp.sh
```
Connect to Isaac Sim using the [Omniverse Streaming Client](https://docs.omniverse.nvidia.com/streaming-client/latest/user-manual.html).
See [Container Deployment](https://docs.omniverse.nvidia.com/isaacsim/latest/install_container.html#container-deployment) for information on container deployment.
## Licensing
The source code in this repository is licensed under [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0).
The resulting container images are licensed under the [NVIDIA Omniverse License Agreement](https://developer.nvidia.com/omniverse/license).
## Support
* Please use [NVIDIA Developer Forums](https://forums.developer.nvidia.com/c/omniverse/simulation/69) for questions and comments.
* See [Isaac Sim Documentation](https://docs.omniverse.nvidia.com/isaacsim/latest/index.html) for more information.
| 3,315 | Markdown | 41.51282 | 323 | 0.732127 |
NVIDIA-Omniverse/kit-extension-template-cpp/README.md | # Omniverse Kit C++ Extension Template
This project contains everything necessary to develop extensions that contain C++ code, along with a number of examples demonstrating best practices for creating them.
## What Are Extensions?
While an extension can consist of a single `extension.toml` file, most contain Python code, C++ code, or a mixture of both:
```
Kit
|
___________________________________|___________________________________
| | |
Python Only C++ Only Mixed
(eg. omni.example.python.hello_world) (eg. omni.example.cpp.hello_world) (eg. omni.example.cpp.pybind)
```
Extensive documentation detailing what extensions are and how they work can be found [here](https://docs.omniverse.nvidia.com/py/kit/docs/guide/extensions.html).
## Getting Started
1. Clone the [GitHub repo](https://github.com/NVIDIA-Omniverse/kit-extension-template-cpp) to your local machine.
2. Open a command prompt and navigate to the root of your cloned repo.
3. Run `build.bat` to bootstrap your dev environment and build the example extensions.
4. Run `_build\{platform}\release\omni.app.example.extension_browser.bat` to open an example kit application.
- Run `omni.app.example.viewport.bat` instead if you want the renderer and main viewport to be enabled.
- Run `omni.app.kit.dev.bat` instead if you want the full kit developer experience to be enabled.
5. From the menu, select `Window->Extensions` to open the extension browser window.
6. Enter `omni.example.cpp` in the search bar at the top of the extension browser window to view the example extensions included with this repo.

## Debugging C++ Extensions
1. Run `build.bat` (if you haven't already) to generate the solution file.
2. Open `_compiler\vs2019\kit-extension-template-cpp.sln` using Visual Studio 2019.
3. Select `omni.app.example.extension_browser` as the startup project (if it isn't already).
- Select `omni.app.example.viewport` instead if you want the renderer and main viewport to be enabled.
- Select `omni.app.kit.dev` instead if you want the full kit developer experience to be enabled.
4. Run/debug the example kit application, using the extension browser window to enable/disable extensions.

## Creating New C++ Extensions
1. Copy one of the existing extension examples to a new folder within the `source/extensions` folder.
- The name of the new folder will be the name of your new extension.
- The **omni** prefix is reserved for NVIDIA applications and extensions.
2. Update the fields in your new extension's `config/extension.toml` file as necessary.
3. Update your new extension's `premake5.lua` file as necessary.
4. Update your new extension's C++ code in the `plugins` folder as necessary.
5. Update your new extension's Python code in the `python` folder as necessary.
6. Update your new extension's Python bindings in the `bindings` folder as necessary.
7. Update your new extension's documentation in the `docs` folder as necessary.
8. Run `build.bat` to build your new extension.
9. Refer to the *Getting Started* section above to open the example kit application and extension browser window.
10. Enter the name of your new extension in the search bar at the top of the extension browser window to view it.
## Generating Documentation
1. Run `repo.bat docs` to generate the documentation for the repo, including all extensions it contains.
- You can generate the documentation for a single extension by running `repo.bat docs -p {extension_name}`
2. Open `_build/docs/kit-extension-template-cpp/latest/index.html` to view the generated documentation.
## Publishing
Developers can publish publicly hosted extensions to the community extension registry using the following steps:
1. Tag the GitHub repository with the **[omniverse-kit-extension](https://github.com/topics/omniverse-kit-extension)** tag.
2. Create a [GitHub release](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository).
3. Upload the packaged extension archives, created with `./repo.bat package` on Windows or `./repo.sh package` on Linux, to the GitHub release. You must rename the packaged extension archive to match the following convention:
- Linux: `{github-namespace}-{github-repository}-linux-x86_64-{github-release-tag}.zip`
- Windows: `{github-namespace}-{github-repository}-windows-x86_64-{github-release-tag}.zip`
For example, the v0.0.2 release of the extension at <https://github.com/jshrake-nvidia/kit-community-release-test/releases/tag/v0.0.2> has archives named `jshrake-nvidia-kit-community-release-test-linux-x86_64-v0.0.2.zip` and `jshrake-nvidia-kit-community-release-test-windows-x86_64-v0.0.2.zip` for Linux and Windows, respectively.
Our publishing pipeline runs nightly and discovers any publicly hosted GitHub repository with the `omniverse-kit-extension` tag. The published extensions should be visible in the community registry the day following the creation of a GitHub release.
Refer to [the kit extension documentation](https://docs.omniverse.nvidia.com/kit/docs/kit-manual/latest/guide/extensions_advanced.html#package-writetarget) for how to specify the Kit version compatibility for your extension. This ensures that the correct version of your extension is listed in any given Kit application.
## Contributing
The source code for this repository is provided as-is and we are not accepting outside contributions.
| 5,806 | Markdown | 62.119565 | 332 | 0.728557 |
NVIDIA-Omniverse/kit-extension-template-cpp/index.rst | Kit C++ Extension Template
##########################
.. mdinclude:: README.md
Example Extensions
##################
* `omni.example.cpp.actions <../../omni.example.cpp.actions/latest/index.html>`_
* `omni.example.cpp.commands <../../omni.example.cpp.commands/latest/index.html>`_
* `omni.example.cpp.hello_world <../../omni.example.cpp.hello_world/latest/index.html>`_
* `omni.example.cpp.omnigraph_node <../../omni.example.cpp.omnigraph_node/latest/index.html>`_
* `omni.example.cpp.pybind <../../omni.example.cpp.pybind/latest/index.html>`_
* `omni.example.cpp.ui_widget <../../omni.example.cpp.ui_widget/latest/index.html>`_
* `omni.example.cpp.usd <../../omni.example.cpp.usd/latest/index.html>`_
* `omni.example.cpp.usd_physics <../../omni.example.cpp.usd_physics/latest/index.html>`_
* `omni.example.cpp.usdrt <../../omni.example.cpp.usdrt/latest/index.html>`_
* `omni.example.python.hello_world <../../omni.example.python.hello_world/latest/index.html>`_
* `omni.example.python.ui <../../omni.example.python.ui/latest/index.html>`_
* `omni.example.python.usdrt <../../omni.example.python.usdrt/latest/index.html>`_
| 1,126 | reStructuredText | 52.666664 | 94 | 0.67762 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.tasking/config/extension.toml | [package]
version = "1.0.0" # Semantic Versioning is used: https://semver.org/
# These fields are used primarily for display in the extension browser UI.
title = "Example C++ Extension: Tasking"
description = "Demonstrates how to create a C++ plugin that uses the carb tasking system."
category = "Example"
keywords = ["example", "C++", "cpp", "Async", "Fibers", "Task", "Tasking"]
icon = "data/icon.png"
preview_image = "data/preview.png"
changelog = "docs/CHANGELOG.md"
readme = "docs/README.md"
authors = ["David Bosnich <[email protected]>"]
repository = "https://github.com/NVIDIA-Omniverse/kit-extension-template-cpp"
# Define the Python modules that this extension provides.
# C++ only extensions need this just so tests don't fail.
[[python.module]]
name = "omni.example.cpp.tasking"
# Define the C++ plugins that this extension provides.
[[native.plugin]]
path = "bin/*.plugin"
# Define the documentation that will be generated for this extension.
[documentation]
pages = [
"docs/Overview.md",
"docs/CHANGELOG.md",
]
| 1,041 | TOML | 32.612902 | 90 | 0.71854 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.tasking/plugins/omni.example.cpp.tasking/ExampleTaskingExtension.cpp | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
#define CARB_EXPORTS
#include <carb/PluginUtils.h>
#include <carb/tasking/ITasking.h>
#include <carb/tasking/TaskingUtils.h>
#include <omni/ext/IExt.h>
#include <omni/kit/IApp.h>
const struct carb::PluginImplDesc pluginImplDesc = { "omni.example.cpp.tasking.plugin",
"An example C++ extension.", "NVIDIA",
carb::PluginHotReload::eEnabled, "dev" };
CARB_PLUGIN_IMPL_DEPS(omni::kit::IApp)
namespace omni
{
namespace example
{
namespace cpp
{
namespace tasking
{
class ExampleTaskingExtension;
void exampleStandaloneFunctionTask(ExampleTaskingExtension* exampleTaskingExtension);
class ExampleTaskingExtension : public omni::ext::IExt
{
public:
void onStartup(const char* extId) override
{
// Get the tasking interface from the Carbonite Framework.
carb::tasking::ITasking* tasking = carb::getCachedInterface<carb::tasking::ITasking>();
// Add a task defined by a standalone function.
tasking->addTask(carb::tasking::Priority::eDefault, {}, &exampleStandaloneFunctionTask, this);
// Add a task defined by a member function.
tasking->addTask(carb::tasking::Priority::eDefault, {}, &ExampleTaskingExtension::exampleMemberFunctionTask, this);
// Add a task defined by a lambda function.
tasking->addTask(carb::tasking::Priority::eDefault, {}, [this] {
// Artifical wait to ensure this task finishes first.
carb::getCachedInterface<carb::tasking::ITasking>()->sleep_for(std::chrono::milliseconds(1000));
printHelloFromTask("exampleLambdaFunctionTask");
});
}
void onShutdown() override
{
std::lock_guard<carb::tasking::MutexWrapper> lock(m_helloFromTaskCountMutex);
m_helloFromTaskCount = 0;
}
void exampleMemberFunctionTask()
{
// Artifical wait to ensure this task finishes second.
carb::getCachedInterface<carb::tasking::ITasking>()->sleep_for(std::chrono::milliseconds(2000));
printHelloFromTask("exampleMemberFunctionTask");
}
void printHelloFromTask(const char* taskName)
{
std::lock_guard<carb::tasking::MutexWrapper> lock(m_helloFromTaskCountMutex);
++m_helloFromTaskCount;
printf("Hello from task: %s\n"
"%d tasks have said hello since extension startup.\n\n",
taskName, m_helloFromTaskCount);
}
private:
// We must use a fiber aware mutex: https://docs.omniverse.nvidia.com/kit/docs/carbonite/latest/docs/tasking/TaskingBestPractices.html#mutexes
carb::tasking::MutexWrapper m_helloFromTaskCountMutex;
int m_helloFromTaskCount = 0;
};
void exampleStandaloneFunctionTask(ExampleTaskingExtension* exampleTaskingExtension)
{
// Artifical wait to ensure this task finishes last.
carb::getCachedInterface<carb::tasking::ITasking>()->sleep_for(std::chrono::milliseconds(3000));
exampleTaskingExtension->printHelloFromTask("exampleStandaloneFunctionTask");
}
}
}
}
}
CARB_PLUGIN_IMPL(pluginImplDesc, omni::example::cpp::tasking::ExampleTaskingExtension)
void fillInterface(omni::example::cpp::tasking::ExampleTaskingExtension& iface)
{
}
| 3,669 | C++ | 33.952381 | 146 | 0.700736 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.tasking/docs/Overview.md | # Overview
An example C++ extension that can be used as a reference/template for creating new extensions.
Demonstrates how to create a C++ object that uses the carb tasking system for async processing.
See also: [https://docs.omniverse.nvidia.com/kit/docs/carbonite/latest/docs/tasking/index.html](https://docs.omniverse.nvidia.com/kit/docs/carbonite/latest/docs/tasking/index.html)
# C++ Usage Examples
## Spawning Tasks
```
class ExampleTaskingExtension : public omni::ext::IExt
{
public:
void onStartup(const char* extId) override
{
// Get the tasking interface from the Carbonite Framework.
carb::tasking::ITasking* tasking = carb::getCachedInterface<carb::tasking::ITasking>();
// Add a task defined by a standalone function.
tasking->addTask(carb::tasking::Priority::eDefault, {}, &exampleStandaloneFunctionTask, this);
// Add a task defined by a member function.
tasking->addTask(carb::tasking::Priority::eDefault, {}, &ExampleTaskingExtension::exampleMemberFunctionTask, this);
// Add a task defined by a lambda function.
tasking->addTask(carb::tasking::Priority::eDefault, {}, [this] {
// Artifical wait to ensure this task finishes first.
carb::getCachedInterface<carb::tasking::ITasking>()->sleep_for(std::chrono::milliseconds(1000));
printHelloFromTask("exampleLambdaFunctionTask");
});
}
void onShutdown() override
{
std::lock_guard<carb::tasking::MutexWrapper> lock(m_helloFromTaskCountMutex);
m_helloFromTaskCount = 0;
}
void exampleMemberFunctionTask()
{
// Artifical wait to ensure this task finishes second.
carb::getCachedInterface<carb::tasking::ITasking>()->sleep_for(std::chrono::milliseconds(2000));
printHelloFromTask("exampleMemberFunctionTask");
}
void printHelloFromTask(const char* taskName)
{
std::lock_guard<carb::tasking::MutexWrapper> lock(m_helloFromTaskCountMutex);
++m_helloFromTaskCount;
printf("Hello from task: %s\n"
"%d tasks have said hello since extension startup.\n\n",
taskName, m_helloFromTaskCount);
}
private:
// We must use a fiber aware mutex: https://docs.omniverse.nvidia.com/kit/docs/carbonite/latest/docs/tasking/TaskingBestPractices.html#mutexes
carb::tasking::MutexWrapper m_helloFromTaskCountMutex;
int m_helloFromTaskCount = 0;
};
void exampleStandaloneFunctionTask(ExampleTaskingExtension* exampleTaskingExtension)
{
// Artifical wait to ensure this task finishes last.
carb::getCachedInterface<carb::tasking::ITasking>()->sleep_for(std::chrono::milliseconds(3000));
exampleTaskingExtension->printHelloFromTask("exampleStandaloneFunctionTask");
}
```
| 2,800 | Markdown | 36.346666 | 180 | 0.702143 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.python.usdrt_mesh/README.md | # omni.example.python.usdrt_mesh
Example Kit extension that demonstrates how to use USDRT to create, update, and delete a UsdGeom.Mesh prim.
## Usage
### Windows
```bash
.\build.bat
.\_build\windows-x86_64\release\kit\kit.exe .\source\apps\omni.app.kit.dev.kit --enable omni.example.python.usdrt_mesh --ext-folder source\extensions --/app/useFabricSceneDelegate=true
```
### Linux
```bash
./build.sh
./_build/linux-x86_64/release/kit/kit ./source/apps/omni.app.kit.dev.kit --enable omni.example.python.usdrt_mesh --ext-folder source/extensions --/app/useFabricSceneDelegate=true
```
| 589 | Markdown | 28.499999 | 184 | 0.743633 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.python.usdrt_mesh/config/extension.toml | [package]
# Semantic Versioning is used: https://semver.org/
version = "0.0.1"
# Lists people or organizations that are considered the "authors" of the package.
authors = ["Justin Shrake <[email protected]>"]
# The title and description fields are primarily for displaying extension info in UI
title = "Example Python Extension: USDRT Mesh"
description="Example Kit extension that demonstrates how to create, update, and delete a USDRT Mesh"
# Path (relative to the root) or content of readme markdown file for UI.
readme = "docs/README.md"
# URL of the extension source repository.
repository = "https://github.com/NVIDIA-Omniverse/kit-extension-template-cpp"
# One of categories for UI.
category = "Example"
# Keywords for the extension
keywords = ["kit", "example", "usdrt", "scenegraph", "fabric"]
# Location of change log file in target (final) folder of extension, relative to the root.
# More info on writing changelog: https://keepachangelog.com/en/1.0.0/
changelog="docs/CHANGELOG.md"
# Preview image and icon. Folder named "data" automatically goes in git lfs (see .gitattributes file).
# Preview image is shown in "Overview" of Extensions window. Screenshot of an extension might be a good preview image.
preview_image = "data/preview.png"
# Icon is shown in Extensions window, it is recommended to be square, of size 256x256.
icon = "data/icon.png"
# Extension dependencies
[dependencies]
"omni.kit.uiapp" = {}
"usdrt.scenegraph" = {}
"omni.usd" = {}
"omni.kit.primitive.mesh" = {}
"omni.warp" = { optional = true }
# Main python module this extension provides
[[python.module]]
name = "omni.example.python.usdrt_mesh"
[[test]]
waiver = "Just example code, not for production"
#TODO
# Define the documentation that will be generated for this extension.
[documentation]
pages = [
"docs/Overview.md",
"docs/CHANGELOG.md",
] | 1,856 | TOML | 32.160714 | 118 | 0.738685 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.python.usdrt_mesh/omni/example/python/usdrt_mesh/__init__.py | from .example_python_usdrt_mesh_extension import *
| 51 | Python | 24.999988 | 50 | 0.803922 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.python.usdrt_mesh/omni/example/python/usdrt_mesh/example_python_usdrt_mesh_extension.py | ## Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
##
## NVIDIA CORPORATION and its licensors retain all intellectual property
## and proprietary rights in and to this software, related documentation
## and any modifications thereto. Any use, reproduction, disclosure or
## distribution of this software and related documentation without an express
## license agreement from NVIDIA CORPORATION is strictly prohibited.
##
import carb
import carb.events
import numpy as np
import omni.ext
import omni.kit.app
import omni.ui
import omni.usd
import usdrt
PLANE_SUBDIV = 32
PLANE_EXTENT = 50
PLANE_HEIGHT = 10
PRIM_PATH = f"/World/Plane{PLANE_SUBDIV}x{PLANE_SUBDIV}"
class ExamplePythonUsdrtMeshExtension(omni.ext.IExt):
def on_startup(self, ext_id):
self.sub = None
self.step = 0
self.playing = False
self.init_ui()
def on_shutdown(self):
if self.sub:
self.sub.unsubscribe()
self.sub = None
self.step = 0
self.playing = False
def init_ui(self):
def create_mesh():
stage = get_usdrt_stage()
create_mesh_usdrt(stage, PRIM_PATH, PLANE_SUBDIV, PLANE_SUBDIV)
def delete_mesh():
stage = get_usdrt_stage()
delete_prim_usdrt(stage, PRIM_PATH)
def toggle_update_mesh():
self.playing = not self.playing
if not self.sub:
self.init_on_update()
def toggle_mesh_visibility():
stage = get_usdrt_stage()
prim = stage.GetPrimAtPath(PRIM_PATH)
attr = prim.GetAttribute("_worldVisibility")
val = attr.Get()
attr.Set(not val)
return
def save_stage_to_file():
stage = get_usdrt_stage()
stage.WriteToLayer("example_python_usdrt_mesh_example.usda")
return
self.window = omni.ui.Window("omni.example.python.usdrt_mesh", width=300, height=300)
style = {
# "color": omni.ui.color.WHITE,
# "background_color": omni.ui.color.BLACK,
}
self.window.frame.style = style
with self.window.frame:
with omni.ui.VStack():
with omni.ui.HStack():
omni.ui.Button("Create Plane").set_clicked_fn(create_mesh)
omni.ui.Button("Delete Plane").set_clicked_fn(delete_mesh)
with omni.ui.HStack():
omni.ui.Button("Toggle Update").set_clicked_fn(toggle_update_mesh)
omni.ui.Button("Toggle Visibility").set_clicked_fn(toggle_mesh_visibility)
omni.ui.Button("Save").set_clicked_fn(save_stage_to_file)
def init_on_update(self):
@carb.profiler.profile(zone_name="omni.example.python.usdrt_mesh.on_update")
def on_update(e: carb.events.IEvent):
if not self.playing:
return
try:
stage = get_usdrt_stage()
self.step += 1
update_mesh_usdrt(stage, PRIM_PATH, PLANE_SUBDIV, PLANE_SUBDIV, self.step)
except Exception as e:
carb.log_error(e)
return
update_stream = omni.kit.app.get_app().get_update_event_stream()
self.sub = update_stream.create_subscription_to_pop(on_update, name="omni.example.python.usdrt_mesh.on_update")
return
def get_usdrt_stage() -> usdrt.Usd.Stage:
ctx = omni.usd.get_context()
stage = usdrt.Usd.Stage.Attach(ctx.get_stage_id())
return stage
def create_mesh_usdrt(stage: usdrt.Usd.Stage, prim_path: str, num_x_divisions: int, num_z_divisions: int):
mesh = usdrt.UsdGeom.Mesh.Define(stage, prim_path)
# Create the vertices and face counts
vertices = calculate_mesh_vertices(num_x_divisions, num_z_divisions, 0)
face_vertex_counts = []
face_vertex_indices = []
for z in range(num_z_divisions):
for x in range(num_x_divisions):
vertex0 = z * (num_x_divisions + 1) + x
vertex1 = vertex0 + 1
vertex2 = (z + 1) * (num_x_divisions + 1) + x
vertex3 = vertex2 + 1
face_vertex_counts.append(4)
face_vertex_indices.extend([vertex0, vertex1, vertex3, vertex2])
# Set the mesh data
mesh.CreatePointsAttr().Set(usdrt.Vt.Vec3fArray(vertices))
mesh.CreateFaceVertexCountsAttr().Set(usdrt.Vt.IntArray(face_vertex_counts))
mesh.CreateFaceVertexIndicesAttr().Set(usdrt.Vt.IntArray(face_vertex_indices))
prim = mesh.GetPrim()
# Visibility Attribute
attr = prim.CreateAttribute("_worldVisibility", usdrt.Sdf.ValueTypeNames.Bool, True)
attr.Set(True)
# Set the xform
xformable = usdrt.Rt.Xformable(prim)
xformable.CreateWorldPositionAttr(usdrt.Gf.Vec3d(0.0, 0.0, 0.0))
xformable.CreateWorldScaleAttr(usdrt.Gf.Vec3f(1.0, 1.0, 1.0))
xformable.CreateWorldOrientationAttr(usdrt.Gf.Quatf(0.0, 0.0, 0.0, 1.0))
# Set the extents
bound = usdrt.Rt.Boundable(prim)
world_ext = bound.CreateWorldExtentAttr()
world_ext.Set(
usdrt.Gf.Range3d(
usdrt.Gf.Vec3d(-PLANE_EXTENT, -PLANE_EXTENT, -PLANE_EXTENT),
usdrt.Gf.Vec3d(PLANE_EXTENT, PLANE_EXTENT, PLANE_EXTENT),
)
)
return mesh
def delete_prim_usdrt(stage: usdrt.Usd.Stage, prim_path: str):
stage.RemovePrim(prim_path)
return
def update_mesh_usdrt(stage: usdrt.Usd.Stage, prim_path: str, num_x_divisions: int, num_z_divisions: int, step: int):
# Find the prim
prim = stage.GetPrimAtPath(prim_path)
if not prim.IsValid():
carb.log_verbose(f"Prim at '{prim_path}' is invalid")
return
vertices = calculate_mesh_vertices(num_x_divisions, num_z_divisions, step)
# Set the mesh data
mesh = usdrt.UsdGeom.Mesh(prim)
mesh.CreateVisibilityAttr().Set(True)
mesh.GetPointsAttr().Set(usdrt.Vt.Vec3fArray(vertices))
return mesh
def calculate_mesh_vertices(num_x_divisions: int, num_z_divisions: int, step: int) -> [float]:
x_positions = np.linspace(-PLANE_EXTENT, PLANE_EXTENT, num_x_divisions + 1)
z_positions = np.linspace(-PLANE_EXTENT, PLANE_EXTENT, num_z_divisions + 1)
x_grid, z_grid = np.meshgrid(x_positions, z_positions)
tau = 6.28318
s = 100.0
t = step / s
sx = tau / s
sz = tau / s
y_grid = PLANE_HEIGHT * (np.cos(sx * x_grid + t) + np.sin(sz * z_grid + t))
vertices = np.column_stack((x_grid.flatten(), y_grid.flatten(), z_grid.flatten()))
return vertices.tolist()
| 6,531 | Python | 34.118279 | 119 | 0.62456 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.python.usdrt_mesh/docs/CHANGELOG.md | # Changelog
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [0.1.0] - 2023-12-01
- Initial version
| 137 | Markdown | 18.714283 | 80 | 0.678832 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.python.usdrt_mesh/docs/Overview.md | # USDRT UsdGeom.Mesh Example [omni.example.python.usdrt_mesh]
Example Kit extension that demonstrates how to use USDRT to create, update, and delete a UsdGeom.Mesh prim. Specifically:
- How to create a Usdrt.UsdGeom.Mesh
- How to delete a Usdrt prim
- How to update the vertex buffer data
- How to toggle the mesh visbility
- How to save the Usdrt stage to disk
| 364 | Markdown | 35.499996 | 121 | 0.774725 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.python.hello_world/config/extension.toml | [package]
version = "1.0.0" # Semantic Versioning is used: https://semver.org/
# These fields are used primarily for display in the extension browser UI.
title = "Example Python Extension: Hello World"
description = "Demonstrates how to create a Python module that will startup / shutdown along with the extension."
category = "Example"
keywords = ["example"]
icon = "data/icon.png"
preview_image = "data/preview.png"
changelog = "docs/CHANGELOG.md"
readme = "docs/README.md"
authors = ["Anton Novoselov <[email protected]>", "David Bosnich <[email protected]>"]
repository = "https://github.com/NVIDIA-Omniverse/kit-extension-template-cpp"
# Define the Python modules that this extension provides.
[[python.module]]
name = "omni.example.python.hello_world"
# Define the documentation that will be generated for this extension.
[documentation]
pages = [
"docs/Overview.md",
"docs/CHANGELOG.md",
]
| 915 | TOML | 34.230768 | 113 | 0.744262 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.python.hello_world/omni/example/python/hello_world/hello_world_extension.py | ## Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
##
## NVIDIA CORPORATION and its licensors retain all intellectual property
## and proprietary rights in and to this software, related documentation
## and any modifications thereto. Any use, reproduction, disclosure or
## distribution of this software and related documentation without an express
## license agreement from NVIDIA CORPORATION is strictly prohibited.
##
import omni.ext
# Functions and variables are available to other extensions which import this module.
def hello_from(caller: str):
print(f"[omni.example.python.hello_world] hello_from was called from {caller}.")
return "Hello back from omni.example.python.hello_world!"
def hello_squared(x: int):
print(f"[omni.example.python.hello_world] hello_squared was called with {x}.")
return x**x
# When this extension is enabled, any class that derives from 'omni.ext.IExt'
# declared in the top level module (see 'python.modules' of 'extension.toml')
# will be instantiated and 'on_startup(ext_id)' called. When the extension is
# later disabled, a matching 'on_shutdown()' call will be made on the object.
class ExamplePythonHelloWorldExtension(omni.ext.IExt):
# ext_id can be used to query the extension manager for additional information about
# this extension, for example the location of this extension in the local filesystem.
def on_startup(self, ext_id):
print(f"ExamplePythonHelloWorldExtension starting up (ext_id: {ext_id}).")
def on_shutdown(self):
print(f"ExamplePythonHelloWorldExtension shutting down.")
| 1,604 | Python | 43.583332 | 89 | 0.754364 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.python.hello_world/omni/example/python/hello_world/tests/test_hello_world.py | ## Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
##
## NVIDIA CORPORATION and its licensors retain all intellectual property
## and proprietary rights in and to this software, related documentation
## and any modifications thereto. Any use, reproduction, disclosure or
## distribution of this software and related documentation without an express
## license agreement from NVIDIA CORPORATION is strictly prohibited.
##
# omni.kit.test is primarily Python's standard unittest module
# with additional wrapping to add suport for async/await tests.
# Please see: https://docs.python.org/3/library/unittest.html
import omni.kit.test
# The Python module we are testing, imported with an absolute
# path to simulate using it from a different Python extension.
import omni.example.python.hello_world
# Any class that dervives from 'omni.kit.test.AsyncTestCase'
# declared at the root of the module will be auto-discovered,
class ExamplePythonHelloWorldTest(omni.kit.test.AsyncTestCase):
# Called before running each test.
async def setUp(self):
pass
# Called after running each test.
async def tearDown(self):
pass
# Example test case (notice it is an 'async' function, so 'await' can be used if needed).
async def test_hello_from(self):
result = omni.example.python.hello_world.hello_from("test_hello_world")
self.assertEqual(result, "Hello back from omni.example.python.hello_world!")
# Example test case (notice it is an 'async' function, so 'await' can be used if needed).
async def test_hello_squared(self):
result = omni.example.python.hello_world.hello_squared(4)
self.assertEqual(result, 256)
| 1,698 | Python | 41.474999 | 93 | 0.743227 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.python.hello_world/docs/Overview.md | # Overview
An example Python extension that can be used as a reference/template for creating new extensions.
Demonstrates how to create a Python module that will startup / shutdown along with the extension.
Also demonstrates how to expose Python functions so that they can be called from other extensions.
# Python Usage Examples
## Defining Extensions
```
# When this extension is enabled, any class that derives from 'omni.ext.IExt'
# declared in the top level module (see 'python.modules' of 'extension.toml')
# will be instantiated and 'on_startup(ext_id)' called. When the extension is
# later disabled, a matching 'on_shutdown()' call will be made on the object.
class ExamplePythonHelloWorldExtension(omni.ext.IExt):
# ext_id can be used to query the extension manager for additional information about
# this extension, for example the location of this extension in the local filesystem.
def on_startup(self, ext_id):
print(f"ExamplePythonHelloWorldExtension starting up (ext_id: {ext_id}).")
def on_shutdown(self):
print(f"ExamplePythonHelloWorldExtension shutting down.")
```
| 1,129 | Markdown | 34.312499 | 98 | 0.756422 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.usd/python/tests/test_usd_example.py | ## Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
##
## NVIDIA CORPORATION and its licensors retain all intellectual property
## and proprietary rights in and to this software, related documentation
## and any modifications thereto. Any use, reproduction, disclosure or
## distribution of this software and related documentation without an express
## license agreement from NVIDIA CORPORATION is strictly prohibited.
##
import omni.kit.test
import omni.kit.app
import omni.usd
import omni.example.cpp.usd
class TestUsdExample(omni.kit.test.AsyncTestCase):
async def setUp(self):
# Cache the example usd interface.
self.example_usd_interface = omni.example.cpp.usd.get_example_usd_interface()
# Open a new USD stage.
omni.usd.get_context().new_stage()
self.usd_stage = omni.usd.get_context().get_stage()
async def tearDown(self):
# Close the USD stage.
await omni.usd.get_context().close_stage_async()
self.usd_stage = None
# Clear the example usd interface.
self.example_usd_interface = None
async def test_create_prims(self):
self.example_usd_interface.create_prims()
self.assertTrue(self.usd_stage.GetPrimAtPath("/World/example_prim_0"))
self.assertTrue(self.usd_stage.GetPrimAtPath("/World/example_prim_1"))
self.assertTrue(self.usd_stage.GetPrimAtPath("/World/example_prim_2"))
self.assertTrue(self.usd_stage.GetPrimAtPath("/World/example_prim_3"))
self.assertTrue(self.usd_stage.GetPrimAtPath("/World/example_prim_4"))
self.assertTrue(self.usd_stage.GetPrimAtPath("/World/example_prim_5"))
self.assertTrue(self.usd_stage.GetPrimAtPath("/World/example_prim_6"))
self.assertTrue(self.usd_stage.GetPrimAtPath("/World/example_prim_7"))
self.assertTrue(self.usd_stage.GetPrimAtPath("/World/example_prim_8"))
self.assertFalse(self.usd_stage.GetPrimAtPath("/World/a_random_prim"))
| 1,982 | Python | 43.066666 | 85 | 0.709384 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.usd/python/impl/example_usd_extension.py | ## Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
##
## NVIDIA CORPORATION and its licensors retain all intellectual property
## and proprietary rights in and to this software, related documentation
## and any modifications thereto. Any use, reproduction, disclosure or
## distribution of this software and related documentation without an express
## license agreement from NVIDIA CORPORATION is strictly prohibited.
##
import omni.ext
import omni.usd
from .._example_usd_bindings import *
# Global public interface object.
_example_usd_interface = None
# Public API.
def get_example_usd_interface() -> IExampleUsdInterface:
return _example_usd_interface
# Use the extension entry points to acquire and release the interface,
# and to subscribe to usd stage events.
class ExampleUsdExtension(omni.ext.IExt):
def on_startup(self):
# Acquire the example USD interface.
global _example_usd_interface
_example_usd_interface = acquire_example_usd_interface()
# Inform the C++ plugin if a USD stage is already open.
usd_context = omni.usd.get_context()
if usd_context.get_stage_state() == omni.usd.StageState.OPENED:
_example_usd_interface.on_default_usd_stage_changed(usd_context.get_stage_id())
# Subscribe to omni.usd stage events so we can inform the C++ plugin when a new stage opens.
self._stage_event_sub = usd_context.get_stage_event_stream().create_subscription_to_pop(
self._on_stage_event, name="omni.example.cpp.usd"
)
# Print some info about the stage from C++.
_example_usd_interface.print_stage_info()
# Create some example prims from C++.
_example_usd_interface.create_prims()
# Print some info about the stage from C++.
_example_usd_interface.print_stage_info()
# Animate the example prims from C++.
_example_usd_interface.start_timeline_animation()
def on_shutdown(self):
global _example_usd_interface
# Stop animating the example prims from C++.
_example_usd_interface.stop_timeline_animation()
# Remove the example prims from C++.
_example_usd_interface.remove_prims()
# Unsubscribe from omni.usd stage events.
self._stage_event_sub = None
# Release the example USD interface.
release_example_usd_interface(_example_usd_interface)
_example_usd_interface = None
def _on_stage_event(self, event):
if event.type == int(omni.usd.StageEventType.OPENED):
_example_usd_interface.on_default_usd_stage_changed(omni.usd.get_context().get_stage_id())
elif event.type == int(omni.usd.StageEventType.CLOSED):
_example_usd_interface.on_default_usd_stage_changed(0)
| 2,793 | Python | 37.805555 | 102 | 0.686359 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.usd/bindings/python/omni.example.cpp.usd/ExampleUsdBindings.cpp | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
#include <carb/BindingsPythonUtils.h>
#include <omni/example/cpp/usd/IExampleUsdInterface.h>
CARB_BINDINGS("omni.example.cpp.usd.python")
DISABLE_PYBIND11_DYNAMIC_CAST(omni::example::cpp::usd::IExampleUsdInterface)
namespace
{
// Define the pybind11 module using the same name specified in premake5.lua
PYBIND11_MODULE(_example_usd_bindings, m)
{
using namespace omni::example::cpp::usd;
m.doc() = "pybind11 omni.example.cpp.usd bindings";
carb::defineInterfaceClass<IExampleUsdInterface>(
m, "IExampleUsdInterface", "acquire_example_usd_interface", "release_example_usd_interface")
.def("create_prims", &IExampleUsdInterface::createPrims)
.def("remove_prims", &IExampleUsdInterface::removePrims)
.def("print_stage_info", &IExampleUsdInterface::printStageInfo)
.def("start_timeline_animation", &IExampleUsdInterface::startTimelineAnimation)
.def("stop_timeline_animation", &IExampleUsdInterface::stopTimelineAnimation)
.def("on_default_usd_stage_changed", &IExampleUsdInterface::onDefaultUsdStageChanged)
/**/;
}
}
| 1,530 | C++ | 38.256409 | 100 | 0.752941 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.usd/include/omni/example/cpp/usd/IExampleUsdInterface.h | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
#pragma once
#include <carb/Interface.h>
namespace omni
{
namespace example
{
namespace cpp
{
namespace usd
{
/**
* Interface used to interact with the example C++ USD plugin from Python.
*/
class IExampleUsdInterface
{
public:
/// @private
CARB_PLUGIN_INTERFACE("omni::example::cpp::usd::IExampleUsdInterface", 1, 0);
/**
* Creates some example prims using C++.
*/
virtual void createPrims() = 0;
/**
* Remove the example prims using C++.
*/
virtual void removePrims() = 0;
/**
* Print some info about the currently open USD stage from C++.
*/
virtual void printStageInfo() const = 0;
/**
* Start animating the example prims using the timeline.
*/
virtual void startTimelineAnimation() = 0;
/**
* Stop animating the example prims using the timeline.
*/
virtual void stopTimelineAnimation() = 0;
/**
* Called when the default USD stage (ie. the one open in the main viewport) changes.
* Necessary for now until the omni.usd C++ API becomes ready for public consumption.
*
* @param stageId The id of the new default USD stage.
*/
virtual void onDefaultUsdStageChanged(long stageId) = 0;
};
}
}
}
}
| 1,675 | C | 23.289855 | 89 | 0.678209 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.usd/plugins/omni.example.cpp.usd/ExampleUsdExtension.cpp | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
#define CARB_EXPORTS
#include <carb/PluginUtils.h>
#include <omni/example/cpp/usd/IExampleUsdInterface.h>
#include <omni/ext/ExtensionsUtils.h>
#include <omni/ext/IExt.h>
#include <omni/kit/IApp.h>
#include <omni/timeline/ITimeline.h>
#include <omni/timeline/TimelineTypes.h>
#include <pxr/usd/usd/notice.h>
#include <pxr/usd/usd/stage.h>
#include <pxr/usd/usd/stageCache.h>
#include <pxr/usd/usd/primRange.h>
#include <pxr/usd/usdGeom/metrics.h>
#include <pxr/usd/usdGeom/xform.h>
#include <pxr/usd/usdUtils/stageCache.h>
#include <vector>
const struct carb::PluginImplDesc pluginImplDesc = { "omni.example.cpp.usd.plugin",
"An example C++ extension.", "NVIDIA",
carb::PluginHotReload::eEnabled, "dev" };
namespace omni
{
namespace example
{
namespace cpp
{
namespace usd
{
class ExampleCppUsdExtension : public IExampleUsdInterface
, public PXR_NS::TfWeakBase
{
protected:
void createPrims() override
{
// It is important that all USD stage reads/writes happen from the main thread:
// https ://graphics.pixar.com/usd/release/api/_usd__page__multi_threading.html
if (!m_stage)
{
return;
}
constexpr int numPrimsToCreate = 9;
const float rotationIncrement = 360.0f / (numPrimsToCreate - 1);
for (int i = 0; i < numPrimsToCreate; ++i)
{
// Create a cube prim.
const PXR_NS::SdfPath primPath("/World/example_prim_" + std::to_string(i));
if (m_stage->GetPrimAtPath(primPath))
{
// A prim already exists at this path.
continue;
}
PXR_NS::UsdPrim prim = m_stage->DefinePrim(primPath, PXR_NS::TfToken("Cube"));
// Set the size of the cube prim.
const double cubeSize = 0.5 / PXR_NS::UsdGeomGetStageMetersPerUnit(m_stage);
prim.CreateAttribute(PXR_NS::TfToken("size"), PXR_NS::SdfValueTypeNames->Double).Set(cubeSize);
// Leave the first prim at the origin and position the rest in a circle surrounding it.
if (i == 0)
{
m_primsWithRotationOps.push_back({ prim });
}
else
{
PXR_NS::UsdGeomXformable xformable = PXR_NS::UsdGeomXformable(prim);
// Setup the global rotation operation.
const float initialRotation = rotationIncrement * static_cast<float>(i);
PXR_NS::UsdGeomXformOp globalRotationOp = xformable.AddRotateYOp(PXR_NS::UsdGeomXformOp::PrecisionFloat);
globalRotationOp.Set(initialRotation);
// Setup the translation operation.
const PXR_NS::GfVec3f translation(0.0f, 0.0f, cubeSize * 4.0f);
xformable.AddTranslateOp(PXR_NS::UsdGeomXformOp::PrecisionFloat).Set(translation);
// Setup the local rotation operation.
PXR_NS::UsdGeomXformOp localRotationOp = xformable.AddRotateXOp(PXR_NS::UsdGeomXformOp::PrecisionFloat);
localRotationOp.Set(initialRotation);
// Store the prim and rotation ops so we can update them later in animatePrims().
m_primsWithRotationOps.push_back({ prim, localRotationOp, globalRotationOp });
}
}
// Subscribe to timeline events so we know when to start or stop animating the prims.
if (auto timeline = omni::timeline::getTimeline())
{
m_timelineEventsSubscription = carb::events::createSubscriptionToPop(
timeline->getTimelineEventStream(),
[this](carb::events::IEvent* timelineEvent) {
onTimelineEvent(static_cast<omni::timeline::TimelineEventType>(timelineEvent->type));
});
}
}
void removePrims() override
{
if (!m_stage)
{
return;
}
// Release all event subscriptions.
PXR_NS::TfNotice::Revoke(m_usdNoticeListenerKey);
m_timelineEventsSubscription = nullptr;
m_updateEventsSubscription = nullptr;
// Remove all prims.
for (auto& primWithRotationOps : m_primsWithRotationOps)
{
m_stage->RemovePrim(primWithRotationOps.m_prim.GetPath());
}
m_primsWithRotationOps.clear();
}
void printStageInfo() const override
{
if (!m_stage)
{
return;
}
printf("---Stage Info Begin---\n");
// Print the USD stage's up-axis.
const PXR_NS::TfToken stageUpAxis = PXR_NS::UsdGeomGetStageUpAxis(m_stage);
printf("Stage up-axis is: %s.\n", stageUpAxis.GetText());
// Print the USD stage's meters per unit.
const double metersPerUnit = PXR_NS::UsdGeomGetStageMetersPerUnit(m_stage);
printf("Stage meters per unit: %f.\n", metersPerUnit);
// Print the USD stage's prims.
const PXR_NS::UsdPrimRange primRange = m_stage->Traverse();
for (const PXR_NS::UsdPrim& prim : primRange)
{
printf("Stage contains prim: %s.\n", prim.GetPath().GetString().c_str());
}
printf("---Stage Info End---\n\n");
}
void startTimelineAnimation() override
{
if (auto timeline = omni::timeline::getTimeline())
{
timeline->play();
}
}
void stopTimelineAnimation() override
{
if (auto timeline = omni::timeline::getTimeline())
{
timeline->stop();
}
}
void onDefaultUsdStageChanged(long stageId) override
{
PXR_NS::TfNotice::Revoke(m_usdNoticeListenerKey);
m_timelineEventsSubscription = nullptr;
m_updateEventsSubscription = nullptr;
m_primsWithRotationOps.clear();
m_stage.Reset();
if (stageId)
{
m_stage = PXR_NS::UsdUtilsStageCache::Get().Find(PXR_NS::UsdStageCache::Id::FromLongInt(stageId));
m_usdNoticeListenerKey = PXR_NS::TfNotice::Register(PXR_NS::TfCreateWeakPtr(this), &ExampleCppUsdExtension::onObjectsChanged);
}
}
void onObjectsChanged(const PXR_NS::UsdNotice::ObjectsChanged& objectsChanged)
{
// Check whether any of the prims we created have been (potentially) invalidated.
// This may be too broad a check, but handles prims being removed from the stage.
for (auto& primWithRotationOps : m_primsWithRotationOps)
{
if (!primWithRotationOps.m_invalid &&
objectsChanged.ResyncedObject(primWithRotationOps.m_prim))
{
primWithRotationOps.m_invalid = true;
}
}
}
void onTimelineEvent(omni::timeline::TimelineEventType timelineEventType)
{
switch (timelineEventType)
{
case omni::timeline::TimelineEventType::ePlay:
{
startAnimatingPrims();
}
break;
case omni::timeline::TimelineEventType::eStop:
{
stopAnimatingPrims();
}
break;
default:
{
}
break;
}
}
void startAnimatingPrims()
{
if (m_updateEventsSubscription)
{
// We're already animating the prims.
return;
}
// Subscribe to update events so we can animate the prims.
if (omni::kit::IApp* app = carb::getCachedInterface<omni::kit::IApp>())
{
m_updateEventsSubscription = carb::events::createSubscriptionToPop(app->getUpdateEventStream(), [this](carb::events::IEvent*)
{
onUpdateEvent();
});
}
}
void stopAnimatingPrims()
{
m_updateEventsSubscription = nullptr;
onUpdateEvent(); // Reset positions.
}
void onUpdateEvent()
{
// It is important that all USD stage reads/writes happen from the main thread:
// https ://graphics.pixar.com/usd/release/api/_usd__page__multi_threading.html
if (!m_stage)
{
return;
}
// Update the value of each local and global rotation operation to (crudely) animate the prims around the origin.
const size_t numPrims = m_primsWithRotationOps.size();
const float initialLocalRotationIncrement = 360.0f / (numPrims - 1); // Ignore the first prim at the origin.
const float initialGlobalRotationIncrement = 360.0f / (numPrims - 1); // Ignore the first prim at the origin.
const float currentAnimTime = omni::timeline::getTimeline()->getCurrentTime() * m_stage->GetTimeCodesPerSecond();
for (size_t i = 1; i < numPrims; ++i) // Ignore the first prim at the origin.
{
if (m_primsWithRotationOps[i].m_invalid)
{
continue;
}
PXR_NS::UsdGeomXformOp& localRotationOp = m_primsWithRotationOps[i].m_localRotationOp;
const float initialLocalRotation = initialLocalRotationIncrement * static_cast<float>(i);
const float currentLocalRotation = initialLocalRotation + (360.0f * (currentAnimTime / 100.0f));
localRotationOp.Set(currentLocalRotation);
PXR_NS::UsdGeomXformOp& globalRotationOp = m_primsWithRotationOps[i].m_globalRotationOp;
const float initialGlobalRotation = initialGlobalRotationIncrement * static_cast<float>(i);
const float currentGlobalRotation = initialGlobalRotation - (360.0f * (currentAnimTime / 100.0f));
globalRotationOp.Set(currentGlobalRotation);
}
}
private:
struct PrimWithRotationOps
{
PXR_NS::UsdPrim m_prim;
PXR_NS::UsdGeomXformOp m_localRotationOp;
PXR_NS::UsdGeomXformOp m_globalRotationOp;
bool m_invalid = false;
};
PXR_NS::UsdStageRefPtr m_stage;
PXR_NS::TfNotice::Key m_usdNoticeListenerKey;
std::vector<PrimWithRotationOps> m_primsWithRotationOps;
carb::events::ISubscriptionPtr m_updateEventsSubscription;
carb::events::ISubscriptionPtr m_timelineEventsSubscription;
};
}
}
}
}
CARB_PLUGIN_IMPL(pluginImplDesc, omni::example::cpp::usd::ExampleCppUsdExtension)
void fillInterface(omni::example::cpp::usd::ExampleCppUsdExtension& iface)
{
}
| 10,791 | C++ | 33.925566 | 138 | 0.61505 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.usd/docs/CHANGELOG.md | # Changelog
## [1.0.1] - 2023-04-27
### Updated
- Build against Kit 105.0
## [1.0.0] - 2022-07-07
### Added
- Initial implementation.
| 136 | Markdown | 12.699999 | 25 | 0.610294 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.usd/docs/Overview.md | # Overview
An example C++ extension that can be used as a reference/template for creating new extensions.
Demonstrates how to create a C++ plugin that can interact with the current USD stage by:
- Subscribing to USD stage events from Python.
- Sending the current USD stage id to C++.
- Storing a reference to the USD stage in C++.
- Adding some prims to the USD stage from C++.
- Animating the USD prims each update from C++.
- Printing information about the USD stage from C++.
Note: It is important that all USD stage reads/writes happen from the main thread:
[https://graphics.pixar.com/usd/release/api/_usd__page__multi_threading.html](https://graphics.pixar.com/usd/release/api/_usd__page__multi_threading.html)
# Example

| 775 | Markdown | 32.739129 | 154 | 0.750968 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.hello_world/config/extension.toml | [package]
version = "1.0.0" # Semantic Versioning is used: https://semver.org/
# These fields are used primarily for display in the extension browser UI.
title = "Example C++ Extension: Hello World"
description = "Demonstrates how to create a C++ object that will startup / shutdown along with the extension."
category = "Example"
keywords = ["example", "C++", "cpp"]
icon = "data/icon.png"
preview_image = "data/preview.png"
changelog = "docs/CHANGELOG.md"
readme = "docs/README.md"
authors = ["Anton Novoselov <[email protected]>", "David Bosnich <[email protected]>"]
repository = "https://github.com/NVIDIA-Omniverse/kit-extension-template-cpp"
# Define the Python modules that this extension provides.
# C++ only extensions need this just so tests don't fail.
[[python.module]]
name = "omni.example.cpp.hello_world"
# Define the C++ plugins that this extension provides.
[[native.plugin]]
path = "bin/*.plugin"
# Define the documentation that will be generated for this extension.
[documentation]
pages = [
"docs/Overview.md",
"docs/CHANGELOG.md",
]
| 1,074 | TOML | 33.677418 | 110 | 0.727188 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.hello_world/plugins/omni.example.cpp.hello_world/HelloWorldExtension.cpp | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
#define CARB_EXPORTS
#include <carb/PluginUtils.h>
#include <omni/ext/IExt.h>
#include <omni/kit/IApp.h>
const struct carb::PluginImplDesc pluginImplDesc = { "omni.example.cpp.hello_world.plugin",
"An example C++ extension.", "NVIDIA",
carb::PluginHotReload::eEnabled, "dev" };
CARB_PLUGIN_IMPL_DEPS(omni::kit::IApp)
namespace omni
{
namespace example
{
namespace cpp
{
namespace hello_world
{
// When this extension is enabled, any class that derives from omni.ext.IExt
// will be instantiated and 'onStartup(extId)' called. When the extension is
// later disabled, a matching 'onShutdown()' call will be made on the object.
class ExampleCppHelloWorldExtension : public omni::ext::IExt
{
public:
void onStartup(const char* extId) override
{
printf("ExampleCppHelloWorldExtension starting up (ext_id: %s).\n", extId);
// Get the app interface from the Carbonite Framework.
if (omni::kit::IApp* app = carb::getFramework()->acquireInterface<omni::kit::IApp>())
{
// Subscribe to update events.
m_updateEventsSubscription =
carb::events::createSubscriptionToPop(app->getUpdateEventStream(), [this](carb::events::IEvent*) {
onUpdate();
});
}
}
void onShutdown() override
{
printf("ExampleCppHelloWorldExtension shutting down.\n");
// Unsubscribe from update events.
m_updateEventsSubscription = nullptr;
}
void onUpdate()
{
if (m_updateCounter % 1000 == 0)
{
printf("Hello from the omni.example.cpp.hello_world extension! %d updates counted.\n", m_updateCounter);
}
m_updateCounter++;
}
private:
carb::events::ISubscriptionPtr m_updateEventsSubscription;
int m_updateCounter = 0;
};
}
}
}
}
CARB_PLUGIN_IMPL(pluginImplDesc, omni::example::cpp::hello_world::ExampleCppHelloWorldExtension)
void fillInterface(omni::example::cpp::hello_world::ExampleCppHelloWorldExtension& iface)
{
}
| 2,554 | C++ | 29.058823 | 116 | 0.661316 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.hello_world/docs/Overview.md | # Overview
An example C++ extension that can be used as a reference/template for creating new extensions.
Demonstrates how to create a C++ object that will startup / shutdown along with the extension.
# C++ Usage Examples
## Defining Extensions
```
// When this extension is enabled, any class that derives from omni.ext.IExt
// will be instantiated and 'onStartup(extId)' called. When the extension is
// later disabled, a matching 'onShutdown()' call will be made on the object.
class ExampleCppHelloWorldExtension : public omni::ext::IExt
{
public:
void onStartup(const char* extId) override
{
printf("ExampleCppHelloWorldExtension starting up (ext_id: %s).\n", extId);
if (omni::kit::IApp* app = carb::getFramework()->acquireInterface<omni::kit::IApp>())
{
// Subscribe to update events.
m_updateEventsSubscription =
carb::events::createSubscriptionToPop(app->getUpdateEventStream(), [this](carb::events::IEvent*) {
onUpdate();
});
}
}
void onShutdown() override
{
printf("ExampleCppHelloWorldExtension shutting down.\n");
// Unsubscribe from update events.
m_updateEventsSubscription = nullptr;
}
void onUpdate()
{
if (m_updateCounter % 1000 == 0)
{
printf("Hello from the omni.example.cpp.hello_world extension! %d updates counted.\n", m_updateCounter);
}
m_updateCounter++;
}
private:
carb::events::ISubscriptionPtr m_updateEventsSubscription;
int m_updateCounter = 0;
};
```
| 1,609 | Markdown | 26.75862 | 116 | 0.646364 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.python.usdrt/omni/example/python/usdrt/example_python_usdrt_extension.py | ## Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
##
## NVIDIA CORPORATION and its licensors retain all intellectual property
## and proprietary rights in and to this software, related documentation
## and any modifications thereto. Any use, reproduction, disclosure or
## distribution of this software and related documentation without an express
## license agreement from NVIDIA CORPORATION is strictly prohibited.
##
import math
import random
from ctypes import alignment
import omni.ext
import omni.ui as ui
import omni.usd
from usdrt import Gf, Rt, Sdf, Usd, Vt
try:
wp = None
import warp as wp
wp.init()
@wp.kernel
def deform(positions: wp.array(dtype=wp.vec3), t: float):
tid = wp.tid()
x = positions[tid]
offset = -wp.sin(x[0])
scale = wp.sin(t) * 10.0
x = x + wp.vec3(0.0, offset * scale, 0.0)
positions[tid] = x
except ImportError:
pass
def get_selected_prim_path():
"""Return the path of the first selected prim"""
context = omni.usd.get_context()
selection = context.get_selection()
paths = selection.get_selected_prim_paths()
return None if not paths else paths[0]
def get_stage_id():
"""Return the stage Id of the current stage"""
context = omni.usd.get_context()
return context.get_stage_id()
def is_vtarray(obj):
"""Check if this is a VtArray type
In Python, each data type gets its own
VtArray class i.e. Vt.Float3Array etc.
so this helper identifies any of them.
"""
return hasattr(obj, "IsFabricData")
def condensed_vtarray_str(data):
"""Return a string representing VtArray data
Include at most 6 values, and the total items
in the array
"""
size = len(data)
if size > 6:
datastr = "[{}, {}, {}, .. {}, {}, {}] (size: {})".format(
data[0], data[1], data[2], data[-3], data[-2], data[-1], size
)
else:
datastr = "["
for i in range(size - 1):
datastr += str(data[i]) + ", "
datastr += str(data[-1]) + "]"
return datastr
def get_fabric_data_for_prim(stage_id, path):
"""Get the Fabric data for a path as a string"""
if path is None:
return "Nothing selected"
stage = Usd.Stage.Attach(stage_id)
# If a prim does not already exist in Fabric,
# it will be fetched from USD by simply creating the
# Usd.Prim object. At this time, only the attributes that have
# authored opinions will be fetch into Fabric.
prim = stage.GetPrimAtPath(Sdf.Path(path))
if not prim:
return f"Prim at path {path} is not in Fabric"
# This diverges a bit from USD - only attributes
# that exist in Fabric are returned by this API
attrs = prim.GetAttributes()
result = f"Fabric data for prim at path {path}\n\n\n"
for attr in attrs:
try:
data = attr.Get()
datastr = str(data)
if data is None:
datastr = "<no value>"
elif is_vtarray(data):
datastr = condensed_vtarray_str(data)
except TypeError:
# Some data types not yet supported in Python
datastr = "<no Python conversion>"
result += "{} ({}): {}\n".format(attr.GetName(), str(attr.GetTypeName().GetAsToken()), datastr)
return result
def apply_random_rotation(stage_id, path):
"""Apply a random world space rotation to a prim in Fabric"""
if path is None:
return "Nothing selected"
stage = Usd.Stage.Attach(stage_id)
prim = stage.GetPrimAtPath(Sdf.Path(path))
if not prim:
return f"Prim at path {path} is not in Fabric"
rtxformable = Rt.Xformable(prim)
if not rtxformable.HasWorldXform():
rtxformable.SetWorldXformFromUsd()
angle = random.random() * math.pi * 2
axis = Gf.Vec3f(random.random(), random.random(), random.random()).GetNormalized()
halfangle = angle / 2.0
shalfangle = math.sin(halfangle)
rotation = Gf.Quatf(math.cos(halfangle), axis[0] * shalfangle, axis[1] * shalfangle, axis[2] * shalfangle)
rtxformable.GetWorldOrientationAttr().Set(rotation)
return f"Set new world orientation on {path} to {rotation}"
def deform_mesh_with_warp(stage_id, path, time):
"""Use Warp to deform a Mesh prim"""
if path is None:
return "Nothing selected"
stage = Usd.Stage.Attach(stage_id)
prim = stage.GetPrimAtPath(Sdf.Path(path))
if not prim:
return f"Prim at path {path} is not in Fabric"
if not prim.HasAttribute("points"):
return f"Prim at path {path} does not have points attribute"
if not wp:
return "Warp failed to initialize. Install/Load the warp extension."
# Tell OmniHydra to render points from Fabric
if not prim.HasAttribute("Deformable"):
prim.CreateAttribute("Deformable", Sdf.ValueTypeNames.PrimTypeTag, True)
points = prim.GetAttribute("points")
pointsarray = points.Get()
warparray = wp.array(pointsarray, dtype=wp.vec3, device="cuda")
wp.launch(kernel=deform, dim=len(pointsarray), inputs=[warparray, time], device="cuda")
points.Set(Vt.Vec3fArray(warparray.numpy()))
return f"Deformed points on prim {path}"
# Any class derived from `omni.ext.IExt` in top level module (defined in `python.modules` of `extension.toml`) will be
# instantiated when extension gets enabled and `on_startup(ext_id)` will be called. Later when extension gets disabled
# on_shutdown() is called.
class UsdrtExamplePythonExtension(omni.ext.IExt):
# ext_id is current extension id. It can be used with extension manager to query additional information, like where
# this extension is located on filesystem.
def on_startup(self, ext_id):
print("[omni.example.python.usdrt] startup")
self._window = ui.Window(
"What's in Fabric?", width=300, height=300, dockPreference=ui.DockPreference.RIGHT_BOTTOM
)
self._t = 0
with self._window.frame:
with ui.VStack():
frame = ui.ScrollingFrame()
with frame:
label = ui.Label("Select a prim and push a button", alignment=ui.Alignment.LEFT_TOP)
def get_fabric_data():
label.text = get_fabric_data_for_prim(get_stage_id(), get_selected_prim_path())
def rotate_prim():
label.text = apply_random_rotation(get_stage_id(), get_selected_prim_path())
def deform_prim():
label.text = deform_mesh_with_warp(get_stage_id(), get_selected_prim_path(), self._t)
self._t += 1
ui.Button("What's in Fabric?", clicked_fn=get_fabric_data, height=0)
ui.Button("Rotate it in Fabric!", clicked_fn=rotate_prim, height=0)
ui.Button("Deform it with Warp!", clicked_fn=deform_prim, height=0)
def on_shutdown(self):
print("[omni.example.python.usdrt] shutdown")
| 6,999 | Python | 31.71028 | 119 | 0.632519 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.python.usdrt/omni/example/python/usdrt/__init__.py | from .example_python_usdrt_extension import *
| 46 | Python | 22.499989 | 45 | 0.804348 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.python.usdrt/omni/example/python/usdrt/tests/test_whats_in_fabric.py | ## Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
##
## NVIDIA CORPORATION and its licensors retain all intellectual property
## and proprietary rights in and to this software, related documentation
## and any modifications thereto. Any use, reproduction, disclosure or
## distribution of this software and related documentation without an express
## license agreement from NVIDIA CORPORATION is strictly prohibited.
##
import omni.example.python.usdrt
# omni.kit.test is primarily Python's standard unittest module
# with additional wrapping to add suport for async/await tests.
# Please see: https://docs.python.org/3/library/unittest.html
import omni.kit.test
# The Python module we are testing, imported with an absolute
# path to simulate using it from a different Python extension.
import omni.usd
import usdrt
# Any class that dervives from 'omni.kit.test.AsyncTestCase'
# declared at the root of the module will be auto-discovered,
class ExamplePythonUsdrtTest(omni.kit.test.AsyncTestCase):
async def setUp(self):
# Open a new USD stage.
omni.usd.get_context().new_stage()
self.usd_stage = omni.usd.get_context().get_stage()
self.stage_id = omni.usd.get_context().get_stage_id()
# create a torus
(success, pathString) = omni.kit.commands.execute("CreateMeshPrimWithDefaultXformCommand", prim_type="Torus")
self.assertTrue(success)
self.prim_path = pathString
async def tearDown(self):
# Close the USD stage.
await omni.usd.get_context().close_stage_async()
self.usd_stage = None
async def test_get_fabric_data_for_prim(self):
result = omni.example.python.usdrt.get_fabric_data_for_prim(self.stage_id, self.prim_path)
self.assertTrue("Fabric data for prim at path %s\n\n\n" % self.prim_path in result)
for attr in ["points", "normals", "primvars:st", "extent"]:
self.assertTrue(attr in result)
# test invalid prim
result = omni.example.python.usdrt.get_fabric_data_for_prim(self.stage_id, "/invalidPrim")
self.assertTrue(result == "Prim at path /invalidPrim is not in Fabric")
# test empty path
result = omni.example.python.usdrt.get_fabric_data_for_prim(self.stage_id, None)
self.assertTrue(result == "Nothing selected")
async def test_apply_random_rotation(self):
result = omni.example.python.usdrt.apply_random_rotation(self.stage_id, self.prim_path)
self.assertTrue("Set new world orientation on %s to (" % self.prim_path in result)
# test invalid prim
result = omni.example.python.usdrt.apply_random_rotation(self.stage_id, "/invalidPrim")
self.assertTrue(result == "Prim at path /invalidPrim is not in Fabric")
# test empty path
result = omni.example.python.usdrt.apply_random_rotation(self.stage_id, None)
self.assertTrue(result == "Nothing selected")
async def test_deform_mesh_with_warp(self):
try:
import warp
t = 0
result = omni.example.python.usdrt.deform_mesh_with_warp(self.stage_id, self.prim_path, t)
self.assertTrue(result == f"Deformed points on prim {self.prim_path}")
# test invalid prim
result = omni.example.python.usdrt.deform_mesh_with_warp(self.stage_id, "/invalidPrim", t)
self.assertTrue(result == "Prim at path /invalidPrim is not in Fabric")
# test empty path
result = omni.example.python.usdrt.deform_mesh_with_warp(self.stage_id, None, t)
self.assertTrue(result == "Nothing selected")
except ImportError:
pass
| 3,687 | Python | 41.390804 | 117 | 0.681584 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.python.usdrt/docs/CHANGELOG.md | # Changelog
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [1.0.1] - 2022-10-07
- More cleanup for publish retry
## [1.0.0] - 2022-10-06
- Cleanup and publish for documentation example
## [0.1.0] - 2022-05-31
- Initial version
| 271 | Markdown | 15.999999 | 80 | 0.667897 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.python.usdrt/docs/Overview.md | # What's in Fabric? USDRT Scenegraph API example [omni.example.python.usdrt]
This is an example Kit extension using the USDRT Scenegraph API. This Python
extension demonstrates the following:
- Inspecting Fabric data using the USDRT Scenegraph API
- Manipulating prim transforms in Fabric using the RtXformable schema
- Deforming Mesh geometry on the GPU with USDRT and Warp
| 377 | Markdown | 40.999995 | 76 | 0.811671 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.omnigraph_node/config/extension.toml | [package]
version = "1.0.1" # Semantic Versioning is used: https://semver.org/
# These fields are used primarily for display in the extension browser UI.
title = "Example C++ Extension: OmniGraph Node"
description = "Demonstrates how to create a C++ node for OmniGraph"
category = "Example"
keywords = ["example", "C++", "cpp", "Graph", "Node", "OmniGraph"]
icon = "data/icon.png"
preview_image = "data/preview.png"
changelog = "docs/CHANGELOG.md"
readme = "docs/README.md"
authors = ["Kevin Picott <[email protected]>", "David Bosnich <[email protected]>"]
repository = "https://github.com/NVIDIA-Omniverse/kit-extension-template-cpp"
[dependencies]
"omni.graph.core" = {}
"omni.graph.tools" = {}
[[python.module]]
name = "omni.example.cpp.omnigraph_node"
[[native.plugin]]
path = "bin/*.plugin"
[documentation]
pages = [
"docs/Overview.md",
"docs/CHANGELOG.md",
]
| 883 | TOML | 27.516128 | 86 | 0.697622 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.omnigraph_node/plugins/omni.example.cpp.omnigraph_node/ExampleOmniGraphNodeExtension.cpp | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
#define CARB_EXPORTS
#include <carb/PluginUtils.h>
#include <omni/ext/IExt.h>
#include <omni/graph/core/IGraphRegistry.h>
#include <omni/graph/core/ogn/Database.h>
#include <omni/graph/core/ogn/Registration.h>
// Standard plugin definitions required by Carbonite.
const struct carb::PluginImplDesc pluginImplDesc = { "omni.example.cpp.omnigraph_node.plugin",
"An example C++ extension.", "NVIDIA",
carb::PluginHotReload::eEnabled, "dev" };
// These interface dependencies are required by all OmniGraph node types
CARB_PLUGIN_IMPL_DEPS(omni::graph::core::IGraphRegistry,
omni::fabric::IPath,
omni::fabric::IToken)
// This macro sets up the information required to register your node type definitions with OmniGraph
DECLARE_OGN_NODES()
namespace omni
{
namespace example
{
namespace cpp
{
namespace omnigraph_node
{
class ExampleOmniGraphNodeExtension : public omni::ext::IExt
{
public:
void onStartup(const char* extId) override
{
printf("ExampleOmniGraphNodeExtension starting up (ext_id: %s).\n", extId);
// This macro walks the list of pending node type definitions and registers them with OmniGraph
INITIALIZE_OGN_NODES()
}
void onShutdown() override
{
printf("ExampleOmniGraphNodeExtension shutting down.\n");
// This macro walks the list of registered node type definitions and deregisters all of them. This is required
// for hot reload to work.
RELEASE_OGN_NODES()
}
private:
};
}
}
}
}
CARB_PLUGIN_IMPL(pluginImplDesc, omni::example::cpp::omnigraph_node::ExampleOmniGraphNodeExtension)
void fillInterface(omni::example::cpp::omnigraph_node::ExampleOmniGraphNodeExtension& iface)
{
}
| 2,269 | C++ | 30.527777 | 118 | 0.698986 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.omnigraph_node/plugins/nodes/OgnExampleNode.cpp | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
#include <OgnExampleNodeDatabase.h>
// Helpers to explicit shorten names you know you will use
using omni::graph::core::Type;
using omni::graph::core::BaseDataType;
namespace omni {
namespace example {
namespace cpp {
namespace omnigraph_node {
class OgnExampleNode
{
public:
static bool compute(OgnExampleNodeDatabase& db)
{
// The database has a few useful utilities that simplify common operations such as converting strings to tokens
static auto pointsToken = db.stringToToken("points");
// This is how to extract a single-valued attribute. The return values for db.inputs.XXX() are
// const-ref accessors that provide an interface to the actual data. For simple values it can be
// considered to be the POD type so this line would be equivalent to:
// const bool& disableOffset = db.inputs.disable();
const auto& disableOffset = db.inputs.disable();
// This is how to extract an output array attribute. It returns an accessor that behaves basically the same as
// the std::array type, except that the data is managed by Fabric. It further adds the ability to set the array
// size explicitly, required to ensure that Fabric has enough space allocated for the attribute data.
// Since this is an output the reference is no longer a const, enabling modification of the data to which it
// provides access.
auto& points = db.outputs.points();
// Attributes with well-defined types, like float/float[3], cast by default to the USD data types, however you
// can use any binary compatible types you have. See the .ogn documentation on type configurations to see how
// to change types. For bundle members and extended types whose type is determined at runtime the types are all
// POD types (though they can also be cast to other types at runtime if they are easier to use)
pxr::GfVec3f pointOffset{ 0.0f, 0.0f, 0.0f };
// This is how to extract a variable-typed input attribute. By default if the type has not been resolved to
// one of the legal types, in this case float[3] or float, the compute() will not be called. You can
// add "unvalidated":true to the attribute definition and handle the case of unresolved types here.
// The return value is an accessor that provides type information and the cast operators to get the
// resolved data types.
const auto& offsetValue = db.inputs.offset();
if (auto floatOffset = offsetValue.get<float>())
{
// The data received back from the "get<>()" method is an accessor that provides a boolean operator,
// which did the type compatibility test that got us into this section of the "if", and an indirection
// operator that returns a reference to data of the type that was matched (float in this case).
pointOffset = pxr::GfVec3f{*floatOffset, *floatOffset, *floatOffset};
std::cout << "Got a float value of " << *floatOffset << std::endl;
}
// Repeat the same process of checking and applying for the other accepted value type of float[3]
else if (auto float3Offset = offsetValue.get<float[3]>())
{
pointOffset = pxr::GfVec3f{*float3Offset};
std::cout << "Got a float[3] value of " << pointOffset[0] << ", " << pointOffset[1] << ", " << pointOffset[2] << std::endl;
}
else
{
// If the resolved type was not one of the recognized one then something went wrong and the node is
// incapable of computing so log an error and return false.
db.logError("Unrecognized offset type %s", offsetValue.typeName().c_str());
return false;
}
// -------------------------------------------------------------------------------------------------------------
// With only a few accepted data types you can use the cascading "if" cast method above. If you have a lot of
// types being accepted then you should use a switch statement on the attribute type like this, as it has much
// better performance.
// const auto& type = offsetValue.type();
// switch (type.baseDataType)
// {
// case BaseDataType::eFloat:
// if ((type.componentCount == 1) and (type.arrayDepth == 0))
// {
// return handleFloatValue();
// }
// if ((type.componentCount == 3) and (type.arrayDepth == 0))
// {
// return handleFloat3Value();
// }
// }
// db.logError("Unrecognized offset type %s", offsetValue.typeName().c_str());
// return false;
// -------------------------------------------------------------------------------------------------------------
// This is how to extract an input bundle attribute. It returns an accessor that lets you inspect the bundle
// contents and the values of the attributes in the bundle.
const auto& bundleWithGeometry = db.inputs.geometry();
// The accessor supports a range-based for-loop for iterating over members. Since the output has to have a
// fixed size there is a first pass here just to count the matching members.
size_t numPointsToOffset{ 0 };
for (auto const& bundleMember : bundleWithGeometry)
{
auto inputPoint = bundleMember.get<float[3]>();
// The member accessor supports a boolean operator indicating if it is valid, meaning the type is
// compatible with the templated type with which it was extracted (float[3]).
if (inputPoint)
{
numPointsToOffset++;
}
}
// Now that all values are accessible the actual computation can happen.
//
// Output arrays must always be first resized to be the total number of entries they will eventually
// contain. Repeated resizing can be expensive so it's best to do it once up front.
points.resize(numPointsToOffset);
// The array accessor provides the common definitions that allow range-based for loops
size_t pointIndex{ 0 };
for (auto const& bundleMember : bundleWithGeometry)
{
auto inputPoint = bundleMember.get<float[3]>();
if (! inputPoint)
{
continue;
}
auto& point = points[pointIndex++];
point = pxr::GfVec3f(inputPoint);
if (! disableOffset)
{
point += pointOffset;
}
pointIndex++;
}
// Returning true tells Omnigraph that the compute was successful and the output value is now valid.
return true;
}
};
// This macro provides the information necessary to OmniGraph that lets it automatically register and deregister
// your node type definition.
REGISTER_OGN_NODE()
} // omnigraph_node
} // cpp
} // example
} // omni
| 7,538 | C++ | 49.26 | 135 | 0.620854 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.omnigraph_node/docs/Overview.md | ```{csv-table}
**Extension**: {{ extension_version }},**Documentation Generated**: {sub-ref}`today`,{ref}`changelog_omni_example_cpp_omnigraph_node`
```
(ext_omni_example_cpp_omnigraph_node)=
# Overview
An example C++ extension that can be used as a reference/template for creating new extensions.
Demonstrates how to create a C++ node for omni.graph
| 356 | Markdown | 26.461536 | 133 | 0.730337 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.pybind/python/tests/test_pybind_example.py | ## Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
##
## NVIDIA CORPORATION and its licensors retain all intellectual property
## and proprietary rights in and to this software, related documentation
## and any modifications thereto. Any use, reproduction, disclosure or
## distribution of this software and related documentation without an express
## license agreement from NVIDIA CORPORATION is strictly prohibited.
##
import omni.kit.test
import omni.example.cpp.pybind
class TestPybindExample(omni.kit.test.AsyncTestCase):
async def setUp(self):
# Cache the pybind interface.
self.bound_interface = omni.example.cpp.pybind.get_bound_interface()
# Create and register a bound object.
self.bound_object = omni.example.cpp.pybind.BoundObject("test_bound_object")
self.bound_object.property_int = 9
self.bound_object.property_bool = True
self.bound_object.property_string = "Ninety-Nine"
self.bound_interface.register_bound_object(self.bound_object)
async def tearDown(self):
# Deregister and clear the bound object.
self.bound_interface.deregister_bound_object(self.bound_object)
self.bound_object = None
# Clear the pybind interface.
self.bound_interface = None
async def test_find_bound_object(self):
found_object = self.bound_interface.find_bound_object("test_bound_object")
self.assertIsNotNone(found_object)
async def test_find_unregistered_bound_object(self):
found_object = self.bound_interface.find_bound_object("unregistered_object")
self.assertIsNone(found_object)
async def test_access_bound_object_properties(self):
self.assertEqual(self.bound_object.id, "test_bound_object")
self.assertEqual(self.bound_object.property_int, 9)
self.assertEqual(self.bound_object.property_bool, True)
self.assertEqual(self.bound_object.property_string, "Ninety-Nine")
async def test_call_bound_object_functions(self):
# Test calling a bound function that accepts an argument.
self.bound_object.multiply_int_property(9)
self.assertEqual(self.bound_object.property_int, 81)
# Test calling a bound function that returns a value.
result = self.bound_object.toggle_bool_property()
self.assertEqual(result, False)
self.assertEqual(self.bound_object.property_bool, False)
# Test calling a bound function that accepts an argument and returns a value.
result = self.bound_object.append_string_property(" Red Balloons")
self.assertEqual(result, "Ninety-Nine Red Balloons")
self.assertEqual(self.bound_object.property_string, "Ninety-Nine Red Balloons")
| 2,746 | Python | 43.306451 | 87 | 0.714494 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.pybind/python/impl/example_pybind_extension.py | ## Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
##
## NVIDIA CORPORATION and its licensors retain all intellectual property
## and proprietary rights in and to this software, related documentation
## and any modifications thereto. Any use, reproduction, disclosure or
## distribution of this software and related documentation without an express
## license agreement from NVIDIA CORPORATION is strictly prohibited.
##
import omni.ext
from .._example_pybind_bindings import *
# Global public interface object.
_bound_interface = None
# Public API.
def get_bound_interface() -> IExampleBoundInterface:
return _bound_interface
# Use the extension entry points to acquire and release the interface.
class ExamplePybindExtension(omni.ext.IExt):
def __init__(self):
super().__init__()
global _bound_interface
_bound_interface = acquire_bound_interface()
def on_shutdown(self):
global _bound_interface
release_bound_interface(_bound_interface)
_bound_interface = None
| 1,045 | Python | 31.687499 | 77 | 0.733014 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.pybind/bindings/python/omni.example.cpp.pybind/ExamplePybindBindings.cpp | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
#include <carb/BindingsPythonUtils.h>
#include <omni/example/cpp/pybind/ExampleBoundObject.h>
#include <omni/example/cpp/pybind/IExampleBoundInterface.h>
#include <string>
CARB_BINDINGS("omni.example.cpp.pybind.python")
DISABLE_PYBIND11_DYNAMIC_CAST(omni::example::cpp::pybind::IExampleBoundInterface)
DISABLE_PYBIND11_DYNAMIC_CAST(omni::example::cpp::pybind::IExampleBoundObject)
namespace
{
/**
* Concrete bound object class that will be reflected to Python.
*/
class PythonBoundObject : public omni::example::cpp::pybind::ExampleBoundObject
{
public:
/**
* Factory.
*
* @param id Id of the bound action.
*
* @return The bound object that was created.
*/
static carb::ObjectPtr<PythonBoundObject> create(const char* id)
{
// Note: It is important to construct the handler using ObjectPtr<T>::InitPolicy::eSteal,
// otherwise we end up incresing the reference count by one too many during construction,
// resulting in carb::ObjectPtr<T> instance whose wrapped object will never be destroyed.
return carb::stealObject<PythonBoundObject>(new PythonBoundObject(id));
}
/**
* Constructor.
*
* @param id Id of the bound object.
*/
PythonBoundObject(const char* id)
: ExampleBoundObject(id)
, m_memberInt(0)
, m_memberBool(false)
, m_memberString()
{
}
// To deomnstrate binding a fuction that accepts an argument.
void multiplyIntProperty(int value)
{
m_memberInt *= value;
}
// To deomnstrate binding a fuction that returns a value.
bool toggleBoolProperty()
{
m_memberBool = !m_memberBool;
return m_memberBool;
}
// To deomnstrate binding a fuction that accepts an argument and returns a value.
const char* appendStringProperty(const char* value)
{
m_memberString += value;
return m_memberString.c_str();
}
// To deomnstrate binding properties using accessors.
const char* getMemberString() const
{
return m_memberString.c_str();
}
// To deomnstrate binding properties using accessors.
void setMemberString(const char* value)
{
m_memberString = value;
}
// To deomnstrate binding properties directly.
int m_memberInt;
bool m_memberBool;
private:
// To deomnstrate binding properties using accessors.
std::string m_memberString;
};
// Define the pybind11 module using the same name specified in premake5.lua
PYBIND11_MODULE(_example_pybind_bindings, m)
{
using namespace omni::example::cpp::pybind;
m.doc() = "pybind11 omni.example.cpp.pybind bindings";
carb::defineInterfaceClass<IExampleBoundInterface>(
m, "IExampleBoundInterface", "acquire_bound_interface", "release_bound_interface")
.def("register_bound_object", &IExampleBoundInterface::registerBoundObject,
R"(
Register a bound object.
Args:
object: The bound object to register.
)",
py::arg("object"))
.def("deregister_bound_object", &IExampleBoundInterface::deregisterBoundObject,
R"(
Deregister a bound object.
Args:
object: The bound object to deregister.
)",
py::arg("object"))
.def("find_bound_object", &IExampleBoundInterface::findBoundObject, py::return_value_policy::reference,
R"(
Find a bound object.
Args:
id: Id of the bound object.
Return:
The bound object if it exists, an empty object otherwise.
)",
py::arg("id"))
/**/;
py::class_<IExampleBoundObject, carb::ObjectPtr<IExampleBoundObject>>(m, "IExampleBoundObject")
.def_property_readonly("id", &IExampleBoundObject::getId, py::return_value_policy::reference,
R"(
Get the id of this bound object.
Return:
The id of this bound object.
)")
/**/;
py::class_<PythonBoundObject, IExampleBoundObject, carb::ObjectPtr<PythonBoundObject>>(m, "BoundObject")
.def(py::init([](const char* id) { return PythonBoundObject::create(id); }),
R"(
Create a bound object.
Args:
id: Id of the bound object.
Return:
The bound object that was created.
)",
py::arg("id"))
.def_readwrite("property_int", &PythonBoundObject::m_memberInt,
R"(
Int property bound directly.
)")
.def_readwrite("property_bool", &PythonBoundObject::m_memberBool,
R"(
Bool property bound directly.
)")
.def_property("property_string", &PythonBoundObject::getMemberString, &PythonBoundObject::setMemberString, py::return_value_policy::reference,
R"(
String property bound using accessors.
)")
.def("multiply_int_property", &PythonBoundObject::multiplyIntProperty,
R"(
Bound fuction that accepts an argument.
Args:
value_to_multiply: The value to multiply by.
)",
py::arg("value_to_multiply"))
.def("toggle_bool_property", &PythonBoundObject::toggleBoolProperty,
R"(
Bound fuction that returns a value.
Return:
The toggled bool value.
)")
.def("append_string_property", &PythonBoundObject::appendStringProperty, py::return_value_policy::reference,
R"(
Bound fuction that accepts an argument and returns a value.
Args:
value_to_append: The value to append.
Return:
The new string value.
)",
py::arg("value_to_append"))
/**/;
}
}
| 6,447 | C++ | 31.079602 | 150 | 0.607725 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.pybind/include/omni/example/cpp/pybind/IExampleBoundInterface.h | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
#pragma once
#include <omni/example/cpp/pybind/IExampleBoundObject.h>
#include <carb/Interface.h>
namespace omni
{
namespace example
{
namespace cpp
{
namespace pybind
{
/**
* An example interface to demonstrate reflection using pybind.
*/
class IExampleBoundInterface
{
public:
/// @private
CARB_PLUGIN_INTERFACE("omni::example::cpp::pybind::IExampleBoundInterface", 1, 0);
/**
* Register a bound object.
*
* @param object The bound object to register.
*/
virtual void registerBoundObject(carb::ObjectPtr<IExampleBoundObject>& object) = 0;
/**
* Deregister a bound object.
*
* @param object The bound object to deregister.
*/
virtual void deregisterBoundObject(carb::ObjectPtr<IExampleBoundObject>& object) = 0;
/**
* Find a bound object.
*
* @param id Id of the bound object.
*
* @return The bound object if it exists, an empty ObjectPtr otherwise.
*/
virtual carb::ObjectPtr<IExampleBoundObject> findBoundObject(const char* id) const = 0;
};
}
}
}
}
| 1,500 | C | 23.606557 | 91 | 0.704 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.pybind/include/omni/example/cpp/pybind/ExampleBoundObject.h | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
#pragma once
#include <omni/example/cpp/pybind/IExampleBoundObject.h>
#include <carb/ObjectUtils.h>
#include <omni/String.h>
namespace omni
{
namespace example
{
namespace cpp
{
namespace pybind
{
/**
* Helper base class for bound object implementations.
*/
class ExampleBoundObject : public IExampleBoundObject
{
CARB_IOBJECT_IMPL
public:
/**
* Constructor.
*
* @param id Id of the bound object.
*/
ExampleBoundObject(const char* id)
: m_id(id ? id : "")
{
}
/**
* @ref IExampleBoundObject::getId
*/
const char* getId() const override
{
return m_id.c_str();
}
protected:
const omni::string m_id; //!< Id of the bound object.
};
}
}
}
}
| 1,169 | C | 18.5 | 77 | 0.681779 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.pybind/include/omni/example/cpp/pybind/IExampleBoundObject.h | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
#pragma once
#include <carb/IObject.h>
namespace omni
{
namespace example
{
namespace cpp
{
namespace pybind
{
/**
* Pure virtual bound object interface.
*/
class IExampleBoundObject : public carb::IObject
{
public:
/**
* Get the id of this object.
*
* @return Id of this object.
*/
virtual const char* getId() const = 0;
};
/**
* Implement the equality operator so these can be used in std containers.
*/
inline bool operator==(const carb::ObjectPtr<IExampleBoundObject>& left,
const carb::ObjectPtr<IExampleBoundObject>& right) noexcept
{
return (left.get() == right.get());
}
}
}
}
}
| 1,086 | C | 21.183673 | 82 | 0.70442 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.pybind/config/extension.toml | [package]
version = "1.0.1" # Semantic Versioning is used: https://semver.org/
# These fields are used primarily for display in the extension browser UI.
title = "Example C++ Extension: pybind"
description = "Demonstrates how to reflect C++ code using pybind11 so that it can be called from Python code."
category = "Example"
keywords = ["example", "C++", "cpp", "pybind"]
icon = "data/icon.png"
preview_image = "data/preview.png"
changelog = "docs/CHANGELOG.md"
readme = "docs/README.md"
authors = ["David Bosnich <[email protected]>"]
repository = "https://github.com/NVIDIA-Omniverse/kit-extension-template-cpp"
# Define the Python modules that this extension provides.
[[python.module]]
name = "omni.example.cpp.pybind"
# Define the C++ plugins that this extension provides.
[[native.plugin]]
path = "bin/*.plugin"
# Define any test specific properties of this extension.
[[test]]
cppTests.libraries = [
"bin/${lib_prefix}omni.example.cpp.pybind.tests${lib_ext}"
]
# Define the documentation that will be generated for this extension.
[documentation]
pages = [
"docs/Overview.md",
"docs/CHANGELOG.md",
]
cpp_api = [
"include/omni/example/cpp/pybind/IExampleBoundInterface.h",
"include/omni/example/cpp/pybind/IExampleBoundObject.h",
"include/omni/example/cpp/pybind/ExampleBoundObject.h",
]
| 1,330 | TOML | 31.463414 | 110 | 0.72406 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.pybind/plugins/omni.example.cpp.pybind.tests/ExamplePybindTests.cpp | // Copyright (c) 2020-2021, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
#include <omni/example/cpp/pybind/IExampleBoundInterface.h>
#include <omni/example/cpp/pybind/ExampleBoundObject.h>
#include <doctest/doctest.h>
#include <carb/BindingsUtils.h>
CARB_BINDINGS("omni.example.cpp.pybind.tests")
namespace omni
{
namespace example
{
namespace cpp
{
namespace pybind
{
class ExampleCppObject : public ExampleBoundObject
{
public:
static carb::ObjectPtr<IExampleBoundObject> create(const char* id)
{
return carb::stealObject<IExampleBoundObject>(new ExampleCppObject(id));
}
ExampleCppObject(const char* id)
: ExampleBoundObject(id)
{
}
};
class ExamplePybindTestFixture
{
public:
static constexpr const char* k_registeredObjectId = "example_bound_object";
ExamplePybindTestFixture()
: m_exampleBoundInterface(carb::getCachedInterface<omni::example::cpp::pybind::IExampleBoundInterface>())
, m_exampleBoundObject(ExampleCppObject::create(k_registeredObjectId))
{
m_exampleBoundInterface->registerBoundObject(m_exampleBoundObject);
}
~ExamplePybindTestFixture()
{
m_exampleBoundInterface->deregisterBoundObject(m_exampleBoundObject);
}
protected:
IExampleBoundInterface* getExampleBoundInterface()
{
return m_exampleBoundInterface;
}
carb::ObjectPtr<IExampleBoundObject> getExampleBoundObject()
{
return m_exampleBoundObject;
}
private:
IExampleBoundInterface* m_exampleBoundInterface = nullptr;
carb::ObjectPtr<IExampleBoundObject> m_exampleBoundObject;
};
}
}
}
}
TEST_SUITE("omni.example.cpp.pybind.tests")
{
using namespace omni::example::cpp::pybind;
TEST_CASE_FIXTURE(ExamplePybindTestFixture, "Get Example Bound Interface")
{
CHECK(getExampleBoundInterface() != nullptr);
}
TEST_CASE_FIXTURE(ExamplePybindTestFixture, "Get Example Bound Object")
{
CHECK(getExampleBoundObject().get() != nullptr);
}
TEST_CASE_FIXTURE(ExamplePybindTestFixture, "Find Example Bound Object")
{
SUBCASE("Registered")
{
carb::ObjectPtr<IExampleBoundObject> foundObject = getExampleBoundInterface()->findBoundObject(k_registeredObjectId);
CHECK(foundObject.get() == getExampleBoundObject().get());
CHECK(foundObject.get() != nullptr);
}
SUBCASE("Unregistered")
{
carb::ObjectPtr<IExampleBoundObject> foundObject = getExampleBoundInterface()->findBoundObject("unregistered_object_id");
CHECK(foundObject.get() != getExampleBoundObject().get());
CHECK(foundObject.get() == nullptr);
}
}
}
| 3,079 | C++ | 26.747748 | 133 | 0.708996 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.pybind/plugins/omni.example.cpp.pybind/ExamplePybindExtension.cpp | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
#define CARB_EXPORTS
#include <carb/PluginUtils.h>
#include <omni/ext/IExt.h>
#include <omni/example/cpp/pybind/IExampleBoundInterface.h>
#include <unordered_map>
const struct carb::PluginImplDesc pluginImplDesc = { "omni.example.cpp.pybind.plugin",
"An example C++ extension.", "NVIDIA",
carb::PluginHotReload::eEnabled, "dev" };
namespace omni
{
namespace example
{
namespace cpp
{
namespace pybind
{
class ExampleBoundImplementation : public IExampleBoundInterface
{
public:
void registerBoundObject(carb::ObjectPtr<IExampleBoundObject>& object) override
{
if (object)
{
m_registeredObjectsById[object->getId()] = object;
}
}
void deregisterBoundObject(carb::ObjectPtr<IExampleBoundObject>& object) override
{
if (object)
{
const auto& it = m_registeredObjectsById.find(object->getId());
if (it != m_registeredObjectsById.end())
{
m_registeredObjectsById.erase(it);
}
}
}
carb::ObjectPtr<IExampleBoundObject> findBoundObject(const char* id) const override
{
const auto& it = m_registeredObjectsById.find(id);
if (it != m_registeredObjectsById.end())
{
return it->second;
}
return carb::ObjectPtr<IExampleBoundObject>();
}
private:
std::unordered_map<std::string, carb::ObjectPtr<IExampleBoundObject>> m_registeredObjectsById;
};
}
}
}
}
CARB_PLUGIN_IMPL(pluginImplDesc, omni::example::cpp::pybind::ExampleBoundImplementation)
void fillInterface(omni::example::cpp::pybind::ExampleBoundImplementation& iface)
{
}
| 2,187 | C++ | 26.012345 | 98 | 0.657522 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.pybind/docs/Overview.md | # Overview
An example C++ extension that can be used as a reference/template for creating new extensions.
Demonstrates how to reflect C++ code using pybind11 so that it can be called from Python code.
The IExampleBoundInterface located in `include/omni/example/cpp/pybind/IExampleBoundInterface.h` is:
- Implemented in `plugins/omni.example.cpp.pybind/ExamplePybindExtension.cpp`.
- Reflected in `bindings/python/omni.example.cpp.pybind/ExamplePybindBindings.cpp`.
- Accessed from Python in `python/tests/test_pybind_example.py` via `python/impl/example_pybind_extension.py`.
# C++ Usage Examples
## Defining Pybind Module
```
PYBIND11_MODULE(_example_pybind_bindings, m)
{
using namespace omni::example::cpp::pybind;
m.doc() = "pybind11 omni.example.cpp.pybind bindings";
carb::defineInterfaceClass<IExampleBoundInterface>(
m, "IExampleBoundInterface", "acquire_bound_interface", "release_bound_interface")
.def("register_bound_object", &IExampleBoundInterface::registerBoundObject,
R"(
Register a bound object.
Args:
object: The bound object to register.
)",
py::arg("object"))
.def("deregister_bound_object", &IExampleBoundInterface::deregisterBoundObject,
R"(
Deregister a bound object.
Args:
object: The bound object to deregister.
)",
py::arg("object"))
.def("find_bound_object", &IExampleBoundInterface::findBoundObject, py::return_value_policy::reference,
R"(
Find a bound object.
Args:
id: Id of the bound object.
Return:
The bound object if it exists, an empty object otherwise.
)",
py::arg("id"))
/**/;
py::class_<IExampleBoundObject, carb::ObjectPtr<IExampleBoundObject>>(m, "IExampleBoundObject")
.def_property_readonly("id", &IExampleBoundObject::getId, py::return_value_policy::reference,
R"(
Get the id of this bound object.
Return:
The id of this bound object.
)")
/**/;
py::class_<PythonBoundObject, IExampleBoundObject, carb::ObjectPtr<PythonBoundObject>>(m, "BoundObject")
.def(py::init([](const char* id) { return PythonBoundObject::create(id); }),
R"(
Create a bound object.
Args:
id: Id of the bound object.
Return:
The bound object that was created.
)",
py::arg("id"))
.def_readwrite("property_int", &PythonBoundObject::m_memberInt,
R"(
Int property bound directly.
)")
.def_readwrite("property_bool", &PythonBoundObject::m_memberBool,
R"(
Bool property bound directly.
)")
.def_property("property_string", &PythonBoundObject::getMemberString, &PythonBoundObject::setMemberString, py::return_value_policy::reference,
R"(
String property bound using accessors.
)")
.def("multiply_int_property", &PythonBoundObject::multiplyIntProperty,
R"(
Bound fuction that accepts an argument.
Args:
value_to_multiply: The value to multiply by.
)",
py::arg("value_to_multiply"))
.def("toggle_bool_property", &PythonBoundObject::toggleBoolProperty,
R"(
Bound fuction that returns a value.
Return:
The toggled bool value.
)")
.def("append_string_property", &PythonBoundObject::appendStringProperty, py::return_value_policy::reference,
R"(
Bound fuction that accepts an argument and returns a value.
Args:
value_to_append: The value to append.
Return:
The new string value.
)",
py::arg("value_to_append"))
/**/;
}
```
| 4,125 | Markdown | 33.099173 | 150 | 0.575273 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.usd_physics/plugins/omni.example.cpp.usd_physics/ExampleUsdPhysicsExtension.cpp | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
#define CARB_EXPORTS
#include <carb/PluginUtils.h>
#include <omni/ext/IExt.h>
#include <pxr/usd/usd/stage.h>
#include <pxr/usd/usdGeom/cube.h>
#include <pxr/usd/usdGeom/metrics.h>
#include <pxr/usd/usdPhysics/collisionAPI.h>
#include <pxr/usd/usdPhysics/massAPI.h>
#include <pxr/usd/usdPhysics/rigidBodyAPI.h>
#include <pxr/usd/usdPhysics/scene.h>
#include <pxr/usd/usdUtils/stageCache.h>
const struct carb::PluginImplDesc pluginImplDesc = { "omni.example.cpp.usd_physics.plugin",
"An example C++ extension.", "NVIDIA",
carb::PluginHotReload::eEnabled, "dev" };
namespace omni
{
namespace example
{
namespace cpp
{
namespace usd_physics
{
class ExampleUsdPhysicsExtension : public omni::ext::IExt
{
protected:
void onStartup(const char* extId) override
{
// Get the 'active' USD stage from the USD stage cache.
const std::vector<PXR_NS::UsdStageRefPtr> allStages = PXR_NS::UsdUtilsStageCache::Get().GetAllStages();
if (allStages.size() != 1)
{
CARB_LOG_WARN("Cannot determine the 'active' USD stage (%zu stages present in the USD stage cache).", allStages.size());
return;
}
// Get the meters per unit and up axis of the 'active' USD stage.
PXR_NS::UsdStageRefPtr activeStage = allStages[0];
const double activeStageMetersPerUnit = PXR_NS::UsdGeomGetStageMetersPerUnit(activeStage);
if (PXR_NS::UsdGeomGetStageUpAxis(activeStage) != PXR_NS::UsdGeomTokens->y)
{
// Handling this is possible, but it would complicate the example,
// that is only designed to work in an empty stage with Y-axis up.
CARB_LOG_WARN("The up axis of the 'active' USD stage is not Y.");
return;
}
// Create and setup the USD physics scene.
static const PXR_NS::SdfPath kPhysicsScenePath("/World/PhysicsScene");
if (!activeStage->GetPrimAtPath(kPhysicsScenePath))
{
static constexpr PXR_NS::GfVec3f kGravityDirection = { 0.0f, -1.0f, 0.0f };
static constexpr float kGravityMagnitude = 981.0f;
PXR_NS::UsdPhysicsScene physicsScene = PXR_NS::UsdPhysicsScene::Define(activeStage, kPhysicsScenePath);
physicsScene.CreateGravityDirectionAttr().Set(kGravityDirection);
physicsScene.CreateGravityMagnitudeAttr().Set(kGravityMagnitude);
}
// Create and setup a static ground plane (box for now, should use UsdGeomPlane instead).
static const PXR_NS::SdfPath kGroundPlanePath("/World/StaticGroundPlane");
if (!activeStage->GetPrimAtPath(kGroundPlanePath))
{
const double kSize = 5.0 / activeStageMetersPerUnit;
const PXR_NS::GfVec3f kColour = { 1.0f, 1.0f, 1.0f };
const PXR_NS::GfVec3f kPosition = { 0.0f, -(float)kSize * 0.5f, 0.0f };
PXR_NS::UsdGeomCube geomPrim = PXR_NS::UsdGeomCube::Define(activeStage, kGroundPlanePath);
geomPrim.CreateSizeAttr().Set(kSize);
geomPrim.AddTranslateOp(PXR_NS::UsdGeomXformOp::PrecisionFloat).Set(kPosition);
geomPrim.CreateDisplayColorAttr().Set(PXR_NS::VtArray<PXR_NS::GfVec3f>({ kColour }));
PXR_NS::UsdPhysicsCollisionAPI::Apply(geomPrim.GetPrim());
}
// Create and setup a rigid body box.
const PXR_NS::SdfPath kRigidBodyPath("/World/RigidBodyBox");
if (!activeStage->GetPrimAtPath(kRigidBodyPath))
{
const double kSize = 0.5 / activeStageMetersPerUnit;
const PXR_NS::GfVec3f kColour = { 0.0f, 0.0f, 1.0f };
const PXR_NS::GfVec3f kPosition = { 0.0f, (float)kSize * 5.0f, 0.0f };
PXR_NS::UsdGeomCube geomPrim = PXR_NS::UsdGeomCube::Define(activeStage, kRigidBodyPath);
geomPrim.CreateSizeAttr().Set(kSize);
geomPrim.AddTranslateOp(PXR_NS::UsdGeomXformOp::PrecisionFloat).Set(kPosition);
geomPrim.CreateDisplayColorAttr().Set(PXR_NS::VtArray<PXR_NS::GfVec3f>({ kColour }));
static constexpr PXR_NS::GfVec3f kVelocity = { 2.0f, 1.0f, 2.0f };
static constexpr PXR_NS::GfVec3f kAngularVelocity = { 180.0f, 0.0f, 0.0f };
PXR_NS::UsdPhysicsCollisionAPI::Apply(geomPrim.GetPrim());
PXR_NS::UsdPhysicsMassAPI::Apply(geomPrim.GetPrim());
auto rigidBodyAPI = PXR_NS::UsdPhysicsRigidBodyAPI::Apply(geomPrim.GetPrim());
rigidBodyAPI.CreateVelocityAttr().Set(kVelocity);
rigidBodyAPI.CreateAngularVelocityAttr().Set(kAngularVelocity);
}
}
void onShutdown() override
{
}
};
}
}
}
}
CARB_PLUGIN_IMPL(pluginImplDesc, omni::example::cpp::usd_physics::ExampleUsdPhysicsExtension)
void fillInterface(omni::example::cpp::usd_physics::ExampleUsdPhysicsExtension& iface)
{
}
| 5,348 | C++ | 40.465116 | 132 | 0.658377 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.usd_physics/docs/Overview.md | # Overview
An example C++ extension that can be used as a reference/template for creating new extensions.
Demonstrates how to create a C++ plugin that can add physics to the current USD stage by:
- Using the UsdStageCache to get a USD stage from C++.
- Adding a UsdPhysicsScene to the USD stage from C++.
- Adding a static body box to the USD stage from C++.
- Adding a rigid body box to the USD stage from C++.
Note: It is important that all USD stage reads/writes happen from the main thread:
[https://graphics.pixar.com/usd/release/api/_usd__page__multi_threading.html](https://graphics.pixar.com/usd/release/api/_usd__page__multi_threading.html)
# Example

| 715 | Markdown | 33.095237 | 154 | 0.748252 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.commands/plugins/omni.example.cpp.commands/ExampleCommandsExtension.cpp | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
#define CARB_EXPORTS
#include <carb/PluginUtils.h>
#include <omni/ext/IExt.h>
#include <omni/kit/commands/Command.h>
#include <omni/kit/commands/ICommandBridge.h>
const struct carb::PluginImplDesc pluginImplDesc = { "omni.example.cpp.commands.plugin",
"An example C++ extension.", "NVIDIA",
carb::PluginHotReload::eEnabled, "dev" };
namespace omni
{
namespace example
{
namespace cpp
{
namespace commands
{
using namespace omni::kit::commands;
class ExampleCppCommand : public Command
{
public:
static carb::ObjectPtr<ICommand> create(const char* extensionId,
const char* commandName,
const carb::dictionary::Item* kwargs)
{
// Note: It is important to construct the handler using ObjectPtr<T>::InitPolicy::eSteal,
// otherwise we end up incresing the reference count by one too many during construction,
// resulting in a carb::ObjectPtr<IAction> whose object instance will never be destroyed.
return carb::stealObject<ICommand>(new ExampleCppCommand(extensionId, commandName, kwargs));
}
static void populateKeywordArgs(carb::dictionary::Item* defaultKwargs,
carb::dictionary::Item* optionalKwargs,
carb::dictionary::Item* requiredKwargs)
{
if (carb::dictionary::IDictionary* iDictionary = carb::getCachedInterface<carb::dictionary::IDictionary>())
{
iDictionary->makeAtPath(defaultKwargs, "x", 9);
iDictionary->makeAtPath(defaultKwargs, "y", -1);
}
}
ExampleCppCommand(const char* extensionId, const char* commandName, const carb::dictionary::Item* kwargs)
: Command(extensionId, commandName)
{
if (carb::dictionary::IDictionary* iDictionary = carb::getCachedInterface<carb::dictionary::IDictionary>())
{
m_x = iDictionary->get<int32_t>(kwargs, "x");
m_y = iDictionary->get<int32_t>(kwargs, "y");
}
}
void doCommand() override
{
printf("Executing command '%s' with params 'x=%d' and 'y=%d'.\n", getName(), m_x, m_y);
}
void undoCommand() override
{
printf("Undoing command '%s' with params 'x=%d' and 'y=%d'.\n", getName(), m_x, m_y);
}
private:
int32_t m_x = 0;
int32_t m_y = 0;
};
class ExampleCommandsExtension : public omni::ext::IExt
{
public:
void onStartup(const char* extId) override
{
auto commandBridge = carb::getCachedInterface<ICommandBridge>();
if (!commandBridge)
{
CARB_LOG_WARN("Could not get cached ICommandBridge interface.");
return;
}
// Example of registering a command from C++.
commandBridge->registerCommand(
"omni.example.cpp.commands", "ExampleCppCommand", ExampleCppCommand::create, ExampleCppCommand::populateKeywordArgs);
}
void onShutdown() override
{
if (auto commandBridge = carb::getCachedInterface<ICommandBridge>())
{
commandBridge->deregisterCommand("omni.example.cpp.commands", "ExampleCppCommand");
}
else
{
CARB_LOG_WARN("Could not get cached ICommandBridge interface.");
}
}
};
}
}
}
}
CARB_PLUGIN_IMPL(pluginImplDesc, omni::example::cpp::commands::ExampleCommandsExtension)
void fillInterface(omni::example::cpp::commands::ExampleCommandsExtension& iface)
{
}
| 4,025 | C++ | 31.731707 | 129 | 0.631304 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.commands/plugins/omni.example.cpp.commands.tests/ExampleCommandsTests.cpp | // Copyright (c) 2020-2021, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
#include <doctest/doctest.h>
#include <carb/BindingsUtils.h>
#include <omni/kit/commands/ICommandBridge.h>
CARB_BINDINGS("omni.example.cpp.commands.tests")
TEST_SUITE("omni.example.cpp.commands.tests")
{
using namespace omni::kit::commands;
TEST_CASE("Execute Example C++ Command")
{
auto commandBridge = carb::getCachedInterface<ICommandBridge>();
REQUIRE(commandBridge != nullptr);
// Execute
bool result = commandBridge->executeCommand("ExampleCpp");
CHECK(result);
// Undo
result = commandBridge->undoCommand();
CHECK(result);
// Redo
result = commandBridge->redoCommand();
CHECK(result);
// Undo
result = commandBridge->undoCommand();
CHECK(result);
// Execute with args
carb::dictionary::IDictionary* iDictionary = carb::getCachedInterface<carb::dictionary::IDictionary>();
REQUIRE(iDictionary != nullptr);
carb::dictionary::Item* kwargs = iDictionary->createItem(nullptr, "", carb::dictionary::ItemType::eDictionary);
REQUIRE(kwargs != nullptr);
iDictionary->makeAtPath(kwargs, "x", -9);
iDictionary->makeAtPath(kwargs, "y", 99);
result = commandBridge->executeCommand("ExampleCpp", kwargs);
iDictionary->destroyItem(kwargs);
CHECK(result);
// Repeat
result = commandBridge->repeatCommand();
CHECK(result);
// Undo
result = commandBridge->undoCommand();
CHECK(result);
// Undo
result = commandBridge->undoCommand();
CHECK(result);
// Undo (empty command stack)
result = commandBridge->undoCommand();
CHECK(!result);
}
}
| 2,186 | C++ | 29.802816 | 119 | 0.651418 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.commands/omni/example/cpp/commands/tests/test_commands_example.py | ## Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
##
## NVIDIA CORPORATION and its licensors retain all intellectual property
## and proprietary rights in and to this software, related documentation
## and any modifications thereto. Any use, reproduction, disclosure or
## distribution of this software and related documentation without an express
## license agreement from NVIDIA CORPORATION is strictly prohibited.
##
import omni.kit.test
import omni.kit.commands
import omni.kit.undo
class TestCommandsExample(omni.kit.test.AsyncTestCase):
async def setUp(self):
omni.kit.undo.clear_stack()
async def tearDown(self):
omni.kit.undo.clear_stack()
async def test_cpp_commands(self):
# Execute
res = omni.kit.commands.execute("ExampleCpp")
self.assertEqual(res, (True, None))
# Undo
res = omni.kit.undo.undo()
self.assertTrue(res)
# Redo
res = omni.kit.undo.redo()
self.assertTrue(res)
# Repeat
res = omni.kit.undo.repeat()
self.assertTrue(res)
# Undo
res = omni.kit.undo.undo()
self.assertTrue(res)
# Undo
res = omni.kit.undo.undo()
self.assertTrue(res)
# Undo (empty command stack)
res = omni.kit.undo.undo()
self.assertFalse(res)
| 1,355 | Python | 26.119999 | 77 | 0.648708 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.commands/docs/Overview.md | # Overview
An example C++ extension that can be used as a reference/template for creating new extensions.
Demonstrates how to create commands in C++ that can then be executed from either C++ or Python.
See the omni.kit.commands extension for extensive documentation about commands themselves.
# C++ Usage Examples
## Defining Commands
```
using namespace omni::kit::commands;
class ExampleCppCommand : public Command
{
public:
static carb::ObjectPtr<ICommand> create(const char* extensionId,
const char* commandName,
const carb::dictionary::Item* kwargs)
{
return carb::stealObject<ICommand>(new ExampleCppCommand(extensionId, commandName, kwargs));
}
static void populateKeywordArgs(carb::dictionary::Item* defaultKwargs,
carb::dictionary::Item* optionalKwargs,
carb::dictionary::Item* requiredKwargs)
{
if (carb::dictionary::IDictionary* iDictionary = carb::getCachedInterface<carb::dictionary::IDictionary>())
{
iDictionary->makeAtPath(defaultKwargs, "x", 9);
iDictionary->makeAtPath(defaultKwargs, "y", -1);
}
}
ExampleCppCommand(const char* extensionId, const char* commandName, const carb::dictionary::Item* kwargs)
: Command(extensionId, commandName)
{
if (carb::dictionary::IDictionary* iDictionary = carb::getCachedInterface<carb::dictionary::IDictionary>())
{
m_x = iDictionary->get<int32_t>(kwargs, "x");
m_y = iDictionary->get<int32_t>(kwargs, "y");
}
}
void doCommand() override
{
printf("Executing command '%s' with params 'x=%d' and 'y=%d'.\n", getName(), m_x, m_y);
}
void undoCommand() override
{
printf("Undoing command '%s' with params 'x=%d' and 'y=%d'.\n", getName(), m_x, m_y);
}
private:
int32_t m_x = 0;
int32_t m_y = 0;
};
```
## Registering Commands
```
auto commandBridge = carb::getCachedInterface<omni::kit::commands::ICommandBridge>());
commandBridge->registerCommand(
"omni.example.cpp.commands", "ExampleCppCommand", ExampleCppCommand::create, ExampleCppCommand::populateKeywordArgs);
// Note that the command name (in this case "ExampleCppCommand") is arbitrary and does not need to match the C++ class
```
## Executing Commands
```
auto commandBridge = carb::getCachedInterface<omni::kit::commands::ICommandBridge>());
// Create the kwargs dictionary.
auto iDictionary = carb::getCachedInterface<carb::dictionary::IDictionary>();
carb::dictionary::Item* kwargs = iDictionary->createItem(nullptr, "", carb::dictionary::ItemType::eDictionary);
iDictionary->makeIntAtPath(kwargs, "x", 7);
iDictionary->makeIntAtPath(kwargs, "y", 9);
// Execute the command using its name...
commandBridge->executeCommand("ExampleCppCommand", kwargs);
// or without the 'Command' postfix just like Python commands...
commandBridge->executeCommand("ExampleCpp", kwargs);
// or fully qualified if needed to disambiguate (works with or without the 'Command)' postfix.
commandBridge->executeCommand("omni.example.cpp.commands", "ExampleCppCommand", kwargs);
// Destroy the kwargs dictionary.
iDictionary->destroyItem(kwargs);
// The C++ command can be executed from Python exactly like any Python command,
// and we can also execute Python commands from C++ in the same ways as above:
commandBridge->executeCommand("SomePythonCommand", kwargs);
// etc.
```
## Undo/Redo/Repeat Commands
```
auto commandBridge = carb::getCachedInterface<omni::kit::commands::ICommandBridge>());
// It doesn't matter whether the command stack contains Python commands, C++ commands,
// or a mix of both, and the same stands for when undoing/redoing commands from Python.
commandBridge->undoCommand();
commandBridge->redoCommand();
commandBridge->repeatCommand();
```
## Deregistering Commands
```
auto commandBridge = carb::getCachedInterface<omni::kit::commands::ICommandBridge>());
commandBridge->deregisterCommand("omni.example.cpp.commands", "ExampleCppCommand");
```
| 4,154 | Markdown | 32.508064 | 121 | 0.685123 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.ui_widget/python/tests/test_cpp_widget.py | ## Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
##
## NVIDIA CORPORATION and its licensors retain all intellectual property
## and proprietary rights in and to this software, related documentation
## and any modifications thereto. Any use, reproduction, disclosure or
## distribution of this software and related documentation without an express
## license agreement from NVIDIA CORPORATION is strictly prohibited.
##
__all__ = ["TestCppWidget"]
from omni.example.cpp.ui_widget import CppWidget
from omni.ui.tests.test_base import OmniUiTest
from pathlib import Path
import omni.kit.app
import omni.ui as ui
EXTENSION_PATH = Path(omni.kit.app.get_app().get_extension_manager().get_extension_path_by_module(__name__))
GOLDEN_PATH = EXTENSION_PATH.joinpath("data/golden")
STYLE = {"CppWidget": {"color": ui.color.red}}
class TestCppWidget(OmniUiTest):
async def test_general(self):
"""Testing general look of CppWidget"""
window = await self.create_test_window()
with window.frame:
CppWidget(thickness=2, style=STYLE)
await self.finalize_test(golden_img_dir=GOLDEN_PATH, golden_img_name=f"test_general.png")
| 1,180 | Python | 34.787878 | 108 | 0.738136 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.ui_widget/bindings/python/omni.example.cpp.ui_widget/BindCppWidget.cpp | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
#include <omni/ui/bind/BindUtils.h>
#include <pybind11/functional.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <CppWidget.h>
#include <BindCppWidget.h>
using namespace pybind11;
OMNIUI_NAMESPACE_USING_DIRECTIVE
OMNIUI_CPPWIDGET_NAMESPACE_USING_DIRECTIVE
void wrapCppWidget(module& m)
{
const char* cppWidgetDoc = OMNIUI_PYBIND_CLASS_DOC(CppWidget);
const char* cppWidgetConstructorDoc = OMNIUI_PYBIND_CONSTRUCTOR_DOC(CppWidget, CppWidget);
class_<CppWidget, omni::ui::Widget, std::shared_ptr<CppWidget>>(m, "CppWidget", cppWidgetDoc)
.def(init([](kwargs kwargs) { OMNIUI_PYBIND_INIT(CppWidget) }), cppWidgetConstructorDoc)
.def_property(
"thickness", &CppWidget::getThickness, &CppWidget::setThickness, OMNIUI_PYBIND_DOC_CppWidget_thickness)
/* */;
}
| 1,263 | C++ | 36.17647 | 115 | 0.752177 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.ui_widget/bindings/python/omni.example.cpp.ui_widget/Module.cpp | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
#include <carb/BindingsUtils.h>
#include <omni/ui/bind/BindUtils.h>
#include <pybind11/pybind11.h>
// We need to be registered as Carbonite plugin because we need to use CARB_LOG_ERROR
CARB_BINDINGS("omni.example.cpp.ui_widget.python")
PYBIND11_MODULE(_example_cpp_widget, m)
{
pybind11::module::import("omni.ui");
OMNIUI_BIND(CppWidget);
}
| 787 | C++ | 33.260868 | 85 | 0.768742 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.ui_widget/bindings/python/omni.example.cpp.ui_widget/BindCppWidget.h | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
#pragma once
#include <DocCppWidget.h>
#include <omni/ui/bind/BindWidget.h>
// clang-format off
#define OMNIUI_PYBIND_INIT_CppWidget \
OMNIUI_PYBIND_INIT_CAST(thickness, setThickness, float) \
OMNIUI_PYBIND_INIT_Widget
#define OMNIUI_PYBIND_KWARGS_DOC_CppWidget \
"\n `thickness : float`\n " \
OMNIUI_PYBIND_DOC_CppWidget_thickness \
OMNIUI_PYBIND_KWARGS_DOC_Widget
// clang-format on
| 1,224 | C | 47.999998 | 120 | 0.52451 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.ui_widget/include/CppWidget.h | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
#pragma once
#include "Api.h"
#include <string>
#include <omni/ui/Widget.h>
OMNIUI_CPPWIDGET_NAMESPACE_OPEN_SCOPE
/**
* @brief A simple C++ omni.ui widget that draws a rectangle.
*/
class OMNIUI_CPPWIDGET_CLASS_API CppWidget : public OMNIUI_NS::Widget
{
OMNIUI_OBJECT(CppWidget)
public:
OMNIUI_CPPWIDGET_API
~CppWidget() override;
/**
* @brief This property holds the thickness of the rectangle line.
*/
/// @private (suppress doc generation error)
OMNIUI_PROPERTY(float, thickness, DEFAULT, 1.0f, READ, getThickness, WRITE, setThickness);
protected:
/**
* Constructor.
*/
OMNIUI_CPPWIDGET_API
CppWidget();
/**
* @brief Reimplemented the rendering code of the widget.
*
* @see Widget::_drawContent
*/
OMNIUI_CPPWIDGET_API
void _drawContent(float elapsedTime) override;
private:
};
OMNIUI_CPPWIDGET_NAMESPACE_CLOSE_SCOPE
| 1,354 | C | 24.092592 | 94 | 0.710487 |
NVIDIA-Omniverse/kit-extension-template-cpp/source/extensions/omni.example.cpp.ui_widget/include/Api.h | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
#pragma once
#ifdef _WIN32
// When we build DLL, we need the __declspec(dllexport) keyword to export class
// member functions from a DLL. __declspec(dllexport) adds the export directive
// to the object file, so you do not need to use a .def file.
# define OMNIUI_CPPWIDGET_EXPORT __declspec(dllexport)
// When we build a third-party library that uses public symbols defined by this
// DLL, the symbols must be imported. We need to use __declspec(dllimport) on
// the declarations of the public symbols.
# define OMNIUI_CPPWIDGET_IMPORT __declspec(dllimport)
# define OMNIUI_CPPWIDGET_CLASS_EXPORT
#else
// It works similarly in Linux. The symbols must be visible in DSO because we
// build with the compiler option -fvisibility=hidden.
# define OMNIUI_CPPWIDGET_EXPORT __attribute__((visibility("default")))
// But to use them we don't need to use any dirrective.
# define OMNIUI_CPPWIDGET_IMPORT
// typeinfo of the class should be visible in DSO as well.
# define OMNIUI_CPPWIDGET_CLASS_EXPORT __attribute__((visibility("default")))
#endif
#if defined(OMNIUI_CPPWIDGET_STATIC)
# define OMNIUI_CPPWIDGET_API
# define OMNIUI_CPPWIDGET_CLASS_API
#else
# if defined(OMNIUI_CPPWIDGET_EXPORTS)
# define OMNIUI_CPPWIDGET_API OMNIUI_CPPWIDGET_EXPORT
# define OMNIUI_CPPWIDGET_CLASS_API OMNIUI_CPPWIDGET_CLASS_EXPORT
# else
# define OMNIUI_CPPWIDGET_API OMNIUI_CPPWIDGET_IMPORT
# define OMNIUI_CPPWIDGET_CLASS_API
# endif
#endif
#define OMNIUI_CPPWIDGET_NS omni::ui::example_cpp_widget
#define OMNIUI_CPPWIDGET_NAMESPACE_USING_DIRECTIVE using namespace OMNIUI_CPPWIDGET_NS;
#define OMNIUI_CPPWIDGET_NAMESPACE_OPEN_SCOPE \
namespace omni \
{ \
namespace ui \
{ \
namespace example_cpp_widget \
{
#define OMNIUI_CPPWIDGET_NAMESPACE_CLOSE_SCOPE \
} \
} \
}
| 3,167 | C | 54.578946 | 120 | 0.533944 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.