Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the example 'gltf-viewer' crashed with reason: uniform named "sheenColorIndex" not found #8473

Closed
OPTJoker opened this issue Feb 26, 2025 · 1 comment

Comments

@OPTJoker
Copy link

OPTJoker commented Feb 26, 2025

  • I load some glb models,many of them loadFaild with reason: uniform named "sheenColorIndex" not found

  • Here is the log:

FEngine (64 bits) created at 0x13a03a200 (threading is enabled)
FEngine resolved backend: Metal
Selected physical device 'Apple A12 GPU'
Supported GPU families: 
  MTLGPUFamilyCommon3
  MTLGPUFamilyApple5
Features:
  readWriteTextureSupport: true
Backend feature level: 2
FEngine feature level: 1
Texture Decoder has 4 background threads.
Failed to find material with features:
    ShadingModel = lit
    BlendingMode = opaque
    VertexColors = false
    SheenRoughnessTexture = false
    ClearCoatNormalTexture = false
    TransmissionTexture = false
    Volume = false
    Sheen = true
    Ior = true
    BaseColorTexture = false
    SheenColorTexture = false
    Transmission = false
    SpecularTexture = false
    EmissiveTexture = false
    MetallicRoughnessTexture = false
    VolumeThicknessTexture = false
    ClearCoat = false
    TextureTransforms = false
    SpecularColorTexture = false
    NormalTexture = false
    Specular = true
    ClearCoatRoughnessTexture = false
    OcclusionTexture = false
    ClearCoatTexture = false

Using fallback material for wall_material.
Failed to find material with features:
    ShadingModel = lit
    BlendingMode = opaque
    VertexColors = false
    SheenRoughnessTexture = false
    ClearCoatNormalTexture = false
    TransmissionTexture = false
    Volume = false
    Sheen = true
    Ior = true
    BaseColorTexture = false
    SheenColorTexture = false
    Transmission = false
    SpecularTexture = false
    EmissiveTexture = false
    MetallicRoughnessTexture = false
    VolumeThicknessTexture = false
    ClearCoat = false
    TextureTransforms = false
    SpecularColorTexture = false
    NormalTexture = false
    Specular = true
    ClearCoatRoughnessTexture = false
    OcclusionTexture = false
    ClearCoatTexture = false

Using fallback material for wall_material.
Failed to find material with features:
    ShadingModel = lit
    BlendingMode = opaque
    VertexColors = false
    SheenRoughnessTexture = false
    ClearCoatNormalTexture = false
    TransmissionTexture = false
    Volume = false
    Sheen = true
    Ior = true
    BaseColorTexture = false
    SheenColorTexture = false
    Transmission = false
    SpecularTexture = false
    EmissiveTexture = false
    MetallicRoughnessTexture = false
    VolumeThicknessTexture = false
    ClearCoat = false
    TextureTransforms = false
    SpecularColorTexture = false
    NormalTexture = false
    Specular = true
    ClearCoatRoughnessTexture = false
    OcclusionTexture = false
    ClearCoatTexture = false
...

Using fallback material for wall_material.

in const BufferInterfaceBlock::FieldInfo *filament::BufferInterfaceBlock::getFieldInfo(std::string_view) const:176
in file filament/libs/filabridge/src/BufferInterfaceBlock.cpp
reason: uniform named "sheenColorIndex" not found
#0	gltf-viewer                            0x1031a94a0 utils::CallStack::update(unsigned long) + 32
#1	gltf-viewer                            0x1031c1370 utils::TPanic<utils::PreconditionPanic>::TPanic(char const*, char const*, int, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>) + 172
#2	gltf-viewer                            0x1031c2860 utils::PreconditionPanic::PreconditionPanic(char const*, char const*, int, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>) + 84
#3	gltf-viewer                            0x1031c11f4 utils::PreconditionPanic::PreconditionPanic(char const*, char const*, int, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>) + 68
#4	gltf-viewer                            0x1031c1164 utils::TPanic<utils::PreconditionPanic>::panic(char const*, char const*, int, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>) + 232
#5	gltf-viewer                            0x1031c0f54 utils::sprintfToString(char const*, char*) + 0
#6	gltf-viewer                            0x102e9517c filament::AtlasAllocator::AtlasAllocator(unsigned long) + 0
#7	gltf-viewer                            0x102e94654 filament::VirtualResource::~VirtualResource() + 0
#8	gltf-viewer                            0x10319c6d0 filament::BufferInterfaceBlock::getFieldInfo(std::__1::basic_string_view<char, std::__1::char_traits<char>>) const + 256
#9	gltf-viewer                            0x10319c4f8 filament::BufferInterfaceBlock::getFieldOffset(std::__1::basic_string_view<char, std::__1::char_traits<char>>, unsigned long) const + 76
#10	gltf-viewer                            0x102edbf3c void filament::FMaterialInstance::setParameterUntypedImpl<4ul>(std::__1::basic_string_view<char, std::__1::char_traits<char>>, void const*) + 68
#11	gltf-viewer                            0x102ed855c void filament::MaterialInstance::setParameter<int, void>(char const*, unsigned long, int const&) + 116
#12	gltf-viewer                            0x102f04b40 void filament::MaterialInstance::setParameter<int, void>(char const*, int const&) + 68
#13	gltf-viewer                            0x1032f058c (anonymous namespace)::UbershaderProvider::createMaterialInstance(filament::gltfio::MaterialKey*, std::__1::array<filament::gltfio::UvSet, 8ul>*, char const*, char const*) + 1448
#14	gltf-viewer                            0x103256348 filament::gltfio::FAssetLoader::createMaterialInstance(cgltf_material const*, std::__1::array<filament::gltfio::UvSet, 8ul>*, bool, filament::gltfio::FFilamentAsset*) + 468
#15	gltf-viewer                            0x1032532a4 filament::gltfio::FAssetLoader::createRenderable(cgltf_node const*, utils::Entity, char const*, filament::gltfio::FFilamentAsset*) + 652
#16	gltf-viewer                            0x103251280 filament::gltfio::FAssetLoader::recurseEntities(cgltf_node const*, utils::bitset<unsigned int, 1ul, void>, utils::Entity, filament::gltfio::FFilamentAsset*, filament::gltfio::FFilamentInstance*) + 1108
#17	gltf-viewer                            0x103250a58 filament::gltfio::FAssetLoader::createInstance(filament::gltfio::FFilamentAsset*) + 688
  • I attempted to fix this crash :

Image

  • I understand this is not a proper solution to the problem. A good solution would be for Filament to be compatible with properties like sheenColorText. It might also be the case that I’m missing some manual dependencies, causing the demo to fail to recognize these materials. Thanks for letting me know! Love U~
@romainguy
Copy link
Collaborator

This happens when using uber shaders as they can't support all possible combinations of glTF extensions. Instead, run gltf_viewer without the ubershader option on (i.e don't use the -u flag).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants