Now I'm tempted to take the occasion and add a hook also for wandering npcs.
While we're on the topic of swapping NPCs with 3D models and API hooks, could we discuss (at the risk of derailing Kamer's original topic
) the possibility of customized LODs?
In an old topic by NikitaThetanner (
viewtopic.php?f=22&t=466), it was discussed what route to dedicate a limited talent pool towards in terms of production of 3D assets. I don't know that a solid consensus was ever reached, but with a bit of programming perhaps we can satisfy
nearly all tastes with a singular source of high quality base assets (I'm looking at you, Kamer
).
My idea is predicated on an assumption of Unity's LODGroup class that the Renderers can be assigned by script into the LOD[] array using SetLODs. If that's true, then adding a modding hook could allow DFU to build the LOD groups to suite the user's preferred aesthetic. Of course this would require that the content creator would have to create asset's at various quality levels to fill these LOD[] slots, but it's fairly simple to reduce the polycount of a high poly asset and/or bake into sprites; not so much the other way around.
Using this method, the user can select a mode that generates the LODs to suite that aesthetic.
For example: a high quality mode that assigns LOD[0] the high quality 3D model, LOD[1] a low polycount model to be used at a distance for performance, and LOD[2] baked sprites at the farthest distance.
Other settings could include LOD[0] being the low poly model and LOD[1] being the baked sprites with no additional LODs.
Or finally, LOD[0] being the baked sprites and no other LODs.
Configuring the LOD groups before loading into DFU should mean that nothing of greater quality than what the user wants ever gets loaded into memory (here I go assuming again).
Another hook could simply enable my
Spriter asset on either the high or low poly model to enable dynamic sprites. This is the most future proof
sprite option since it is totally agnostic to custom animations... I'm just imagining sneaking up and backstabbing a thief that's looting a fresh corpse in a dungeon. In my mind, the thief is a sprite, but he has dynamic shadows rendered on him and he's performing an animation loop where he's reaching on the ground and looking around in a paranoid fashion.
Again, I apologize if I derail the original topic. We can discuss this in a new topic in the Modder Discussion board if that's more appropriate.