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

[Tydra] MaterialBinding API #40

Closed
2 tasks
syoyo opened this issue Nov 7, 2022 · 1 comment
Closed
2 tasks

[Tydra] MaterialBinding API #40

syoyo opened this issue Nov 7, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@syoyo
Copy link
Collaborator

syoyo commented Nov 7, 2022

Geom Prim(e.g. GeomMesh) has a materialBinding class variable, but its not enough just lookup it, since parent node(non Geom Prim, e.g. Xform) may contain materialBinding, which we need manually lookup from .props and do type check if it is defined as Relationship.

#39

We need handy materialBinding access API in Tydra.

MaterialBinding

https://graphics.pixar.com/usd/release/api/class_usd_shade_material_binding_a_p_i.html

API in Tydra may be something like:

tydra::GetMaterialBindingRelationship(const Stage &stage, const Prim &prim)

Expected behavior

  • If given Prim has MaterialBinding(aldo do a check if MaterialBindingAPI is activated(authored)), return it
  • If not, search parent Prim's MaterialBinding info
  • Determine strength based on bindMaterialAs

Details

https://graphics.pixar.com/usd/release/wp_usdshade.html#material-resolve-determining-the-bound-material-for-any-geometry-prim

Discussion and Optional

  • MaterialBinding could have multiple relationship target?
  • Consider Collection API
@syoyo syoyo added the enhancement New feature or request label Nov 7, 2022
@syoyo
Copy link
Collaborator Author

syoyo commented May 9, 2024

Initial MaterialBinding API now has been supported in Tydra(dev branch)

@syoyo syoyo closed this as completed May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant