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

clearCoatMap : reason: sampler named "clearCoatMap" not found #6109

Closed
ccworld1000 opened this issue Sep 28, 2022 · 21 comments · Fixed by #6122
Closed

clearCoatMap : reason: sampler named "clearCoatMap" not found #6109

ccworld1000 opened this issue Sep 28, 2022 · 21 comments · Fixed by #6122
Assignees
Labels
bug Something isn't working duplicate This issue or pull request already exists gltf Specific to glTF support ios Issue/request for iOS only

Comments

@ccworld1000
Copy link

ccworld1000 commented Sep 28, 2022

Describe the bug
clearCoatMap : reason: sampler named "clearCoatMap" not found

To Reproduce
Steps to reproduce the behavior:

  1. Import a new glb model into the project hello-gltf in Maos 12 to replace the original model

Expected behavior
A clear and concise description of what you expected to happen.
crash : reason: sampler named "clearCoatMap" not found

Screenshots
If applicable, add screenshots to help explain your problem.
Screen Shot 2022-09-28 at 11 19 49

Logs
If applicable, copy logs from your console here. Please do not
use screenshots of logs, copy them as text.
2022-09-28 11:18:30.982812+0800 hello-gltf[4591:105410] Metal GPU Frame Capture Enabled
2022-09-28 11:18:30.983199+0800 hello-gltf[4591:105410] Metal API Validation Enabled
FEngine (64 bits) created at 0x7fe5b180c400 (threading is enabled)
FEngine resolved backend: Metal
Selected physical device 'Apple iOS simulator GPU'
FEngine feature level: 1
Panic
in getSamplerInfo:97
reason: sampler named "clearCoatMap" not found
CoreSimulator 842.8 - Device: iPhone 13 (D1A3AAD9-E8DE-4E05-9889-8D12FB891708) - Runtime: iOS 16.0 (20A5303f) - DeviceType: iPhone 13

Desktop (please complete the following information):

  • OS: [iOS]
  • GPU: [AMD]
  • Backend: [Metal]

Smartphone (please complete the following information):

  • Device: [MacOS12/ iPhone]
  • OS: [iOS16]
  • Xcode: [14]
  • filament: [filament-1.27.1]

Additional context
Add any other context about the problem here.
I found that this problem is very similar, but the original library file seems to be missing. I don't know how to deal with it in the new version
#4143

@romainguy romainguy added bug Something isn't working ios Issue/request for iOS only gltf Specific to glTF support labels Sep 28, 2022
@prideout
Copy link
Contributor

@bejado this bug is probably my fault but I don't have an iOS device. I wonder what's going on. Do you recommend using the iOS simulator to repro?

@ccworld1000 does this happen if you import any model, or does it only happen with models that have clearcoat?

@bejado
Copy link
Member

bejado commented Sep 28, 2022

Let me try to reproduce on the simulator

@bejado
Copy link
Member

bejado commented Sep 29, 2022

I'm unable to reproduce; I can successfully load a glb file with clear coat in the iOS simulator. I can try on device, but I doubt that would change anything.

@bejado
Copy link
Member

bejado commented Sep 29, 2022

My only idea is that you might be trying to apply clear coat to a model that has some other special feature (e.g., sheen). I don't think we support this. @ccworld1000 are you able to share your model with us?

@ccworld1000
Copy link
Author

The simulator can support running @prideout @bejado

@ccworld1000
Copy link
Author

ccworld1000 commented Sep 29, 2022

The model is also very simple, which is a cube.
CCCubeTest123.glb.txt

rename "CCCubeTest123.glb.txt" -> "CCCubeTest123.glb"

@prideout @bejado

@ccworld1000
Copy link
Author

CC # file *
CCCubeTest123.glb: glTF binary model, version 2, length 2104 bytes
CCCubeTest123.glb.txt: glTF binary model, version 2, length 2104 bytes
CC #

It doesn't seem to matter if you don't rename

@ccworld1000
Copy link
Author

ccworld1000 commented Sep 29, 2022

model Screen Shot

Screen Shot 2022-09-29 at 09 52 03

@bejado
Copy link
Member

bejado commented Sep 29, 2022

I'll try on device tomorrow.

@ccworld1000
Copy link
Author

The simulation should also run

@daemyung
Copy link
Contributor

@ccworld1000 Will you try #6122?

@romainguy
Copy link
Collaborator

Looks like the issue is due to KHR_materials_ior, which causes us to pick the clear coat base spec. The fix proposed by @daemyung will work once my comments are taken into account.

@romainguy romainguy added the duplicate This issue or pull request already exists label Sep 29, 2022
@romainguy
Copy link
Collaborator

See issue #6121 instead

@ccworld1000
Copy link
Author

I use the binary library on tag instead of compiling it myself.
It is estimated that the test can only be performed on my side after the new library is updated.
The associated model is already above.

The model is also very simple, which is a cube. CCCubeTest123.glb.txt

rename "CCCubeTest123.glb.txt" -> "CCCubeTest123.glb"

@prideout @bejado

@daemyung

@daemyung
Copy link
Contributor

@ccworld1000 I have tested CCCubeTest123.glb and it's fixed by #6122.

@ccworld1000
Copy link
Author

I just used the binary library of the new tag 1.27.2 for testing
Not sure if the problem is completely solved?
1.gltf_viewer may be fixed
2. It seems that the iOS simulator still has problems

@daemyung

@ccworld1000
Copy link
Author

call stack text file

call_stack.txt

@ccworld1000
Copy link
Author

* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x000000010f94100e libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x000000010f68d1ff libsystem_pthread.dylib`pthread_kill + 263
    frame #2: 0x000000010f576fef libsystem_c.dylib`abort + 130
    frame #3: 0x000000010ba14a02 hello-gltf`utils::TPanic<utils::PreconditionPanic>::panic(char const*, char const*, int, char const*, ...) + 242
    frame #4: 0x000000010ba0ca51 hello-gltf`filament::SamplerInterfaceBlock::getSamplerInfo(std::__1::basic_string_view<char, std::__1::char_traits<char> >) const + 97
    frame #5: 0x000000010b9bb761

@ccworld1000
Copy link
Author

in SamplerInterfaceBlock

@ccworld1000
Copy link
Author

The top screenshot is still valid

@romainguy
Copy link
Collaborator

The fix is not that in release. You'll have to wait a week or two.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists gltf Specific to glTF support ios Issue/request for iOS only
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants