f3d icon indicating copy to clipboard operation
f3d copied to clipboard

FBX metadata information

Open pointcache opened this issue 3 years ago • 12 comments
trafficstars

Is your feature request related to a problem? Please describe. Need stats display. At least the "overall" for everything loaded (selection of separate meshes and displaying selected stats would be more complex).

Describe the solution you'd like Add the following to the metadata of the fbx importer

  • Tris count
  • vert count
  • used UV channels
  • num of meshes
  • amount of bound materials
  • mesh names

Describe alternatives you've considered So far its only to load it into blender/ engine.

Additional context I want to use this tool not as an artist but as someone who has to validate meshes.

pointcache avatar Jan 25 '22 14:01 pointcache

Verbose mode already provides lots of informations in the terminal:

[glow@arch ~/f3d/build]$ ./bin/f3d ../src/testing/data/dragon.vtu  --verbose
Loading: /home/glow/f3d/src/testing/data/dragon.vtu

No array found for scalar coloring and volume rendering
No camera available in this file


Number of points: 69827
Number of cells: 139650
2 point data array(s):
  Normals : float : [-0.999971, 0.999813] [-0.999992, 0.999986] [-0.999988, 0.999995] 
  UV coordinates from field : float : [0, 1] [0, 0] 
0 cell data array(s):
0 field data array(s):

No animations available in this file


Not coloring
Not coloring
Camera position is: 2.26745, 3.82625, 507.698.
Camera focal point is: 2.26745, 3.82625, 9.63185.
Camera view up is: 0, 1, 0.
Camera view angle is: 30.

Is that what you are looking for ?

mwestphal avatar Jan 25 '22 14:01 mwestphal

Using hotkey M or --metadata option display vertex and triangle count.

image

Meakk avatar Jan 25 '22 14:01 Meakk

Hi i tested on an fbx file, i have no metadata. I assume metadata implies the information is read from the file, and not computed on load? image

pointcache avatar Jan 25 '22 15:01 pointcache

Unfortunately, it's not working for FBX yet (and all "full scene" formats), but it should be relatively easy to implement.

Meakk avatar Jan 25 '22 15:01 Meakk

all "full scene" formats

Some full scene importer provide metadata, but definitely not fbx. I will rename the issue to focus on fbx metadata.

mwestphal avatar Jan 25 '22 15:01 mwestphal

Thank you!

pointcache avatar Jan 25 '22 15:01 pointcache

Actually if you look at what i initially asked, i don't think just reading meta is enough. If its possible, consider adding expanded statistics. Right now this is a tool for artists to view their work, but it has the potential to become very powerful validation tool. You can see how a similar "debug" mode works in 3dsMax . What im saying is that this tool could be invaluable to technical artists/supervisors who have to deal with massive amounts of meshes daily, if we have the tools to validate those things. Recently had a mesh with submeshes just hidden inside the geometry (artist error) which inflated the tricount significantly. I had to explode the whole mesh to find it out, which could be remedied with some form of submesh outline/ transparent unique color render mode.

pointcache avatar Jan 27 '22 15:01 pointcache

which could be remedied with some form of submesh outline/ transparent unique color render mode.

It's not supported for FBX yet, but the geometry mode can help you for that: f3d myfile.gltf --geometry-only --opacity=0.2 --depth-peeling

Meakk avatar Jan 27 '22 16:01 Meakk

I just convert fbx to gltf by FBX2glTF;then read the ".gltf" file to get the related matedata . for example get the materials count by shell script : cat example.gltf | jq '.materials| length' | awk '{if($0 >0 ) print $0 ; else print 0 }')'

Jenfong avatar Aug 04 '23 02:08 Jenfong

This may be done in the context of #653

mwestphal avatar Dec 21 '23 10:12 mwestphal