f3d-app / f3d

Fast and minimalist 3D viewer.
https://f3d.app
BSD 3-Clause "New" or "Revised" License
2.84k stars 205 forks source link

Hierarchy view to toggle rendering of individual components. #1202

Open AmazingMrX opened 9 months ago

AmazingMrX commented 9 months ago
          I'd like to see this model hierarchy 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.

Originally posted by @AmazingMrX in https://github.com/f3d-app/f3d/issues/18#issuecomment-1570039054

I was asked to make a separate issue for this point from a thread in another issue. The discussion circulated around creating a hierarchical representation of a model file's individual sub-components. My use-case for this functionality was to toggle pieces of models on and off that are only meant to be viewed individually but are compacted together in one file. Currently F3D renders all of these objects at the same time by default.

E.g.: A file of an object with multiple damage states, or a file of a room with different pieces of available clutter and decor objects. A practical example of the latter was provided in the previous discussion.

mwestphal commented 9 months ago

@snoyer this is close to what we ve discussed I think

Meakk commented 9 months ago

We need imgui first for that and use the TreeNode widget with visibility toggles.

mwestphal commented 9 months ago

We need imgui first for that and use the TreeNode widget with visibility toggles.

Not only that, but we need this as well: #653