MegaBuild
MegaBuild is a small application designed to ease the MegaTexture compile process. It includes options for MegaGen (to render the raw texture tiles), Renderlight (to bake lighting info into the tiles) and MakeMegaTexture (which compiles the tiles into a compressed .mega file). It's a one-stop shop for compiling MegaTextures.
Contents
Overview
The MegaBuild application can be found in the "Utilities" folder of the main ETQW directory. Look for MegaBuild.exe and run it.
Using MegaBuild
Find ETQW.exe
Firstly you need to select a valid game executable to launch the commands from.
- Go to File -> Find EXE... (or hit CTRLSHIFTO).
- Browse to the game directory and select ETQW.exe.
Load a Surface Tree
Now you will need to load a Surface Tree (.sft) file which contains the texture and surface information you want to render into your MegaTexture.
- Go to File -> Open (or hit CTRLO).
- Browse to your maps directory and select your mapname.sft file.
MegaGen Settings
MegaGen is the first stage of making a MegaTexture. The settings are fairly straightforward.
- Resolution sets the width and height in pixels of your final MegaTexture. For ET:QW we used a ratio of 1 pixel to 1 game unit, so a terrain which is 32,768 units across would use a MegaTexture with a resolution of 32,768.
- Video Cache. 128 is a good value.
- Memory Cache. Give it as much as your computer will allow! For a computer with 2GB of RAM, 1536 is a good value here.
RenderLight Settings
RenderLight bakes atmospheric lighting information into your MegaTexture. Depending on the settings used here, MakeMegaTexture will either output a 3-channel (RGB) or 4-channel (RGBA) MegaTexture.
- Bake lighting - When checked, this option will bake the atmospheric sunlight into the MegaTexture.
- Bake ambient - When checked, this option will bake the ambient atmospheric light into the MegaTexture.
- Leaving both Bake lighting and Bake ambient un-checked will produce a 4-channel MegaTexture, which is larger size on disk but contains more accurate surface bump information.
MegaTexture Settings
MakeMegaTexture is the process which compiles the output of the previous processes into a compressed .mega file.
- Best Quality denotes using the best quality.
- Luminance Error denotes the luminance error...
- Chrominance Error denotes the chrominance error...
- Alpha Error denotes the alpha error...
Run the Processes
Once you have set up all of the options for your MegaTexture, you can set the MegaBuild processes going.
- Tasks -> Run Checked... (or pressing F5) will run all of the selected processes.
- If this is the first time you're compiling a MegaTexture, check all 3 boxes for MegaGen, RenderLight and MegaTexture.
- You can un-check any processes you don't want to run at this time. For example if you want to re-compile some tiles from RenderLight with different MegaTexture settings, un-check MegaGen and RenderLight, leave MegaTexture checked, and then select Run Checked or hit F5.
- Alternately, you can just click the "Make MegaTexture" button in the MegaTexture field.
Components
These are the individual processes that MegaBuild calls from the game.
MegaGen
MegaGen is the in-game tool for generating uncompressed, un-lit MegaTexture tiles. It loads a Surface Tree, analyses the nodes and texture layers, and renders out sets of 4096x4096 pixel diffuse and local normal-map textures.
For a full explanation, see MegaGen.
RenderLight
RenderLight bakes lighting into a set of diffuse tiles outputted from MegaGen, based on the map's atmosphere settings and using the local normal-map tiles to bake in accurate fine detail.
For a full explanation, see RenderLight.
MakeMegaTexture
The MakeMegaTexture console command loads the tiles outputted by RenderLight, then compiles and compresses them to generate the final MegaTexture.
For a full explanation, see MakeMegaTexture.