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

No support for rational spline curves #1554

Closed
VikingScientist opened this issue Jul 9, 2021 · 3 comments
Closed

No support for rational spline curves #1554

VikingScientist opened this issue Jul 9, 2021 · 3 comments

Comments

@VikingScientist
Copy link

Describe the bug
I cannot find any way to format rational spline curves within the framework. Please relabel this as "help wanted" if the functionality does exist, or "feature wanted" if it does not exist. The feature exist for surfaces, but not for curves.

Steps to reproduce
Steps to reproduce the behavior:

  1. Go to the API for UsdGeomNurbsCurves
  2. Look for anywhere to specify the rational weights of the curve
  3. Realize that this is nowhere to be found

Expected behavior
I expect that there exist a similar function as can be found in UsdGeomNurbsPatch called GetPointWeightsAttr to be implemented in the UsdGeomNurbsCurves class.

@spiffmon
Copy link
Member

Hi @VikingScientist,
You are correct that UsdGeomNurbsCurves does not encode weights, which means you must pre-weight your cv's when exporting from a DCC that supports them, as well as separately encoding them if you want to be able to round-trip them. I do not know if this omission was intentional, but I suspect not. The thing is that nurbs curves are not particularly important in our pipeline since RenderMan has never supported them, and we included a schema for them out of a duty to completeness since Maya uses them for modeling.
Our schema, therefore, was highly Maya-inspired, and Maya does not let you edit point weights. I just discovered from this post that they do exist in Maya's internal datastore, but the Maya USD exporter ignores them, by my code examination, so there's a bug to be filed against the Maya USD plugin, if you'd care to. It looks like Houdini does support weight editing, but the Houdini nurbs curve exporter also seems to ignore the weights.

There is currently no code in the USD codebase that evaluates nurbs curves (our usdImaging hydra delegate only draws the control hull), so we have very little skin in the game for nurbs. I think if you or someone else wanted to add support for weights, we'd be willing to accept a PR, since none of our code would become more or less correct as a result, though I don't think it would get you too far unless you also follow up with the vendors to get them to add I/O support for them.

@jilliene
Copy link

Filed as internal issue #USD-6784

@VikingScientist
Copy link
Author

The community at the Maya USD plugin repository directed me here, when I filed the issue over there before posting it here.

Thanks for filing it as an internal issue. USD is seeing interest from multiple fields outside pure animation, and with applications such as rigid-body physics simulation or NURBS-based finite element analysis, then the need to support rational splines might become relevant sooner rather than later. I expect one would first add support for storing/retrieving these within the USD core library before modelling plugins start exporting the weights and renders start taking advantage of them.

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

No branches or pull requests

3 participants