Skip to content

Investigate blown-out MToon/unlit colours in usdview (front bangs) #119

Description

@snkmcb

Observed

The converted USD appears noticeably overexposed in usdview compared with the source VRM rendered in a VRM web viewer. The discrepancy is especially visible on the front bangs: their strand-level shading/colour variation is mostly lost and becomes nearly white/yellow.

Reference captures from the report:

  • VRM web viewer:
Image
  • converted USD in usdview:
Image

Expected

The USD should preserve the source VRM's visible material colour variation closely enough that the bangs do not clip to a bright, nearly uniform colour in usdview.

Initial investigation

Two likely contributing gaps are present in the current converter:

  1. Vertex colour support appears absent. The USD authorer creates normal and st primvars, but does not author a colour primvar (displayColor / primvars:...), and the reader has no apparent COLOR_0 handling. If this asset uses vertex colours to modulate hair shading, that modulation is currently dropped.
  2. Unlit materials are represented by putting baseColor directly into UsdPreviewSurface.inputs:emissiveColor. For textured unlit materials, the base-colour texture replaces that input. The implementation notes that glTF factor x texture multiplication is only approximated, and MToon is retained as metadata rather than mapped to a dedicated graph. This can change energy/colour handling in Hydra/usdview and may explain the blown-out result.

Relevant code:

  • plugins/usdVrmFileFormat/src/usd/UsdVrmAuthorer.cpp -- unlit base-colour -> emissive conversion and texture connections
  • plugins/usdVrmFileFormat/src/io/CgltfVrmDocumentReader.cpp -- material import; no COLOR_0 import found

Investigation / acceptance criteria

  • Inspect the source VRM/glTF for COLOR_0 and determine its interpolation and intended material modulation.
  • Author the corresponding USD colour primvar and connect/multiply it in the material graph where required.
  • Verify the unlit/MToon mapping in usdview does not overdrive emissive output; preserve base-colour factor x texture semantics.
  • Add a focused fixture/regression test for vertex-colour and unlit/emissive material output.
  • Compare source VRM and converted USD using the same camera and neutral lighting, with the front bangs as the primary visual check.

Notes

The captures make this a renderer-visible discrepancy, but the exact target asset and its source .vrm have not yet been added to the repository. Attach or reference it before implementing the regression fixture.

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