Generate High resolution LOD textures
This article has been bylined by a contributor. Current rules do not allow bylines in mainspace articles, but articles written before August 2007 may have been bylined prior to the rules. If you are the original author, please comment on this in the Talk page.
If you are not the bylined author, please treat this article with respect. While this is a Wiki and this article is considered open for editing, courtesy is expected. If at all possible, please contact the bylined author about any changes you would like to make.
As always, see the Edit History to see who has contributed to the page, and use the Talk page if you have any questions regarding its content.
--Blade9722 06:30, 28 January 2007 (EST)
Generate Local Maps for LODs
Open your mod in the CS, in the renderer window press shift+C making only landscape visible (*).
In the world menu select the "Create Local Maps" field. Choose "Tamriel" World space, and "All cells" if you want to generate all Maps in a single strike.
However the CS systematically crashes if you commit too much maps to be generated, altough it seems being hardware dependent (probably somewhat related to out-of-memory errors).
At this point my recommendation is to split the work generating maps for a single LOD a time.
Simply use the NW Cell, Cell coordinates to define the box you want to be generated.
of course, for a single LOD the coordinates you need to supply are:
If you need the 60.XX.YY.32.dds LOD
NW CELL : XX,YY+31 SE CELL : XX+31,YY
For proper alignment, the python script needs an additional row and column, so :
NW CELL : XX-1,YY+32 SE CELL : XX+31,YY
By splitting the generation into smaller parts CS won't crash.
Here are the settings for the IC Quad LOD (60.00.00.32.dds)
Once you have finished the process, check your [Oblivion path]\textures\maps folder if all files have been correctly generated.
Prepare working directory
1] Create a folder named c:\obwrk
2] Create a 256x256 black tga picture and save it as Base.tga in C:\obwrk
3] Now in c:\obwrk create a batch file named basegen.bat and insert this code:
for /L %%a in (-65,1,63) do for /L %%b in (-64,1,64) do copy /b .\base.tga .\"Tamriel."%%a"."%%b".tga"
for /L %%a in (-65,1,63) do for /L %%b in (0,1,9) do move /y .\"Tamriel."%%a"."%%b".tga" .\"Tamriel."%%a".0"%%b".tga"
for /L %%a in (0,1,9) do for /L %%b in (-64,1,64) do move /y .\"Tamriel."%%a"."%%b".tga" .\"Tamriel.0"%%a"."%%b".tga"
for /L %%a in (0,1,9) do for /L %%b in (0,1,9) do move /y .\"Tamriel.0"%%a"."%%b".tga" .\"Tamriel.0"%%a".0"%%b".tga"
for /L %%a in (0,1,9) do for /L %%b in (0,1,9) do move /y .\"Tamriel."%%a".0"%%b".tga" .\"Tamriel.0"%%a".0"%%b".tga"
Double click it. This will copy base.tga lots of times, generating lots of Tamriel.xx.yy.tga files. This because often not all the maps are generated by the CS (i.e. boundary is not exactly stopping at multiple of 32 cells), and the python assembly script will stop if it don't find a required file.
Assemble maps
At this point you can follow Ghanburighan procedure LOD texture fix script, starting from point 4), using this python script instead:
import os, Image, ImageOps WRKDIR = 'c:/obwrk' BLX = raw_input('Enter this quads lower left cell x coordinate ') BLY = raw_input('Enter this quads lower left cell y coordinate ') BLX = int(BLX) BLY = int(BLY) TRX = BLX+32 TRY = BLY+32 BL = (BLX,BLY) TR = (TRX,TRY) TILESIZE = 241 os.chdir(WRKDIR) outim = Image.new('RGB', (7712, 7712)) xoffset = -234 yoffset = 7464 xrange = range(BL[0]-1,TR[0], 1) yrange = range(TR[1], BL[1]-1, -1) yrange.reverse() for x in xrange: for y in yrange: print "tamriel.%02d.%02d.tga (%d,%d)" % ( x, y, xoffset, yoffset) inim = Image.open("tamriel.%02d.%02d.tga" % (x,y)) outim.paste(inim, (xoffset, yoffset)) yoffset -= TILESIZE xoffset += TILESIZE yoffset = 7464 outim = ImageOps.flip(outim) outim.save("60.%02d.%02d.32.png" % (BLX, BLY))
At the prompt, type the coordinates of the LOD you want to be generated (i.e 0 32 for 60.00.32.32.dds.
This will generate a full 7712x7712 resolution LOD, whic you can donwsize to 4096x4096 or 2048x2048 and save as .dds
Miscellaneous
(*) Actually, all what is visible in the render window, apart from some markers, will be put in the map. By pressing shift+C you will obtain textures like Zacharot "no rocks". If you want a full control on what is visible you'll have generate custom Oblivion base BSAs, in which you put only what you like to see.
- CS will generate maps only for the walkable area, everything outside it will appear flat green or corrupted, even if it's a part of the map clearly visible from walkable area. My suggestion is to retrieve this missing parts of map from Vanilla LODs textures and, after properly resizing it, cut and paste into the new generated textures.