Skip to content

Keep name of material even if using default material #268

@mberglundmx

Description

@mberglundmx

When the .mtl file is missing, the loader Warns and uses a default material. That is all good - however, it would be nice if the default material got the name that is specified in the usemtl line in the obj-file.

In my application I load obj files, and assign them materials based on a completely different physical representation, meaning the .mtl file does not make much sense. But I would still want to be able to read the material names, and map them to my specialized materials.

Currently I achieve this by creating dummy .mtl files, but it would be nice to not have to do that.

If there is an easier way already, please point me in the right direction, thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions