Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FBX metadata information #222

Open
pointcache opened this issue Jan 25, 2022 · 11 comments
Open

FBX metadata information #222

pointcache opened this issue Jan 25, 2022 · 11 comments
Labels
type:enhancement New feature or request

Comments

@pointcache
Copy link

pointcache commented Jan 25, 2022

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 pointcache added the type:enhancement New feature or request label Jan 25, 2022
@mwestphal
Copy link
Contributor

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 ?

@Meakk
Copy link
Member

Meakk commented Jan 25, 2022

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

image

@pointcache
Copy link
Author

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

@Meakk
Copy link
Member

Meakk commented Jan 25, 2022

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

@mwestphal
Copy link
Contributor

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 mwestphal changed the title Model stats display FBX metadata information Jan 25, 2022
@pointcache
Copy link
Author

Thank you!

@pointcache
Copy link
Author

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.

@Meakk
Copy link
Member

Meakk commented Jan 27, 2022

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

@mwestphal mwestphal added this to the 2.1.0 milestone Apr 26, 2023
@mwestphal mwestphal added the good first issue Good for newcomers label Apr 26, 2023
@mwestphal mwestphal modified the milestones: 2.1.0, 2.2.0 May 27, 2023
@Jenfong
Copy link

Jenfong commented Aug 4, 2023

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 }')'

@mwestphal mwestphal modified the milestones: 2.2.0, 2.3.0 Sep 17, 2023
@mwestphal
Copy link
Contributor

This may be done in the context of #653

@mwestphal mwestphal modified the milestones: 2.3.0, 2.4.0 Dec 21, 2023
@mwestphal mwestphal added the help wanted Please help with this issue! label Jan 7, 2024
@mwestphal mwestphal removed good first issue Good for newcomers help wanted Please help with this issue! labels Jan 22, 2024
@Meakk Meakk added this to F3D Feb 2, 2024
@mwestphal mwestphal removed this from the 2.4.0 milestone Feb 3, 2024
@mwestphal mwestphal moved this to To do in F3D Feb 10, 2024
@mwestphal
Copy link
Contributor

This have been improved thanks to #1609

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement New feature or request
Projects
Status: To do
Development

No branches or pull requests

4 participants