Stadium tutorial
The content of this page or section is incomplete because we're a bunch of lazy fucks. Feel free to help out. |
Introduction
This is a tutorial for creating a custom PES stadium, with the aim of first getting a model to appear in-game and then building upon that. The tutorial assumes that you know how to make a player model, but requires no additional knowledge beyond that.
Making a stadium is not fundamentally any harder than making a player; more of the process just needs to be done by hand.
Fox Engine
Modeling
Blender 2.8+ is recommended for this step, as having labeled collections (folders) instead of layers makes it much easier to organize scenes with many objects.
Preparing the model
- Download the pitch reference model and import it into Blender. Note that this is only a reference and should not be exported, so put it in its own layer or collection. Do not move, scale, or rotate the pitch lines.
- Model your stadium or import pre-made models using the pitch lines as a guide.
- Make sure each object only has one material and that all objects with the same material share the same UV map name; the names must match in order to merge the UV maps later.
Exporting the model
- Download the PES19 Stadium Template and import st060_center1.fmdl into a new Blender 2.79 file.
- Copy everything that should be exported over to the new Blender window. In Blender 2.8+, you can do this easily by right-clicking the collection(s) and clicking Select Objects.
- With everything still selected, select the template model and join the objects.
- In edit mode, go through the material list and use the Select button to separate each material.
- Delete the template mesh.
- Go through all objects and remove all unwanted materials so that each object only has one.
- Do the same with UV maps. If you're unsure which maps to delete, double check by selecting the UV maps while in edit mode and see which ones are empty in the UV editor.
- Materials or textures are not required for stadium models to appear. Models with no material will be red-tinted with a default material and models with a material but no texture will be white.
- Export the model.
Packaging
Download GzsTool—this lets you unpack and repack FPK and FPKD files.
Creating a working folder
- Navigate to \PES19 Stadiums Template\Template\Asset\model\bg\st060\#Win and copy st060.fpk.
- Create a subfolder in the GzsTool folder and paste st060.fpk there.
- Drag st060.fpk onto GzsTool to unpack it.
Repacking
- Navigate to the bottom of the newly-created folder and overwrite st060_center1.fmdl with the one you exported.
- Unpacking the FPK also created an XML file. Drag it onto GzsTool.exe to repack the FPK.
- Overwrite st060.fpk in the folder you got it from.
Importing the stadium
- Create a preview image so that you can find your stadium in the stadium list; the image must be a 512x256 DDS and goes in \PES19 Stadiums Template\Template\common\render\thumbnail\stadium.
- Navigate to \PES19 Stadiums Template\Template and copy the Asset and common folders.
- Navigate to \[AES compiler]\patches_contents\Singlecpk and merge the folders with those you copied.
- Run the compiler.
Texturing
- Stadium textures must be in the FTEX format; download this script and place it in the root folder of the AES compiler.
- Create a folder anywhere on your computer that will be used to convert the textures.
- Open the script in a text editor and set the location in the first line to the folder you created.
- Place your DDS textures in the folder and run the script.
- Move the converted FTEX textures to \PES19 Stadiums Template\Template\Asset\model\bg\st060\sourceimages\tga\#windx11.
- Open your export .blend file and set up the materials and textures like you would with a player. The texture path should be /Assets/pes16/model/bg/st060/sourceimages/tga/. NOTE: The stadium ID here does not matter.
Lighting
- There are no tools to customize lighting, so you're limited to PES's existing lighting setups in the form of FPKD files in \Asset\model\bg\st060\light\#Win.
- Some presets also only work for certain stadium slots; using the presets on another slot will make the stadium completely black.
- The setup in the template will work for most stadiums, but you can also use this, which is dark with only the pitch illuminated.
- The last two letters in the filenames refer to the time of day and weather (fine/rain). Matches are played at night by default, but you can use daytime for a second lighting setup. The rain files can be disregarded.
- Although you can't modify the lighting, the FPKD contains some fog and post-processing settings that can be modified.
Unpacking lighting FPKDs
- Create a subfolder in the GzsTool folder.
- Copy the lighting FPKD over to the new folder.
- Unpack it by dragging it onto GzsTool.exe.
- At the bottom of the unpacked folder will be a FOX2 file; FoxTool is needed to unpack it.
- Drag the FOX2 file onto FoxTool.exe to create an XML file that can be edited in a text editor.
Repacking lighting FPKDs
- Drag the XML file onto FoxTool.exe to repack the FOX2.
- Drag the other XML created by GzsTool onto GzsTool.exe to repack the FPKD.
- Overwrite the FPKD in the stadium's lighting folder.
Lighting FPKD settings
If a setting is missing from a FOX2 file, you can simply copy it from another one.
- PesExposureSettings_Demo and PesExposureSettings_Game - Controls the dynamic exposure. This can cause lit materials to become very dark while lit materials occupy a large portion of the screen. Since many teams use unlit materials for their players, it is recommended to disable dynamic exposure by setting minExposure and maxExposure to the same value as initialExposureValue. Remember to do it for both _Demo and _Game.
- AtmosphericFogParams - Controls the depth fog. If you want to remove the fog entirely, set the alpha (w) values of objFogRgbAmp and objFogRgbAmp2 to 0.
Stadium ID and name
Changing the ID
- Check the stadium ID list (4CC, VGL); only bold IDs will work.
- Download the PES19 Stadium ID Changer Tools and use it to change the ID of your stadium.
Setting the name
- Stadium names are set by the person compiling stadiums, but if you want to do it yourself for testing purposes, download the Stadium.bin generator.
- Open the script in a text editor and add your stadium's name to the corresponding ID.
- Run the script.
- Copy the created common folder to \[AES compiler]\patches_contents\Singlecpk and overwrite the old files.