Open PathogenDavid opened 6 months ago
Also just in case it wasn't clear: You don't need to support PBR to use glTF, it's only required for a conformant renderer. (2 of the 3 renderers I mentioned weren't conformant in that regard since they were for a project that didn't use PBR.)
We can start with glTF w/o PBR if that's deemed necessary or desirable.
Discussed at the end of dev club today. We started with talking about updating Assimp.NET (or replacing it with our own) for our scene loading infrastructure. I suggested it might be better to name one preferred format that Bonsai declared first-class support for (as opposed to partial support for several older formats as we do today.)
Within the games industry there is wide support for glTF and growing support for USD. I personally have a lot of experience with glTF and have been very happy with it, I've been looking for an excuse to learn more about USD.
I'm creating this issue both to ramble out my thoughts and to track this potential effort.
Physically based rendering (PBR)
Defining physically based rendering (PBR) up front (this might seem unrelated but it falls out naturally from supporting either of these):
A downside of PBR is that it's more computationally heavy to render. It's not a problem for desktop-class GPUs but can be for mobile-class GPUs. I think if this becomes a problem we can just offer a simplified rendering toggle somewhere.
glTF
.gltf
files are just JSON..glb
files are binary as they contain embedded mesh data and textures too.)USD
What Bonsai supports today
Right now Bonsai only supports Wavefront Objects (.obj) for meshes.
To contrast with the above, it supports the following for scenes:
.blend
files (it exports them to FBX.)Conclusions?
My gut says that glTF is probably the best fit for Bonsai's needs. USD is more powerful, but a lot of what makes it attractive in the AAA games space doesn't feel relevant to Bonsai users. (That being said, I'd greatly welcome the opportunity to mess with USD 😁)
A big benefit of glTF is that the spec is fairly simple, you can implement a parser for it in a weekend. (As I mentioned in DCM I've created 2 parsers and 3 different renderers with varying levels of conformance for it in the past.)
In my opinion COLLADA/FBX/OBJ/STL should all just be deprecated and we should put our energy into a single format instead. (I don't think we need to remove them, but if we ever add more complex scene manipulation stuff like moving objects around we shouldn't make any effort to support those features with them.)
Blender support should be migrated towards transparent export to either glTF or USD.
PBR isn't truly necessary for Bonsai, but I think the way you can get nice results from PBR with relatively little effort is pretty compelling. It's a natural fit for glTF in particular and as mentioned earlier Poly Haven provides a lot of great public domain PBR assets people could use for their scenes. (I focused on the materials above but they offer models too.) I think it'd be nice for people to get similar results out of Blender and Bonsai as well.