Disclaimer: I’m new to game development. Occasionally experimenting with it during my free time to learn some new concepts. I’m quite comfortable using Rust.
I wanted to get something rendering in 3D. I took some nature models from Kenney’s asset pack. The models are Wavefront obj files (exported from SketchUp) with associated material mtl files. The
ObjFormat loader bundled with Amethyst only loads the
Mesh from the obj files, the materials are ignored.
From what I understand, then if I want to import the models in full glory (with the materials attached), then I should write a custom importer that creates a separate entity for each
Geometry that the wavefrom_obj library provides with the appropriate mesh and material attached. These entities can be grouped together by attaching an appropriate
I’ve been eyeing the
PrefabLoader as an easy way to facilitate the loading process. That would allow me to get away by only implementing a custom
Format that parses the obj and mtl files and converts the parsed data into
PrefabData enabled structs. The PrefabLoader would handle rest of the magic (injecting the entities when ready).
Since I’m new to this game development thing, I would like to get some thoughts from more experienced people. Is the process of creating a bunch of entities for different part of the model is the proper way to load models? (Is this what actual games do?) And is my plan to exploit the PrefabLoader to load the whole model in one go the best option or maybe there’s some other mechanism in Amethyst I should be considering?