Skip to content

Add property to override the base color of model #82

@galdinsk

Description

@galdinsk

When loading a GLB file that has a default white or light-colored material, it's very difficult to see the model against a light or white application background. This results in a poor user experience due to low contrast.

While changing the app's background color is a possible workaround, it's not ideal as it forces a design change. The more flexible solution is to control the model's appearance directly.

It would be useful to have a new property in the widget that gives the ability to set or override the base color of the loaded model (modelColor or baseColorFactor, etc).

Not only would it solve this contrast problem, but allows a few new use cases (like user picking a color from palette to select color of product and/or being able to use a single GLB file representing multiple colors without new model files for each).

I believe this would involve exposing the pbrMetallicRoughness.baseColorFactor property of model-viewer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions