Skip to content

GeomSubset on BasisCurve segments warns in usdview 25.11+ #4121

Description

@andrewkaufman

The recently posted Physics Deformables proposal from AOUSD includes linear BasisCurve deformable chains with per-segment physical material variation.

However, when loading such a curve in usdview (v25.11+) we receive the following warning for each GeomSubset:

Warning: in GetTypedValue at line 85 of [redacted]/pxr/usdImaging/usdImaging/geomSubsetAdapter.cpp -- Unsupported GeomSubset type: segment

from https://github.com/PixarAnimationStudios/OpenUSD/blob/dev/pxr/usdImaging/usdImaging/geomSubsetAdapter.cpp#L85

No such warning is emitted in my older USD builds (25.05 nor 24.08), so I supposed it is new for Imaging 2.0. I also don't recieve this warning in v25.11 when I set USDIMAGINGGL_ENGINE_ENABLE_SCENE_INDEX=0.

Ideally GeomSubset with elementType="segment" could be supported across the board, even for traditional (visual) materials. Minimally it seems like usdImaging could supress warnings about non-visual materials on GeomSubset (i.e. those with binding purpose "physics" or other known non-visual purposes).

Example layer with curve subsets
#usda 1.0
(
    defaultPrim = "World"
    metersPerUnit = 1
    upAxis = "Z"
    doc = """This file demonstrates an imaging bug which emits a warning when GeomSubet is used with elementType="segment"

    Subsets:
      segments 0-2:  soft/thin rubber
      segments 3-6:  stiff/thick reinforced region

    The float[] widths array is authored to match the visible taper. The physical
    curve thickness is owned by the bound materials; a physics parser should resolve
    each segment's material from the GeomSubset material binding and derive
    per-segment radius/stiffness/friction from that material."""
)

def Xform "World"
{
    def BasisCurves "curve" (
        prepend apiSchemas = ["PhysicsCurvesDeformableSimAPI", "MaterialBindingAPI"]
    )
    {
        uniform token[] curveType = ["linear"]
        int[] curveVertexCounts = [6]
        point3f[] points = [
            (-0.36, 0, 0.55),
            (-0.30, 0, 0.535),
            (-0.24, 0, 0.520),
            (-0.18, 0, 0.505),
            (-0.12, 0, 0.495),
            (-0.06, 0, 0.490),
        ]
        uniform token type = "linear"
        uniform token wrap = "nonperiodic"
        float[] widths = [
            0.004, 0.004, 0.004, 0.010, 0.010, 0.010
        ]

        def GeomSubset "segments_soft_thin" (
            prepend apiSchemas = ["MaterialBindingAPI"]
        )
        {
            uniform token elementType = "segment"
            uniform token familyName = "materialBind"
            int[] indices = [0, 1, 2]
            rel material:binding:physics = </World/Looks/SoftThinMaterial>
        }

        def GeomSubset "segments_stiff_thick" (
            prepend apiSchemas = ["MaterialBindingAPI"]
        )
        {
            uniform token elementType = "segment"
            uniform token familyName = "materialBind"
            int[] indices = [3, 4, 5]
            rel material:binding:physics = </World/Looks/StiffThickMaterial>
        }
    }

    def Scope "Looks"
    {
        def Material "SoftThinMaterial" (
            prepend apiSchemas = ["PhysicsMaterialAPI", "PhysicsCurvesDeformableMaterialAPI",]
        )
        {
            float physics:thickness = 0.004
            float physics:stretchStiffness = 40000
            float physics:bendStiffness = 120
            float physics:dynamicFriction = 0.6
            float physics:staticFriction = 0.8
        }

        def Material "StiffThickMaterial" (
            prepend apiSchemas = ["PhysicsMaterialAPI", "PhysicsCurvesDeformableMaterialAPI"]
        )
        {
            float physics:thickness = 0.010
            float physics:stretchStiffness = 350000
            float physics:bendStiffness = 3500
            float physics:dynamicFriction = 0.45
            float physics:staticFriction = 0.65
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions