Possible to reduce amount of files needed for robe models (or models in general)?
TheBarbarian
Member Posts: 58
Thought: Is it feasible to create a workaround so we no longer need to set up different files for mounted/jousting versions of robes? I've got ~1650 .mdl files for different texture variants of the same robe mesh here, which seems kind of ridiculous. The mounted and jousting versions especially are straight duplicates of the original files, just renamed to use a different supermodel (3, 5, 6, 8).
If possible, getting to specify in the parts_ 2das which model to use and which texture to use with it would be great. I'd like to have more different spellcaster robe skins (WoW style), but at the moment, it bloats the haks like crazy.
If the 2das were expanded rather than altered, and defaulted to loading the models by matching number if the new "MODEL" column was empty, it should (theoretically, hopefully) not be able to break backwards compatibility. Hopefully. Fingers crossed. No guarantees. Throwing the thought out there, anyway.
If possible, getting to specify in the parts_ 2das which model to use and which texture to use with it would be great. I'd like to have more different spellcaster robe skins (WoW style), but at the moment, it bloats the haks like crazy.
If the 2das were expanded rather than altered, and defaulted to loading the models by matching number if the new "MODEL" column was empty, it should (theoretically, hopefully) not be able to break backwards compatibility. Hopefully. Fingers crossed. No guarantees. Throwing the thought out there, anyway.
5
Comments
*ahem*
First of all, the issue with robes was originally meant as a feature.
In case of standard body/clothing parts there is the phenotype fallback system, that is possible because standard body/clothing parts don't use animations, hence don't require a supermodel (the supermodel entry is ignored by the engine, when set). Such models are instead attached to the skeleton model, at the matching node (which is controlled by caparts.2da), and they are "carried around" as the skeleton is animated.
2DA V2.0 NAME MDLNAME NODENAME 0 0 FOOTR rfoot_g 1 0 FOOTL lfoot_g 2 0 SHINR rshin_g 3 0 SHINL lshin_g 4 0 LEGL lthigh_g 5 0 LEGR rthigh_g 6 0 PELVIS pelvis_g 7 0 CHEST torso_g 8 0 BELT belt_g 9 0 NECK neck_g 10 0 FORER rforearm_g 11 0 FOREL lforearm_g 12 0 BICEPR rbicep_g 13 0 BICEPL lbicep_g 14 0 SHOR rshoulder_g 15 0 SHOL lshoulder_g 16 0 HANDR rhand_g 17 0 HANDL lhand_g 18 0 ROBE root
Robes cannot use the same system, however, as they are often skinmeshed and hence don't have parts that can be directly attached to skeleton nodes (that is why in the file above they are attached as a whole to the "root" dummy).
Robes need to be animated directly, through an explicit supermodel, and furthermore, some robes (DLA's coats, for instance) don't use the standard skeleton, and were given additional bones, which requires them to use specific supermodels - and which explains why they are not animated in CC animations.
Bioware's oversight was that while things work pretty well when you only have a handful of robes and a handful of phenotypes, it quickly becomes a mess when those handfuls are replaced by the number of CC models and custom animated phenos. Because each robe needs to have a supermodel explicitly declared, and the fallback mechanism breaks - what is the point to inherit models if the animations aren't automatically adjusted?
Furthermore, I'm pretty sure that Bioware never planned or imagined that phenotypes would be used by the community to implement alternative sets of animations.
So, the solution I suggest, and that should be easy enough to implement engine-wise, is that when a robe model is not given an explicit supermodel, the engine assigns automatically the pheno skeleton to the model based on the current pheno assigned to the creature. For example, if our pfh12_robe005.mdl has the line:
setsupermodel pfh12_robe005 NULL
then the engine would assign it the supermodel pfh12 on the fly.This way, by overriding the stock robe models with NULL'ified pheno 0 models, all robes would automatically inherit the appropriate animations and not only the appropriate model (this one through the phenotype fallback system).
It would not work for those robes that require their own special animation set, but those are a minority and could still be setup properly by creating the duplicates and manually and explicitly setting a different supermodel.
The overall result would be a dramatic reduction of the number of duplicates required when combining phenotypes and robes, down to a very acceptable level and without affecting the models that constitute an exception.
Furthermore, the same logic can be applied to cloaks if necessary, although those already benefit from the matching of models and textures through a 2da