Difference between revisions of "Landscape LOD Tutorial"

102 bytes added ,  11:26, 1 July 2008
imported>Kienjakenobi
imported>Kienjakenobi
Line 29: Line 29:
So, if you aren't there already, switch to the render window. Go to 0,0 in the render window and press shift-w to turn off the water (also turn off cell grids if they are still on (B). Turn off bright lighting in the taskbar. The texture will be generated from what you see in the render window, so if you e.g. leave the water on, your LOD textures will include the purple water texture which looks pretty bad in the game. Now right-click in the render window and select Generate LOD Textures / For this quad from the popup menu. Now the texture generation process will load all cells and take snapshots of them (it actually generates a 64x64 pixel texture from every 2x2 cells). These are stored in \data\textures\landscapelod\generated\partial\. If you don't have any objects it will go pretty quick, otherwise it may take a considerable time. At the end of this process the partial textures are stitched together into one large 1024x1024 texture that is stored in \data\textures\landscapelod\generated\. Now you need to move into each quad - e.g. move to cells 0,-1 / -1, -1 / -1,1 and repeat the process for each quad. If nothing happens, it means that partial textures for this quad already exist. If you need to update the LOD textures, you have to delete the old partial files first.
So, if you aren't there already, switch to the render window. Go to 0,0 in the render window and press shift-w to turn off the water (also turn off cell grids if they are still on (B). Turn off bright lighting in the taskbar. The texture will be generated from what you see in the render window, so if you e.g. leave the water on, your LOD textures will include the purple water texture which looks pretty bad in the game. Now right-click in the render window and select Generate LOD Textures / For this quad from the popup menu. Now the texture generation process will load all cells and take snapshots of them (it actually generates a 64x64 pixel texture from every 2x2 cells). These are stored in \data\textures\landscapelod\generated\partial\. If you don't have any objects it will go pretty quick, otherwise it may take a considerable time. At the end of this process the partial textures are stitched together into one large 1024x1024 texture that is stored in \data\textures\landscapelod\generated\. Now you need to move into each quad - e.g. move to cells 0,-1 / -1, -1 / -1,1 and repeat the process for each quad. If nothing happens, it means that partial textures for this quad already exist. If you need to update the LOD textures, you have to delete the old partial files first.


===fixing the naming bug===
===The Naming Bug===
There is a tiny bug in the above routine that mislabels the created texture files. If you'd load your mod now, you would be treated to the famous purple landscapes, the purple indicating a missing texture.  
There is a small bug in the COnstruction Set that incorrectly names the textures that are created in Data\Textures\LandscapeLOD\Generated. If you'd load your mod now, you will likely see purple landscapes everywhere because of this bug.


go to the \data\textures\landscapelod\generated folder and compare the names of the generated textues with the normal maps (_FN suffix) you created earlier. A bunch of the new textures will have a "0" instead of a "00" in the part of the name that indicates cell coordinates. You need to rename the files, replacing all instances of 0 with 00.
To fix this, simply go to the textures in \data\textures\landscapelod\generated and rename any textures that have a single 0 in it. A bunch of the new textures will have a "0" instead of a "00" in the part of the name that indicates cell coordinates. You need to rename the files, replacing all instances of 0 with 00. For example, the texture titled "11607696.0.-32.32.dds" should be renamed "11607696.00.-32.32.dds"


===The Black Texture Bug===
===The Black Texture Bug===
Anonymous user