Retroactive texture renaming for LOD

Posted By: Galen

Retroactive texture renaming for LOD - 11/16/06 01:26

Okay, so I obviously figured this out *after* I was already well into my project, but anyway, it's looking like it would be a good thing for me to use Level of Detail with my textures in order to speed up in-game framerate.

So, here's the question: since I've already got all my textures applied, aligned and scaled the way I want them, is there any way to rename my textures in accordance with the LOD naming standard without my having to re-apply all my textures manually? In other words, is there anything like a "find and replace" feature or hack or whatever that would let me find each instance of a texture reference within a .WMP file (after I've actually renamed my texture files themselves, of course) and rename it as a level of detail texture?
Posted By: Galen

Re: Retroactive texture renaming for LOD - 11/17/06 18:45

ha ha, I'll take the deafening silence to mean there isn't a way.
Posted By: demiGod

Re: Retroactive texture renaming for LOD - 11/17/06 22:19

Open the WMP file with a plain text editor, then invoke the replace command and change the textures names you want.
However i think this solution only works for blocks geometry, but i am not sure.

Hope it helps.
Posted By: Galen

Re: Retroactive texture renaming for LOD - 11/17/06 23:17

Many, MANY thanks to you!!!!! No kidding--I appreciate the help. This really helps me out, a lot! I had no idea I could do that with a .WMP file.

This has been a good week for solutions for me.

Again, thank you.
Posted By: Matt_Aufderheide

Re: Retroactive texture renaming for LOD - 11/17/06 23:42

In fact using LOD for textures is not a good solution becasue it means you have mulitple textures.. you are better off using one texture with mipmapping (for models, this means you must use the option to use external files).
Posted By: Galen

Re: Retroactive texture renaming for LOD - 11/18/06 00:28

But if I use a mipmap, how does that affect my "Search and replace" option as given above? Will the alignment and scaling be screwed up by the new mipmap image size (1/3 additional surface area to include the additional mipmap images), or will it stay the same? I really don't want to have to re-texture my entire level yet again.

Also, in the case of LOD files, are they being loaded into memory with the rest of the level, or will they only be accessed when needed from the hard disk? In other words, will RAM requirements be increased, or will the level/project size merely go up? Obviously mipmaps increase RAM requirements since they are in the same file, but with LOD being separate files, I'm not sure how this affects memory.

Thanks for mentioning this option. I look forward to your reply.
Posted By: Matt_Aufderheide

Re: Retroactive texture renaming for LOD - 11/18/06 05:54

i guess i dont understand.. there is always mip-mapping on level geometry..there is no need for search and replace or retexturing. Nor is there any LOD on level geomtry (only level entities and models).

You should never have to manually edit a map file.. this is likely to screw it up and make it unuseable
Posted By: Galen

Re: Retroactive texture renaming for LOD - 11/18/06 19:00

Quote:

i guess i dont understand.. there is always mip-mapping on level geometry..there is no need for search and replace or retexturing. Nor is there any LOD on level geomtry (only level entities and models).

You should never have to manually edit a map file.. this is likely to screw it up and make it unuseable




I had to go to wikipedia.org to brush up on mipmaps. According to the article there, the mipmap texture file contains the full-size image, and then about 8 successively smaller versions of that same image within the same texture file, which actually adds about 1/3 more to the overall original texture size. In other words, if I have a .bmp that's 128w by 128h and I create a mipmap image texture out of it, then that 128w by 128h texture then becomes 1/3 larger, or 172w by 128h (if I'm understanding this right), which means that all my WED texture alignments and scaling would be thrown off?

Whereas if I use LOD (on entities then, if not level architecture), the initial texture size stays the same with my .bmp (128 by 128), so I'd merely have to rename my texture (file.bmp) references within WED to refer to the new LOD file (file_01.bmp) in order to include the new LOD file instead of the old texture file, and then when the level loads each LOD file variant (file_02.bmp, file_03.bmp, etc) it would, I assume, just substitute the LOD file variants and adjust scaling accordingly for their different sizes to fill up the same space as the original.

Or am I getting this wrong?
© 2023 lite-C Forums