Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Cylinders and Capsules with two radii #2596

Conversation

eoineoineoin
Copy link
Contributor

@eoineoineoin eoineoineoin commented Aug 16, 2023

Description of Change(s)

Adds a new schema version of Cylinder and Capsule, which accept different radii for each end. (Some discussion at https://groups.google.com/g/usd-interest/c/zC7wYK7wN-Y/m/PZoEiEkXAgAJ) This allows construction of tapered capsules and conic sections.

Uses schema versioning to add a Cylinder_1 as well as a Capsule_1; as such, most of the code in this PR is auto-generated. However, in addition to adding these types, adds some additional fixes:

  1. Adds an "includeSchemaFamily" option to the usdImaging pluginInfo.json, to allow one adapter to be used to render multiple different schema versions (25889c4)
  2. Default values used by implicit surface generator were inconsistent with the values specified in the schema (62acf38)
  3. Capsule mesh generator now generates a continuous surface between the end caps and the conical section. (1370773)

Along the way, I split the HdCapsuleSchema and HdCylinderSchema into two classes (HdCapsule_1Schema and HdCylinder_1Schema) - though the two schema versions are very similar, it felt like there was limited overlap between the "version 0" and "version 1" to enable effective code re-use, particularly in the Builder interface. Am aware the schema versioning is quite new though, so expect some teething issues like this - open to ideas on how this could be organized better.

Fixes Issue(s)

  • I have verified that all unit tests pass with the proposed changes
    Am seeing some failures on my machine; comparing reference images, they appear unrelated to these changes; some line-drawing aliasing appears different as well as some textures have failed to load.
  • I have submitted a signed Contributor License Agreement

Allows for registering an adaptor which handles all schemas in a family
*and* the schemas which derive from a versioned schema. i.e., an adapter
can handle all of:

class Cylinder "Cylinder" ( inherits = </Gprim> ...
class MyCustomCylinder "MyCustomCylinder" ( inherits = </Cylinder> ...
class Cylinder_1 "Cylinder_1" ( inherits = </Gprim> ...
class MyCustomCylinder2 "MyCustomCylinder2" ( inherits = </Cylinder_1> ...
Not enough overlap between the two builders.
Same treatment as capsules.
@jesschimein
Copy link
Contributor

Filed as internal issue #USD-8594

@eoineoineoin eoineoineoin changed the title Eoin/cone capsule radius multiple prims Cylinders and Capsules with two radii Aug 17, 2023
@pixar-oss pixar-oss merged commit ff5f029 into PixarAnimationStudios:dev Sep 19, 2023
11 of 20 checks passed
pixar-oss pushed a commit that referenced this pull request Sep 19, 2023
pluginInfo.json

This allows one adapter to be used to render multiple different schema
versions.

This will be used in the subsequent change to use CylinderAdapter and
CapsuleAdapter respectively for UsdGeomCylinder_1 and UsdGeomCapsule_1
renders.

Changes split from #2596

(Internal change: 2294998)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants