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

Unable to open some GLTF files #46

Open
RedAuburn opened this issue Jan 23, 2025 · 3 comments
Open

Unable to open some GLTF files #46

RedAuburn opened this issue Jan 23, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@RedAuburn
Copy link

Exhibit is unable to open these GLTF files (tested on latest release and manual build from latest master).
They work in the latest version of F3D.

https://github.com/tordanik/OSM2World-default-style/tree/master/models/car

Main bit:

Found a reader for "/run/user/1000/doc/92f187f8/car_hatchback.gltf" : "GLTFDraco"

Loading files: 
/run/user/1000/doc/92f187f8/car_hatchback.gltf

ERROR: In vtkURILoader.cxx, line 210
vtkURILoader (0x7fa1680b4030): Failed to open file "/run/user/1000/doc/92f187f8/car_hatchback.bin"


ERROR: In vtkGLTFImporter.cxx, line 442
vtkF3D
Full Log (expand me)
Application started at 14:13:51
['abc', 'fbx', 'dae', 'dxf', 'off', 'x', '3mf', 'drc', 'gltf', 'glb', 'exo', 'ex2', 'e', '3ds', 'gml', 'dcm', 'gltf', 'glb', 'mha', 'mhd', 'nrrd', 'nhdr', 'obj', 'ply', 'pts', 'stl', 'tiff', 'tif', 'wrl', 'vrml', 'vtk', 'vtu', 'vtp', 'vti', 'vtr', 'vts', 'vtm', 'splat', 'stp', 'step', 'stpnc', 'p21', '210', 'igs', 'iges', 'brep', 'xbf', 'usd', 'usdc', 'usda', 'usdz']
debug
{'cocoa': False, 'egl': True, 'glx': True, 'osmesa': False, 'wgl': False}
VTK window class type is vtkF3DExternalRenderWindow
14:13:52 (f3d_viewer.py:151) INFO: F3D viewer initialized successfully
14:13:52 (window.py:610) INFO: Use color is: False
{'render.background.color': [0.117, 0.117, 0.117]}
No animation available, cannot load a specific animation time
No camera available

Number of files: 0
Number of actors: 0


Not coloring

Scene bounding box: 1,-1,1,-1,1,-1

Camera position: 0,0,1
Camera focal point: 0,0,0
Camera view up: 0,1,0
Camera view angle: 30


14:13:52 (window.py:629) INFO: Setting: translucency-support to True
{'render.effect.translucency_support': True}
14:13:52 (window.py:512) INFO: Setting switch to True
14:13:52 (window.py:629) INFO: Setting: tone-mapping to True
{'render.effect.tone_mapping': True}
14:13:52 (window.py:512) INFO: Setting switch to True
14:13:52 (window.py:629) INFO: Setting: ambient-occlusion to False
{'render.effect.ambient_occlusion': False}
14:13:52 (window.py:512) INFO: Setting switch to False
14:13:52 (window.py:629) INFO: Setting: anti-aliasing to True
{'render.effect.anti_aliasing': True}
14:13:52 (window.py:512) INFO: Setting switch to True
14:13:52 (window.py:629) INFO: Setting: hdri-ambient to False
{'render.hdri.ambient': False}
14:13:52 (window.py:512) INFO: Setting switch to False
14:13:52 (window.py:629) INFO: Setting: light-intensity to 1.5
{'render.light.intensity': 1.5}
14:13:52 (window.py:516) INFO: Setting spin to 1.5
14:13:52 (window.py:629) INFO: Setting: show-edges to False
{'render.show_edges': False}
14:13:52 (window.py:512) INFO: Setting switch to False
14:13:52 (window.py:629) INFO: Setting: edges-width to 1.0
{'render.line_width': 1.0}
14:13:52 (window.py:516) INFO: Setting spin to 1.0
14:13:52 (window.py:629) INFO: Setting: sprite-enabled to False
{'model.point_sprites.enable': False}
14:13:52 (window.py:512) INFO: Setting switch to False
14:13:52 (window.py:629) INFO: Setting: point-size to 1.0
{'render.point_size': 1.0}
14:13:52 (window.py:516) INFO: Setting spin to 1.0
14:13:52 (window.py:629) INFO: Setting: sprites-type to sphere
{'model.point_sprites.type': 'sphere'}
14:13:52 (window.py:638) INFO: Setting: sprites-type to gaussian
14:13:52 (window.py:629) INFO: Setting: sprites-size to 1.0
{'model.point_sprites.size': 1.0}
14:13:52 (window.py:516) INFO: Setting spin to 1.0
14:13:52 (window.py:629) INFO: Setting: model-metallic to 0.0
{'model.material.metallic': 0.0}
14:13:52 (window.py:516) INFO: Setting spin to 0.0
14:13:52 (window.py:629) INFO: Setting: model-roughness to 0.3
{'model.material.roughness': 0.3}
14:13:52 (window.py:516) INFO: Setting spin to 0.3
14:13:52 (window.py:629) INFO: Setting: model-opacity to 1.0
{'model.color.opacity': 1.0}
14:13:52 (window.py:516) INFO: Setting spin to 1.0
14:13:52 (window.py:629) INFO: Setting: armature-enable to False
{'render.armature.enable': False}
14:13:52 (window.py:512) INFO: Setting switch to False
14:13:52 (window.py:629) INFO: Setting: scivis-component to -1
{'model.scivis.component': -1}
14:13:52 (window.py:531) DEBUG: Setting scivis component combo, selected: 0
14:13:52 (window.py:629) INFO: Setting: cells to True
{'model.scivis.cells': True}
14:13:52 (window.py:531) DEBUG: Setting scivis component combo, selected: 0
14:13:52 (window.py:629) INFO: Setting: scivis-enabled to False
{'model.scivis.enable': False}
14:13:52 (window.py:629) INFO: Setting: model-color to (1.0, 1.0, 1.0)
{'model.color.rgb': (1.0, 1.0, 1.0)}
14:13:52 (window.py:629) INFO: Setting: grid to True
{'render.grid.enable': True}
14:13:52 (window.py:512) INFO: Setting switch to True
14:13:52 (window.py:629) INFO: Setting: grid-absolute to False
{'render.grid.absolute': False}
14:13:52 (window.py:512) INFO: Setting switch to False
14:13:52 (window.py:629) INFO: Setting: hdri-skybox to False
{'render.background.skybox': False}
14:13:52 (window.py:512) INFO: Setting switch to False
14:13:52 (window.py:629) INFO: Setting: hdri-file to 
{'render.hdri.file': ''}
14:13:52 (window.py:508) INFO: Setting hdri file row filename to 
{'render.hdri.file': '', 'render.background.skybox': False}
14:13:52 (window.py:629) INFO: Setting: blur-background to True
{'render.background.blur.enable': True}
14:13:52 (window.py:512) INFO: Setting switch to True
14:13:52 (window.py:629) INFO: Setting: blur-coc to 20.0
{'render.background.blur.coc': 20.0}
14:13:52 (window.py:516) INFO: Setting spin to 20.0
14:13:52 (window.py:629) INFO: Setting: bg-color to (1.0, 1.0, 1.0)
{'render.background.color': (1.0, 1.0, 1.0)}
14:13:52 (window.py:610) INFO: Use color is: False
{'render.background.color': [0.117, 0.117, 0.117]}
14:13:52 (window.py:629) INFO: Setting: up to +Y
{'scene.up_direction': '+Y'}
14:13:52 (window.py:521) INFO: Setting up direction combo to 3
14:13:52 (window.py:629) INFO: Setting: orthographic to False
{'scene.camera.orthographic': False}
14:13:52 (window.py:629) INFO: Setting: animation-index to 0
{'scene.animation.index': 0}
14:13:52 (window.py:629) INFO: Setting: animation-time to 0.0
{}
14:13:52 (window.py:629) INFO: Setting: normal-scale to 1.0
{'model.normal.scale': 1.0}
14:13:52 (window.py:629) INFO: Setting: volume to False
{'model.volume.enable': False}
14:13:52 (window.py:629) INFO: Setting: inverse to False
{'model.volume.inverse': False}
14:13:52 (window.py:629) INFO: Setting: grid-color to (0.0, 0.0, 0.0)
{'render.grid.color': (0.0, 0.0, 0.0)}
14:13:52 (window.py:638) INFO: Setting: use-color to False
14:13:52 (window.py:610) INFO: Use color is: False
{'render.background.color': [0.117, 0.117, 0.117]}
14:13:52 (window.py:512) INFO: Setting switch to False
14:13:52 (window.py:638) INFO: Setting: point-up to True
14:13:52 (window.py:512) INFO: Setting switch to True
14:13:52 (window.py:638) INFO: Setting: auto-reload to True
14:13:52 (window.py:512) INFO: Setting switch to True
14:13:52 (window.py:658) INFO: Setting: auto-best to True
14:13:52 (window.py:512) INFO: Setting switch to True
14:13:52 (window.py:658) INFO: Setting: sidebar-show to True
14:13:52 (window.py:444) INFO: Started
14:14:08 (window.py:838) INFO: open file response
{'cocoa': False, 'egl': True, 'glx': True, 'osmesa': False, 'wgl': False}
VTK window class type is vtkF3DExternalRenderWindow
14:14:08 (f3d_viewer.py:151) INFO: F3D viewer initialized successfully
14:14:08 (window.py:869) DEBUG: load file: /run/user/1000/doc/92f187f8/car_hatchback.gltf
14:14:08 (window.py:876) DEBUG: choosing best settings
14:14:08 (window.py:884) DEBUG: best settings is general
14:14:08 (window.py:796) DEBUG: Requested changing settings to 'general'
14:14:08 (window.py:725) DEBUG: settings from name
14:14:08 (window.py:629) INFO: Setting: sprites-type to sphere
{'model.point_sprites.type': 'sphere'}
{'render.effect.translucency_support': True, 'render.effect.tone_mapping': True, 'render.effect.ambient_occlusion': False, 'render.effect.anti_aliasing': True, 'render.hdri.ambient': False, 'render.light.intensity': 1.5, 'render.show_edges': False, 'render.line_width': 1.0, 'model.point_sprites.enable': False, 'render.point_size': 1.0, 'model.point_sprites.type': 'sphere', 'model.point_sprites.size': 1.0, 'model.material.metallic': 0.0, 'model.material.roughness': 0.3, 'model.color.opacity': 1.0, 'render.armature.enable': False, 'model.scivis.component': -1, 'model.scivis.cells': True, 'model.scivis.enable': False, 'model.color.rgb': (1.0, 1.0, 1.0), 'render.grid.enable': True, 'render.grid.absolute': False, 'render.background.skybox': False, 'render.hdri.file': '', 'render.background.blur.enable': True, 'render.background.blur.coc': 20.0, 'render.background.color': (1.0, 1.0, 1.0), 'scene.up_direction': '+Y', 'scene.camera.orthographic': False, 'scene.animation.index': 0, 'model.normal.scale': 1.0, 'model.volume.enable': False, 'model.volume.inverse': False, 'render.grid.color': (0.0, 0.0, 0.0)}
14:14:08 (window.py:610) INFO: Use color is: False
{'render.background.color': [0.117, 0.117, 0.117]}
Found a reader for "/run/user/1000/doc/92f187f8/car_hatchback.gltf" : "GLTFDraco"

