Skip to content

Bug: OBJ fails to load when the .mtl file contains "aniso" or "anisor" #5635

Closed

Description

@TenHenEggs

Describe the bug
Trying to import an OBJ file with its .mtl containing "aniso" or "anisor" fails with the message:
Cannot parse string "niso" as a real number: does not start with digit or decimal point followed by digit.

To Reproduce
Try to import this model from tinyobjloader

Expected behavior
Model is successfully imported

Platform

  • OS: Windows
  • Version 5.4.0
  • Installed via vcpkg

Activity

  1. added
    Bug
    on Jun 24, 2024
  2. kimkulling commented on Jun 25, 2024

    @kimkulling
    Member

    That is right. I have just checked the implementation and the parser is just ignoring ansio.

  3. SharpieLaBeouf commented on Jul 27, 2024

    @SharpieLaBeouf

    I am having the same issue. I have exported my wavefront model from Blender using the PBR Extensions export option for wavefront materials. I have received this error when attempting to load using ASSIMP.

    Assimp Scene Invalid: Cannot parse string "niso" as a real number: does not start with digit or decimal point followed by digit.

  4. GitHubDragonFly commented on Aug 3, 2024

    @GitHubDragonFly

    @TenHenEggs and @SharpieLaBeouf maybe also check the issue #5554

    It might show you possible ways of fixing OBJ + MTL issues.

  5. added
    Wavefront-Obj
    on Sep 13, 2024
  6. tellypresence commented on Apr 15, 2025

    @tellypresence
    Collaborator

    @TenHenEggs Is this still a problem?

  7. TenHenEggs commented on Apr 18, 2025

    @TenHenEggs
    Author

    @tellypresence
    On release 5.4.3 bug still happens.
    I also managed to compile master ac59884, and it doesn't solve the issue either.

  8. turol commented on Apr 19, 2025

    @turol
    Member

    Link points to .mtl and not the .obj. Can you link to both for ease of downloading?

  9. TenHenEggs commented on Apr 19, 2025

    @TenHenEggs
    Author

    Sure,
    pbr-mat-ext.mtl
    pbr-mat-ext.obj

    Zip file with both files:
    pbr-mat-ext.zip

  10. turol commented on Apr 19, 2025

    @turol
    Member

    I think this is the relevant piece of code:

    Looks like it needs something to skip to the next space instead of just the next character.

  11. dimitre commented on May 12, 2025

    @dimitre

    +1 for this one.

  12. tellypresence commented on May 14, 2025

    @tellypresence
    Collaborator

    OBJ import issues tracked via epic #6179

  13. dimitre commented on May 14, 2025

    @dimitre

    Assimp now errors when finding this data keys. it would be great if it could ignore, or output a warning instead

  14. 5 remaining items

  15. kimkulling commented on Sep 22, 2025

    @kimkulling
    Member

    Closed by #6253

  16. added 2 commits that reference this issue on Dec 1, 2025
    8a8d833
    ac0cfc8
  17. kimkulling commented on Jan 22, 2026

    @kimkulling
    Member

    Closed by #6452

  18. added 2 commits that reference this issue on Jul 1, 2026
    c1df7bb
    1e9bf1f
  19. added 2 commits that reference this issue on Jul 28, 2026
    ddd7d01
    337bbf5
  20. added
    PBR/PBS
    on Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugPBR/PBSWavefront-Obj

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions