f3d-app / f3d

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

Empty output with a specific .3mf file #1543

Open bepstein111 opened 1 month ago

bepstein111 commented 1 month ago

Describe the bug When I open f3d to view any 3mf file, all I see is a gray background, the file name, and the XYZ compass: Screenshot_20240715_231919

To Reproduce Steps to reproduce the behavior:

  1. Open the file using f3d [--verbose] example.3mf
  2. See nothing

Expected behavior The object(s) from the file appear in the window.

System Information:

F3D Information Paste the content of f3d --version: F3D 2.5.0

F3D - A fast and minimalist 3D viewer Version: 2.5.0. Build date: 2024-07-01 21:05:31. Build system: Linux 64-bits. Compiler: GNU 8.4.0. External rendering module: ON. Raytracing module: ON. VTK version: 9.3.0-3457-gecf3646d64 (date: 20240620). Copyright (C) 2019-2021 Kitware SAS. Copyright (C) 2021-2024 Michael Migliore, Mathieu Westphal. License BSD-3-Clause. By Michael Migliore, Mathieu Westphal and Joachim Pouderoux.

Additional context

Verbose Logging:
========== Initializing ==========
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 ==========
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/bep/Downloads/PC4-M5.3MF.3mf" : "3MF"
Loading 3D scene: /home/bep/Downloads/PC4-M5.3MF.3mf

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

Scene Graph:
------------
3MF
 Object_2
 Object_4
 Object_6
 Object_8

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

Thanks in advance for taking the time to help me out

mwestphal commented 1 month ago

Can you share a non-fonctioning .3mf file ?

it works fine here with this: gears.zip

bepstein111 commented 1 month ago

I'd assumed it was something on my end, so I think it'll work fine for you, but maybe not. AMSLitePTFEAdapterPC04-M4.zip

mwestphal commented 1 month ago

I confirm this file is being read by F3D as an basically empty file:

Plugin "assimp" already loaded
Found a reader for "/home/glow/data/tmp/AMSLitePTFEAdapterPC04-M4.3mf" : "3MF"
Loading 3D scene: /home/glow/data/tmp/AMSLitePTFEAdapterPC04-M4.3mf

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

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

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

This is probably caused by an assimp issue

snoyer commented 1 month ago

This is probably caused by an assimp issue

Using assimp export to convert to glTF produces a file with the same 3 nodes F3D reports (3MF root with 2 children: Object_2 and Object_3) but no data (no meshes, data buffer of length 0)