f3d icon indicating copy to clipboard operation
f3d copied to clipboard

Consider adding a 2D interactor

Open mwestphal opened this issue 4 years ago • 14 comments
trafficstars

If an image is 2D, it can be useful to have a 2D interactor (I'm thinking of DXF or medical images). And tbh, if we implement it, then it makes sense to supports JPG/PNG/TIFF/HDR/TGA/... too since it is basically free. I know this is not the main purpose of f3d but since f3d is GPU accelerated, it may outperform other image previewers with large images.

mwestphal avatar Nov 12 '21 22:11 mwestphal

https://gitlab.kitware.com/f3d/f3d/-/issues/237

mwestphal avatar Nov 12 '21 22:11 mwestphal

Good idea - however, as images are loaded as textures, there are limited in size.

jpouderoux avatar Nov 26 '21 04:11 jpouderoux

images are not loaded as texture but as geometries, in vtk. not sure wht you mean.

mwestphal avatar Nov 26 '21 07:11 mwestphal

VTK can do whatever you want, use image as a texture on a plane or define a fine regular mesh with a color attribute per cell/point. Sorry, I thought we chose the first approach.

jpouderoux avatar Nov 26 '21 08:11 jpouderoux

After trying playing with fbx and textures, supporting images (png, jpg, tga) and a 2D interactor makes complete sense !

mwestphal avatar Dec 05 '21 16:12 mwestphal

Work in progress!

jpouderoux avatar Dec 07 '21 06:12 jpouderoux

Is this still planned @jpouderoux ?

mwestphal avatar Sep 25 '22 07:09 mwestphal

Is this still planned @jpouderoux ?

I just rewrote the old MR for the new master in #438. Let me know what you think. Note: it does not includes image reading as the previous MR. We should do that in a dedicated MR.

jpouderoux avatar Sep 26 '22 01:09 jpouderoux

hi. found this ticket when searching for dxf. Basically, i found the F3D tool because i was looking for a tool which can create thumbnails for Linux for DXF files. It works, but 2D DXF are looking totally wrong. Seems there is no support for 2D DXF yet. I am a vector grahpics guy, which often converts SVG to DXF to postprocess them later on.

this is the output by F3D: grafik

by the way i am using Fedora and F3D can be installed easily using alien:

wget https://github.com/f3d-app/f3d/releases/download/v1.3.1/f3d-1.3.1-Linux.deb
sudo alien --to-rpm -vv f3d-1.3.1-Linux.deb
sudo rpm -ivh f3d-1.3.1-2.x86_64.rpm --nodeps --force

vmario89 avatar Nov 28 '22 12:11 vmario89

Hi @vmario89

The DXF support in F3D is done with Assimp, and the support is not great, to be honest.
For instance, it only supports polylines but not curves.

Also, you are only seeing an horizontal line because the thumbnailer does not orient the DXF file properly in 1.3.1 (the 2D is drawn on the Y=0 plane, so everything is projected onto a line) It is fixed already on master, and it will be fixed in the next release.

Meakk avatar Nov 28 '22 13:11 Meakk

As a workaround to the orientation problem, you can modify the file f3d.thumbnailer and add --up=-Z to the command line.

Meakk avatar Nov 28 '22 13:11 Meakk

nice to know. thanks for help! that works fine (except the curves)

vmario89 avatar Nov 28 '22 13:11 vmario89

@vmario89 Thanks for using F3D et do not hesitate to join our discord :) https://discord.f3d.app/

mwestphal avatar Nov 28 '22 15:11 mwestphal

@jpouderoux are you still around ?

mwestphal avatar Dec 21 '23 10:12 mwestphal