Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » limitation discovered with regard to textures
limitation discovered with regard to textures [message #214802] Wed, 23 August 2006 22:44 Go to next message
jonwil is currently offline  jonwil
Messages: 3555
Registered: February 2003
Karma: 0
General (3 Stars)

Basicly, when the game starts up for the first time (or if they have been deleted), it creates .thu files for each mix file (including always.dat and always2.dat). Each file contains information about textures including the width and height.
When the game loads a texture, if its in the thu file, it uses the width and height from there instead of from the texture file itself.

What this means is that if you have a texture in your renegade data folder with the same name as a texture in a mix file and the texture has a different size to the one in the mix file, you get texture errors/issues. The same may also happen if there is a change to the mix file where a texture inside changes size but the .thu file is not deleted so it can be regenrated with the new size.


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
Re: limitation discovered with regard to textures [message #215066 is a reply to message #214802] Fri, 25 August 2006 05:31 Go to previous messageGo to next message
Halo38 is currently offline  Halo38
Messages: 955
Registered: February 2003
Location: UK
Karma: 0
Colonel

interesting stuff JW Big Ups


Online Portfolio - www.chettle1.com

Renegade projects - Halo38's Den hosted by www.laeubi.de

Creator of : C&C_Arid, C&C_Ancients, C&C_Bio, C&C_Duel Arena

Mod Wars Veteran
Re: limitation discovered with regard to textures [message #215080 is a reply to message #214802] Fri, 25 August 2006 06:49 Go to previous messageGo to next message
Nightma12 is currently offline  Nightma12
Messages: 2593
Registered: August 2003
Karma: 0
General (2 Stars)
Category Moderator
why not include the .thu file with your map?

or would that cause mis-match problems?
Re: limitation discovered with regard to textures [message #215102 is a reply to message #214802] Fri, 25 August 2006 07:48 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
some people do include .thu files with their maps, but it means more to download (although afaik they are not that big, cant check atm as I am in Rome).

http://steamsignature.com/card/1/76561197975867233.png
Re: limitation discovered with regard to textures [message #215228 is a reply to message #214802] Fri, 25 August 2006 20:11 Go to previous messageGo to next message
Blazea58 is currently offline  Blazea58
Messages: 408
Registered: May 2003
Karma: 0
Commander
The textures itself based on width and hight isen't the main problem, its when you have two very different textures but named the same where it can cause graphical errors ingame. My Rp2 map has hit nearly 900 textures, and i am sure some renegade maps may have the same named textures as other maps do which could result in one texture being replaced for another.

I personally dont think that the texture "size" has any role in this as i have replaced hundreds although of course the .Thu was deleted and regenerated each time.

I have noticed with these errors all it does is replaces the old texture with the one that its conflicting with. Other then that i don't think it can make a map itself corrupt.




http://i175.photobucket.com/albums/w125/Blaze558/ECW_WebBanner1.jpg
Re: limitation discovered with regard to textures [message #215315 is a reply to message #214802] Sat, 26 August 2006 08:20 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
well one way to ensure your own maps never have collisions with other textures anywhere is to name them all like

mapname_tex001.dds
mapname_tex002.dds

or similar, but thats up to map authors to implement, and with large maps like rp2 it would be VERY time consuming to update all the names...


http://steamsignature.com/card/1/76561197975867233.png
Re: limitation discovered with regard to textures [message #215425 is a reply to message #214802] Sat, 26 August 2006 21:49 Go to previous messageGo to next message
vloktboky is currently offline  vloktboky
Messages: 290
Registered: February 2003
Location: Kentucky, USA
Karma: 0
Recruit

If anyone is interested, I wrote a basic application that semi-successfully parses the THU files. I could not account for every piece of data contained in the THU files, but I have included the source code and a way to contact me in the readme.txt file contained within the download. Perhaps others may be able to finish interpreting what the missing elements mean, and a well-documented form of this file format can be made available for the betterment of others.

Here's the download link.
Re: limitation discovered with regard to textures [message #215430 is a reply to message #214802] Sat, 26 August 2006 22:17 Go to previous messageGo to next message
YSLMuffins is currently offline  YSLMuffins
Messages: 1144
Registered: February 2003
Location: Moved a long time ago (it...
Karma: 0
General (1 Star)
Moderator - Mod Forum
Wow, this is a really fascinating find. Finally, a purpose to these mysterious files.

-YSLMuffins
The goddess of all (bread products)
See me online as yslcheeze
Re: limitation discovered with regard to textures [message #215613 is a reply to message #214802] Sun, 27 August 2006 13:42 Go to previous message
vloktboky is currently offline  vloktboky
Messages: 290
Registered: February 2003
Location: Kentucky, USA
Karma: 0
Recruit

Just a heads up. I have updated the download I gave above with a small tool that will parse a given directory for same-named textures and update any entries of them found in specified THU files with their updated sizes.
Previous Topic: Spawners
Next Topic: help me
Goto Forum:
  


Current Time: Tue May 07 19:33:50 MST 2024

Total time taken to generate the page: 0.00732 seconds