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

NurbsCurve are rendered as linear curves #2135

Closed
cpichard opened this issue Oct 29, 2024 · 2 comments
Closed

NurbsCurve are rendered as linear curves #2135

cpichard opened this issue Oct 29, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@cpichard
Copy link
Collaborator

Describe the bug
When we render the following NurbsCurve example exported from maya

#usda 1.0
(
    defaultPrim = "curve1"
    metersPerUnit = 0.01
    upAxis = "Y"
)

def NurbsCurves "curve1" (
    kind = "component"
)
{
    int[] curveVertexCounts = [4]
    float3[] extent = [(-2.5648465, -0.6877133, -0.5), (1.4385666, 7.8890786, 0.5)]
    double[] knots = [0, 0, 0, 0, 1, 1, 1, 1]
    int[] order = [4]
    point3f[] points = [(-2.0648465, 7.3890786, 0), (0.93856657, 4.8293514, 0), (0.2901024, 2.8156996, 0), (-1.7235495, -0.18771331, 0)]
    double2[] ranges = [(0, 1)]
    float[] widths = [1] (
        interpolation = "constant"
    )
}

Arnold will render linear segment instead of a nurb curve.
If you import this USD in Maya (cmds.mayaUSDImport(file="my_file.usd")), you get a nurbsCurve (see first screenshot).
If I try to render this same curve with arnold (using hydra render delagate), I get the second screenshot.
image (3)
image (4)

@cpichard cpichard added the bug Something isn't working label Oct 29, 2024
@autodesk-oss-arnold-bot
Copy link

Issue synced internally to ARNOLD-15620

@cpichard cpichard changed the title NurbsCurve are renders as linear curves in hydra NurbsCurve are rendered as linear curves Dec 10, 2024
@cpichard
Copy link
Collaborator Author

cpichard commented Jan 3, 2025

Closing as:

  • The maya-usd export and import of NurbsCurves works correctly.
  • Arnold does not support native nurbs curves.
  • Hydra is converting the NurbsCurves to linear patches and there is no code yet to get the nurbs parameters in a render delegate from hydra. So it needs to be implemented, at first glance using the scene index system would be the way to go.
  • MTOA usd export does convert the NurbsCurves to a visually correct approximation of the nurbs compatible with Arnold and Hydra.

@cpichard cpichard closed this as completed Jan 3, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in Arnold USD Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

1 participant