Hello,
@Gigantus - I initially tried PM'ing you this but your inbox was full so I'm posting here in hopes you will see this and reply.
I have some questions regarding TGA and DDS files used by Medieval 2 for the overall campaign strat map (CSM) and 3D settlement/(trading) resource models. I'll be referencing the DaC sub-mod since that is the project I am editing/creating 3D campaign strat map models for.
Anyway, I have some questions about the TGA textures and their respective DDS versions. For all the 3D models that I have created for DaC, whether they're towns, castles, or (trading) resources, I have followed the instructions that my acquaintance Inarus (ex 3D strat map modeler for Westoros TW) told me which was to pair each TGA texture file with a DDS version of it since the game's engine would use the DDS version for enhanced performance. By pair, I mean to put the TGA and DDS files together in the same textures folder.
When creating DDS files from TGA files in GIMP (I installed a DDS plugin in GIMP), I make sure for the compression to choose BC1/DXT1 and for mipmaps to choose 'generate' in order to create mipmaps for the textures. Anyway, yesterday I was in the data/terrain/aerial_map/ground_types folder and in it I saw there were only TGA files and no DDS files. So, I was thinking since these textures are used all throughout the campaign map that I could create the DDS counterparts for all the TGA files which I'm assuming the game's engine would use to help with performance?
While speaking with Inarus, he told me that perhaps the original TGA file could be replaced with a single-pixel black dot so that the TGA file's size is kept low while the game's engine uses the DDS file to not only display the textures but also allow for the performance enhancement. From what Inarus told me, a TGA file is required or else the game will crash but what I recently learned from him (and request confirmation on) is that even though the game requires a TGA file with the proper name being present, it's the DDS file that is used by the engine if it exists and has the same name as the TGA file. I knew that the DDS file was used by the game's engine to help with performance but I thought the TGA file was also used to display the textures. But, I guess from what he recently told me that the TGA file just needs to exist with the proper name and that the DDS file could be used as the main go-to texture & performance file? Can I get confirmation that this would be possible?
However, going off of my experience with editing/creating CSM models and assigning textures to them, when I assign the textures in my modelling software (and re-assign in MilkShape) I know that I must specify the specific file that is to be used to display the textures on the model. So, if I were to make a model from scratch using the previously mentioned suggestion, I would have to use the DDS version of the texture file as the primary texture when applying it to the model and only then would I be able to set the TGA file to be a single-pixel black dot but still keep it within the textures folder in order to satisfy the requirement for a TGA file to be present by the game/game's engine. Would this suggestion be correct? If I need to clarify what I just said, feel free to let me know.
So, to recap the above:
1. Is it possible to add the DDS versions of the TGA files located in data/terrain/aerial_map/ground_types (and for all the other TGA files in the other folders in the aerial_map folder). If so, would it provide a significant performance boost?
2. Are the settings I used (and am still using) regarding the creation of DDS files from TGA files correct (specifically regarding the compression being set to BC1/DXT1)?. I've read in other threads that people have used DXT5 but that was for unit models and if I recall correctly from a thread I read back when I first started modelling CSM models it was suggested to use the lower-level DXT option.
3. Could it be possible to implement the suggestion made by Inarus where the DDS file is essentially used to kill 2 birds with 1 stone because it would provide the textures for the CSM model but also allow for the enhanced performance since it's a DDS file?
I hope what I'm talking about makes sense, if you need further clarification, feel free to let me know.
---
So, that's my first set of questions, my second is regarding if whether or not there is a general file-size limit for 3D models on the campaign map. Not long ago, I uploaded the (trading) resource model overhaul that I did for DaC (ALBUM LINK) and some members of the DaC testing group are reporting random crashes and one tester is thinking that it could be due to the large number of new 3D models added to the map. While I make sure not to overdue the poly count in the models I work on, I can't help but wonder if there could be some limit, whether hard-coded and intentional or just due to the game's old engine, that could be a factor that I have to consider regarding implementing more 3D models. That said, prior to the addition of the new resource models I also upgraded a bunch of other town and castle models (ALBUM LINK) which would have increased the overall file-size and poly count but as with those I was conservative with the poly count and made sure to remove as many unseen (by the player) polys as possible.
Side-note:
Spoiler Alert, click show to read:
My overall goal is to update all the CSM models and I already have more models created since the (trading) resource models announcement that I have yet to announce so obviously I want to be aware if there could be a limit or if there could be severe performance drain and I want to combat that as much as possible and help improve the overall performance of DaC.
To recap the above:
1. Is there a general file-size or poly count limit (whether hard-coded & intentional or just due to the game's engine's old age) that could be causing DaC's tester's games to crash because there are many new 3D CSM models?
As said above, feel free to let me know if I need to clarify anything.
Regards,
TheEliteDwarf