f3d icon indicating copy to clipboard operation
f3d copied to clipboard

3mf file rendering fails

Open yannickbattail opened this issue 9 months ago • 4 comments

Describe the bug the shapes displayed have some some transparency out of nowhere.

Image

To Reproduce

  1. I generate 3mf file from openscad
  2. Open the file test_3mf.3mf with de GUI or generate an image with de command line f3d --resolution 512,512 --no-config --output test_3mf.png test_3mf.3mf

Expected behavior 2 shapes must be displayed : a blue star and a red cylinder. both shapes must be colored uniformly (no transparency)

Image

System Information:

  • OS: ubuntu 22.04
  • GPU intel. nodriver
  • GPU and GPU driver:
  • OS: ubuntu 24.10
  • GPU nvidia GPU driver: default nvidia driver for ubuntu

F3D Information F3D 3.0.0

F3D - A fast and minimalist 3D viewer Version: 3.0.0-147-gc236c82b. Build date: 2025-03-25 01:12:36. Build system: Linux 64-bits. Compiler: GNU 9.4.0. Module ImGui: ON. Module OpenEXR: ON. Module Raytracing: ON. VTK version: 9.4.1-1791-g33d0f0a696 (date: 20250324). Copyright (C) 2019-2021 Kitware SAS. Copyright (C) 2021-2025 Michael Migliore, Mathieu Westphal. License BSD-3-Clause.

Additional context the script i use to generate the 3mf file

#!/bin/bash

echo '
$fn=20;
color("blue") {
  union() {
    cube(20, center=true);
    rotate([0,0,45]) {
      cube(20, center=true);
    }
  }
}
color("red") {
  translate([30,0,0]) {
    cylinder(h=25, d=20, center=true);
  }
}
' > test_3mf.scad

# generate test_3mf_expected.png
openscad -O 'export-3mf/color-mode=model' -O 'export-3mf/material-type=color' --enable lazy-union --backend Manifold -o test_3mf_expected.png test_3mf.scad
# generate test_3mf.3mf
openscad -O 'export-3mf/color-mode=model' -O 'export-3mf/material-type=color' --enable lazy-union --backend Manifold -o test_3mf.3mf test_3mf.scad

f3d --resolution 512,512 --no-config --output test_3mf.png test_3mf.3mf

yannickbattail avatar Mar 25 '25 18:03 yannickbattail

Hi @yannickbattail

Can you share the .3mf file ? I do not have openscad on hand.

@snoyer may have some inputs.

mwestphal avatar Mar 25 '25 18:03 mwestphal

I could not attach a .3mf file to the issue. i found a site for sharing https://limewire.com/d/ZucWH#bj1e7XwbDo

yannickbattail avatar Mar 25 '25 23:03 yannickbattail

I confirm there seems to be an assimp related issue here

mwestphal avatar Mar 26 '25 06:03 mwestphal