Skip to content

Ability to change textures and materials at runtime when a model has more than one UV mapping #9774

Open
@schlista

Description

@schlista

Is your feature request related to a problem? Please describe (REQUIRED):
I'm trying to change a texture on a model that has several different textures via UV Mapping in the .glb object. But it appears it's not possible as the texture ends up applying to the entire object ignoring the fact that I have multiple materials and textures applied.
image

or with one material applied multiple times with different textures:
image

Describe the solution you'd like (REQUIRED):
it would be great to use go.set(model_url, texture_reference, "path to new texture")
And go.set(model_url, material_reference, "path to new material")

Describe alternatives you've considered (REQUIRED):
Currently it was recommended in the forum to use separate meshes to export my object. This is what I'm going to try now, but it's not ideal as they are separate models. And I'm not sure how that will impact the physics and it does make it more complicated vice just using go.set on the model to update the properties.

Additional context (OPTIONAL):
Discussion is here: https://forum.defold.com/t/is-it-possible-to-change-this-at-runtime/78888

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestA suggestion for a new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions