f3d-app / f3d

Fast and minimalist 3D viewer.
https://f3d.app
BSD 3-Clause "New" or "Revised" License
2.89k stars 207 forks source link

Cannot render 3mf files, stl work fine #1708

Open override80 opened 1 day ago

override80 commented 1 day ago

Hi,

I cannot render 3mf files downloaded from makerworld or saved via OrcaSlicer or Bambu studio. I simply get a blank window. I do not have any problem loading stl files. I am on Ubuntu 24.04, installed f3d using the .deb file provided here (https://github.com/f3d-app/f3d/blob/master/doc/user/INSTALLATION.md). Same result using the portable version.

image

image

The log from f3d cli with --verbose:

Loading plugin "alembic"
  Version: 1.0
  Description: Alembic support (version 1.8.5)
  Readers:
    Alembic
Loading plugin "assimp"
  Version: 1.0
  Description: Assimp support (version 5.4.0)
  Readers:
    Filmbox
    Collada
    AutoCAD DXF
    Object File Format
    DirectX File Format
    3D Manufacturing Format
Loading plugin "draco"
  Version: 1.0
  Description: Draco support (version 1.5.6)
  Readers:
    Draco
    GL Transmission Format
Loading plugin "exodus"
  Version: 1.0
  Description: VTK Exodus support
  Readers:
    Exodus II
Loading plugin "native"
  Version: 1.0
  Description: Native VTK I/O support
  Readers:
    Autodesk 3D Studio
    CityGML
    DICOM
    GL Transmission Format
    MetaImage
    Nearly Raw Raster Data
    Wavefront OBJ
    Polygon
    Point Cloud
    Standard Triangle Language
    TIFF
    VRML
    VTK Legacy
    VTK XML UnstructuredGrid
    VTK XML PolyData
    VTK XML ImageData
    VTK XML RectangularGrid
    VTK XML StructuredGrid
    VTK XML MultiBlock
    3D Gaussian splats
Loading plugin "occt"
  Version: 1.0
  Description: OpenCASCADE support (version 7.7.2)
  Readers:
    STEP ISO 10303
    Initial Graphics Exchange Specification
    Open CASCADE BRep
Loading plugin "usd"
  Version: 1.0
  Description: USD support
  Readers:
    Universal Scene Descriptor
Loading plugin "vdb"
  Version: 1.0
  Description: VTK OpenVDB support
  Readers:
    VDB
Using config directory /usr/share/f3d/configs/config.d
Using config directory /usr/share/f3d/configs/config.d
using `global` config from /usr/share/f3d/configs/config.d/10_global.json
+ animation-progress: true
+ anti-aliasing: true
+ axis: true
+ camera-direction: -1,-0.5,-1
+ filename: true
+ grid: true
+ hdri-ambient: true
+ progress: true
+ scalars: 
+ tone-mapping: true
+ translucency-support: true
using `global` config from /usr/share/f3d/configs/config.d/10_global.json
= animation-progress: true
= anti-aliasing: true
= axis: true
= camera-direction: -1,-0.5,-1
= filename: true
= grid: true
= hdri-ambient: true
= progress: true
= scalars: 
= tone-mapping: true
= translucency-support: true
========== Configuring engine ==========
Engine configured
========== Loading 3D file ==========
No file to load provided.
========== Rendering ==========
Render done
========== Loading 3D file ==========
using `global` config from /usr/share/f3d/configs/config.d/10_global.json
+ animation-progress: true
+ anti-aliasing: true
+ axis: true
+ camera-direction: -1,-0.5,-1
+ filename: true
+ grid: true
+ hdri-ambient: true
+ progress: true
+ scalars: 
+ tone-mapping: true
+ translucency-support: true
using `global` config from /usr/share/f3d/configs/config.d/10_global.json
= animation-progress: true
= anti-aliasing: true
= axis: true
= camera-direction: -1,-0.5,-1
= filename: true
= grid: true
= hdri-ambient: true
= progress: true
= scalars: 
= tone-mapping: true
= translucency-support: true
using `.*(fbx|dae|off|dxf|x|3mf)` config from /usr/share/f3d/configs/config.d/10_assimp.json
+ load-plugins: assimp
using `.*(off|3mf)` config from /usr/share/f3d/configs/config.d/10_assimp.json
- camera-direction: -1,-0.5,-1
+ camera-direction: -1,1,-0.5
+ up: +Z
using `.*(fbx|dae|off|dxf|x|3mf)` config from /usr/share/f3d/configs/config.d/10_assimp.json
= load-plugins: assimp
using `.*(off|3mf)` config from /usr/share/f3d/configs/config.d/10_assimp.json
= camera-direction: -1,1,-0.5
= up: +Z
Plugin "assimp" already loaded
Found a reader for "/home/override/Desktop/3D Prints/3dbenchy_MIT.3mf" : "3MF"
Loading 3D scene: /home/override/Desktop/3D Prints/3dbenchy_MIT.3mf

No animation available in this file
No camera available in this file

Scene Graph:
------------
3MF
 Object_2

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

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

========== Rendering ==========
Render done

Output from f3d --readers-list:

Name       Plugin  Description                             Exts  Mime-types             
----------------------------------------------------------------------------------------
Alembic    alembic Alembic                                 abc   application/vnd.abc    
----------------------------------------------------------------------------------------
FBX        assimp  Filmbox                                 fbx   application/vnd.fbx    
----------------------------------------------------------------------------------------
Collada    assimp  Collada                                 dae   application/vnd.dae    
----------------------------------------------------------------------------------------
DXF        assimp  AutoCAD DXF                             dxf   image/vnd.dxf          
----------------------------------------------------------------------------------------
OFF        assimp  Object File Format                      off   application/vnd.off    
----------------------------------------------------------------------------------------
DirectX    assimp  DirectX File Format                     x     application/vnd.x      
----------------------------------------------------------------------------------------
3MF        assimp  3D Manufacturing Format                 3mf   model/3mf              
----------------------------------------------------------------------------------------
Draco      draco   Draco                                   drc   application/vnd.drc    
----------------------------------------------------------------------------------------
GLTFDraco  draco   GL Transmission Format                  gltf  model/gltf-binary      
                                                           glb   model/gltf+json        
----------------------------------------------------------------------------------------
ExodusII   exodus  Exodus II                               exo   application/vnd.exodus 
                                                           ex2   
                                                           e     
----------------------------------------------------------------------------------------
3DS        native  Autodesk 3D Studio                      3ds   application/vnd.3ds    
----------------------------------------------------------------------------------------
CityGML    native  CityGML                                 gml   application/gml+xml    
----------------------------------------------------------------------------------------
DICOM      native  DICOM                                   dcm   application/dicom      
----------------------------------------------------------------------------------------
GLTF       native  GL Transmission Format                  gltf  model/gltf-binary      
                                                           glb   model/gltf+json        
----------------------------------------------------------------------------------------
MetaImage  native  MetaImage                               mha   application/vnd.mhd    
                                                           mhd   
----------------------------------------------------------------------------------------
Nrrd       native  Nearly Raw Raster Data                  nrrd  application/vnd.nrrd   
                                                           nhdr  
----------------------------------------------------------------------------------------
OBJ        native  Wavefront OBJ                           obj   model/obj              
----------------------------------------------------------------------------------------
PLYReader  native  Polygon                                 ply   application/vnd.ply    
----------------------------------------------------------------------------------------
PTS        native  Point Cloud                             pts   application/vnd.pts    
----------------------------------------------------------------------------------------
STL        native  Standard Triangle Language              stl   model/stl              
----------------------------------------------------------------------------------------
TIFF       native  TIFF                                    tiff  application/x-tgif     
                                                           tif   
----------------------------------------------------------------------------------------
VRMLReader native  VRML                                    wrl   model/vrml             
                                                           vrml  
----------------------------------------------------------------------------------------
VTKLegacy  native  VTK Legacy                              vtk   application/vnd.vtk    
----------------------------------------------------------------------------------------
VTKXMLVTU  native  VTK XML UnstructuredGrid                vtu   application/vnd.vtu    
----------------------------------------------------------------------------------------
VTKXMLVTP  native  VTK XML PolyData                        vtp   application/vnd.vtp    
----------------------------------------------------------------------------------------
VTKXMLVTI  native  VTK XML ImageData                       vti   application/vnd.vti    
----------------------------------------------------------------------------------------
VTKXMLVTR  native  VTK XML RectangularGrid                 vtr   application/vnd.vtr    
----------------------------------------------------------------------------------------
VTKXMLVTS  native  VTK XML StructuredGrid                  vts   application/vnd.vts    
----------------------------------------------------------------------------------------
VTKXMLVTM  native  VTK XML MultiBlock                      vtm   application/vnd.vtm    
----------------------------------------------------------------------------------------
Splat      native  3D Gaussian splats                      splat application/vnd.splat  
----------------------------------------------------------------------------------------
STEP       occt    STEP ISO 10303                          stp   application/vnd.step   
                                                           step  
                                                           stpnc 
                                                           p21   
                                                           210   
----------------------------------------------------------------------------------------
IGES       occt    Initial Graphics Exchange Specification igs   model/iges             
                                                           iges  
----------------------------------------------------------------------------------------
BREP       occt    Open CASCADE BRep                       brep  application/vnd.brep   
----------------------------------------------------------------------------------------
USD        usd     Universal Scene Descriptor              usd   application/vnd.usd    
                                                           usdc  application/vnd.usdc   
                                                           usda  model/vnd.usda         
                                                           usdz  model/vnd.usdz+zip     
----------------------------------------------------------------------------------------
VDB        vdb     VDB                                     vdb   application/vnd.vdb    
----------------------------------------------------------------------------------------

The web assembly version on https://f3d.app/web/ works fine, so I'm sure it has nothing to do with the file format itself... I have no clue what to look for to further investigate the issue, any help is very welcome!

mwestphal commented 1 day ago

Can you share the .3mf file in question ? @override80

override80 commented 1 day ago

Sure! Here it is. the problem is happening with all 3mf files unfortunately in my case.

https://file.io/jypjmwAu5FJ9

override80 commented 1 day ago

I'm also getting a lot of these when generating thumbnails:

2024-11-14T10:09:49.393443+01:00  kernel: f3d[7172]: segfault at 968 ip 00007ea6f5909a72 sp 00007fffeeb6bd10 error 4 in libX11.so.6.4.0[7ea6f58dc000+90000] likely on CPU 5 (core 1, socket 0)
2024-11-14T10:09:49.393459+01:00  kernel: Code: 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 55 48 89 e5 41 54 41 89 f4 53 48 89 fb 48 83 ec 30 64 48 8b 04 25 28 00 00 00 48 89 45 e8 <48> 8b 87 68 09 00 00 48 85 c0 74 02 ff 10 ba 04 00 00 00 be 2b 00
2024-11-14T10:09:49.393460+01:00  kernel: f3d[7174]: segfault at 968 ip 0000777d5b909a72 sp 00007ffce2034990 error 4 in libX11.so.6.4.0[777d5b8dc000+90000] likely on CPU 7 (core 3, socket 0)
2024-11-14T10:09:49.393461+01:00  kernel: Code: 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 55 48 89 e5 41 54 41 89 f4 53 48 89 fb 48 83 ec 30 64 48 8b 04 25 28 00 00 00 48 89 45 e8 <48> 8b 87 68 09 00 00 48 85 c0 74 02 ff 10 ba 04 00 00 00 be 2b 00
2024-11-14T10:09:49.393463+01:00  kernel: f3d[7170]: segfault at 968 ip 00007b5499509a72 sp 00007fff25845870 error 4 in libX11.so.6.4.0[7b54994dc000+90000] likely on CPU 6 (core 2, socket 0)
2024-11-14T10:09:49.393463+01:00  kernel: Code: 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 55 48 89 e5 41 54 41 89 f4 53 48 89 fb 48 83 ec 30 64 48 8b 04 25 28 00 00 00 48 89 45 e8 <48> 8b 87 68 09 00 00 48 85 c0 74 02 ff 10 ba 04 00 00 00 be 2b 00
2024-11-14T10:09:49.416259+01:00  kernel: f3d[7175]: segfault at 968 ip 00007793be6b3a72 sp 00007ffd5bfb2ee0 error 4 in libX11.so.6.4.0[7793be686000+90000] likely on CPU 0 (core 0, socket 0)
2024-11-14T10:09:49.416358+01:00  kernel: Code: 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 55 48 89 e5 41 54 41 89 f4 53 48 89 fb 48 83 ec 30 64 48 8b 04 25 28 00 00 00 48 89 45 e8 <48> 8b 87 68 09 00 00 48 85 c0 74 02 ff 10 ba 04 00 00 00 be 2b 00
mwestphal commented 1 day ago

I'm unable to open this file in F3D nor in F3DWeb, are you sure you have been able to ?