Loading files: 
/run/user/1000/doc/92f187f8/car_hatchback.gltf

ERROR: In vtkURILoader.cxx, line 210
vtkURILoader (0x7fa1680b4030): Failed to open file "/run/user/1000/doc/92f187f8/car_hatchback.bin"


ERROR: In vtkGLTFImporter.cxx, line 442
vtkF3DGLTFDracoImporter (0x7fa1680b1580): Error loading model data


14:14:08 (f3d_viewer.py:272) ERROR: Error while loading file: failed to load scene
14:14:08 (window.py:932) DEBUG: on file not opened
14:14:08 (window.py:610) INFO: Use color is: False
{'render.background.color': [0.117, 0.117, 0.117]}
@Nokse22
Copy link
Owner

Nokse22 commented Jan 24, 2025

I run into this issue as well, I don't really know how to fix it other than breaking the Flatpak sandbox and giving filesystem access (F3D has complete access to the home directory).

This kind of files have a .gltf and a separate .bin file where the actual data is stored, but opening the .gltf alone will not give the app access to the .bin file.

@Nokse22 Nokse22 added the bug Something isn't working label Jan 24, 2025
@mwestphal
Copy link

Hi @Nokse22

I believe you need F3D to fix this first: f3d-app/f3d#1100

This may take a while though :/

@Nokse22
Copy link
Owner

Nokse22 commented Feb 24, 2025

Thank you @mwestphal, flatpaks exposes files to the app using a portal in /run/user/1000/doc/... so opening the .gltf file alone doesn't give the app access to the .bin file that the GLFT expects to be in the same folder.
So it is a drawback of flatpaks portals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants