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

Add model/material/hierarchy and information #18

Open
mwestphal opened this issue Nov 12, 2021 · 8 comments
Open

Add model/material/hierarchy and information #18

mwestphal opened this issue Nov 12, 2021 · 8 comments
Labels
help wanted Please help with this issue! source:VTK type:enhancement New feature or request

Comments

@mwestphal
Copy link
Contributor

mwestphal commented Nov 12, 2021

Context
F3D is able to load many type of files. F3D relies on each individual importers to provide meta data information about the file. However, some importers are not great at providing such info.

Recently, a new API have been added to VTK Importers: vtkImporter::GetSceneHierarchy
We could use it to recover information about the scene hierarchy.

Suggested Solution

  • Experiment with vtkGLTFImporter::GetSceneHiearchy to transition metadata to hierarchy
  • Implement this API in the needed importers in VTK
  • Implement this API in the needed importers in F3D
  • Use it in the widgets
  • Add/Update tests

Needs #1742

Notes
more info here: https://gitlab.kitware.com/f3d/f3d/-/issues/174

@mwestphal mwestphal added this to the 1.3.0 milestone Nov 12, 2021
@mwestphal mwestphal removed this from the 1.3.0 milestone Aug 14, 2022
@mwestphal mwestphal mentioned this issue Feb 5, 2023
2 tasks
@AmazingMrX
Copy link

I'd like to see this model hierchy added just so users can toggle visibility of the model components. Right now, F3D renders everything by default. However, complex models may be designed to only be viewed in an arbitrary configuration of components that's only a subset of all components present in the file.

Example: An FBX file containing a character model with multiple attached alternative outfits.

It may be possible that this could apply to materials and textures as well. Say, for instance: An object in a video game has multiple states represented by differing textures that are swapped programmatically.

It would be nice to accurately view these assets in F3D with some simple visibility toggles on a hierarchical list.

@mwestphal
Copy link
Contributor Author

That's an interesting feature ! Could you share such a FBX file to see if it would be feasible ?

@AmazingMrX
Copy link

Yep! Here is a freely available model of a living room in a variety of formats.
I've got the FBX version temporarily hosted here on Autodesk's online Viewer (with textures) so you can readily see the hierarchy chart. Click "Model Browser" in the upper left to see the list with everything that can be toggled in the file. I'm basically asking for the same functionality in F3D.

@mwestphal
Copy link
Contributor Author

Ok I see that. We need to check what assimp (what we are using to read fbx) is providing us, then we need to see how to expose some kind of block selection mechanism. That may come at some point but this is likely in the long term feature, definitely after #653 .

Wdyt @Meakk ?

@Meakk
Copy link
Member

Meakk commented May 31, 2023

That's an interesting feature indeed.
I don't think it's necessarily difficult but it introduces some kind of advanced GUI widgets, so do we want that? If yes, with imgui I guess?

@mwestphal
Copy link
Contributor Author

UI to control that is another subject and would require imgui. We can just list block and provide a option to control wich block to show for starters.

@mwestphal mwestphal added the help wanted Please help with this issue! label Jan 7, 2024
@mwestphal
Copy link
Contributor Author

@AmazingMrX please create a dedicated issue for your idea :)

@mwestphal mwestphal added workflow:discussion and removed help wanted Please help with this issue! labels Jan 20, 2024
@mwestphal mwestphal added this to F3D Feb 3, 2024
@mwestphal mwestphal moved this to Investigate in F3D Feb 10, 2024
@mwestphal mwestphal added the help wanted Please help with this issue! label Dec 2, 2024
@mwestphal
Copy link
Contributor Author

Updated with more info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Please help with this issue! source:VTK type:enhancement New feature or request
Projects
Status: Investigate
Development

No branches or pull requests

3 participants