# Ego PSSG Editor

version 12.1.1

Application Website

## Contents

1. Requirements
2. Installation
3. Editor Information
4. Usage
5. Support
6. Changelog
7. Credits

## Requirements

- .NET 6.0 Desktop Runtime (x64 or x86 depending on your OS)

## Installation

To install, simply EXTRACT everything from the zip file to a desired location, and run the Ego PSSG Editor.exe file.

## Editor Information

This tool will allow you to open and edit PSSG files for the EGO engine games. Textures can be previewed and modified through DDS conversion. Car models can be modified through glTF conversion.

## Usage

After turning on the program simply click File -> Open and select a PSSG to edit.

Editing Textures:

1. In the Textures tab select a texture from the list.
2. Press Export to save the section as a new file to edit with another editor such as Photoshop.
3. OR Replacement Step 1 and 2: In the Textures tab press Export All Textures. A folder will be made with all texture files in the same directory as the pssg.
4. When finished editing dds file, if the texelFormat (see "Looking Up Texture Info") is u8 use save option 8 L 8 bpp | Luminance, and if it is ui8x4 use option 8.8.8.8 ARGB 32 bpp | unsigned.
5. After editing press Import and select your modified file.
6. Click File -> Save to save your new PSSG.

Looking Up Texture Info:

1. In the Textures tab select a texture from the list.
2. Now switch to the All Sections tab.
3. You will see a bunch of info for the texture selected in the Textures tab.
4. Important info to look at: width, height, format, mipmaps
5. Switch back to the Textures tab to continue editing the texture.

Adding Textures:

1. In the Textures tab select a texture from the list for your new texture to be based on.
2. Press Add so that a new window pops up.
3. Type in a new name for your texture, make sure it is unique and press OK.
4. A new texture will be added and can be seen at the end of the list.
5. Click File -> Save to save your new PSSG.

Removing Attribute/Attribute Info:

1. In the data grid view select a the row of the attribute that you would like to delete by pressing on the row header to its right.
2. Now just press the Remove button on the bottom. If no row is selected then a Node/Node Info will be removed instead.
3. Type in a new name for your texture, make sure it is unique and press OK.

### Working with Car Models

When a pssg file contains a car exterior or interior model, you can use the Models menu in the top bar to export or import the model. Models are converted as glTF files.

glTF files are a common 3D model format supported by many 3D modelling applications such as 3ds Max, and Blender. glTF files can be saved in two different formats or file extensions. They can be saved with the glb extension which contains all the data in a binary format. They can also be saved with the gltf extension which will contain the structure of the model as JSON data, with a potential to also include separate ".bin" and image files to store additional data.

Each mesh in the model is made up of several primitives where each primitive is tied to a different shader material (or shader instance). Shader instances reference the shader used to render the model, and define the inputs to the shader. Each game uses many different shaders which take various inputs. There is no easy way to export or import this shader data to another format. Because of this, the model importers require the materials in your glTF model to be named the same as the existing ShaderInstances within the pssg.

Certain shaders take more than one UV map per mesh as an input. Unfortunately the pssg does not store which texture or purpose each UV map is used for. Instead each UV map is mapped to an arbitrary texture in the glTF that may or may not be the actual purpose for the UV map. For example, I always map the 2nd UV map tied to a mesh as the occlusion texture. The UV map may not be meant to be used as occlusion texture, but it is a way for the importer to know how to figure out which UV map in the mesh to store at which position in the shader input. The following shows the expectation of the importer for each UV map. Note that the importer supports up to 4 uv maps. Each mesh may use anywhere from 0-4 uv maps.

- 1st UV map in pssg is always mapped to the Diffuse/Base Color texture in the glTF
- 2nd UV map in pssg is always mapped to the Occlusion texture in the glTF
- 3rd UV map in pssg is always mapped to the Emissive texture in the glTF
- 4th UV map in pssg is always mapped to the Normal texture in the glTF

## Support

You can get support by asking in the modding channels of the following communities:

- Ego Engine Modding Discord
- RaceDepartment Forums

If you think you've found a bug, post an issue here with as much information as possible.

## Changelog

- 12.1.1+20240414
  - Fixed model import when shader instance has >65535 vertices
- 12.1.0+20220227
  - Added support for bc6h_uf textures
  - Added support for previewing BC6h textures
  - Fixed xml import for non-English OSes
  - Changed .NET framework to .NET 6.0
- 12.0.0+20210118
  - Added support for exporting and importing car models
  - Added support for compressed xml pssg files
  - Changed .NET Framework to .NET 5.0
- 11.1.2017.0802
  - Added support for DX10 BC1-3 textures
  - Fixed srgb textures being exported with the wrong settings
  - Updated texture preview UI to conveniently show texture info
- 11.0.2017.0720
  - Rewrote UI from scratch in WPF
  - Added preview for u8 textures
  - Added support for BC7 textures
  - Dropped support for cube maps
- 10.3.2016.0322
  - Ability to open really large pssg files (64 bit Windows)
  - When (de)compressing files, a temp file is used first
  - Ability to sort textures by name
  - Byte data always represented by 2 chars, capitalized
  - Now properly closes the save stream
  - Fix for saving as xml that has an attribute starting with the number 2
  - Attempts to delete any temp files that are created
- 10.2.2015.0806
  - Support for Gimp 2.8 DDS Plugin
- 10.1.2015.0805
  - Added two texeltypes for Dirt Rally
  - Fixed bug when copying nodes
- 10.0.2014.1226
  - Support for Compressed PSSG
  - Support for Xml PSSG
  - Support for Dirt Game
  - Changed up User Interface
  - New Version Numbering
  - Use EgoEngineLibrary
- 2.0.2012.0919 (2.0.1)
  - Fixed Occasional Save Error
  - Small UI Improvements
  - Cleaned Up Code/Reduced file size
- 2.0.2012.0530
  - Added support for Textures with texelFormats "ui8x4" and "u8"
  - Hogs less resources when browsing textures
  - Improved All Sections Tab: Add/Remove, Import/Export, and Edit anything
  - New Section: PSSG Backend
  - New Feature: Create PSSGs from scratch
- 1.8.2011.0924
  - Fixed a bug causing the game to crash when editing textures
- 1.8.2011.0919
  - Rewrote most of the program based on Miek's PSSG base class
  - Removed support for most PSSGs modded by previous editor versions
  - Rewrote the DDS class for better conversions between textures and DDS files
  - New Feature: Export/Import Cubemaps, Remove Textures, Import All Textures
  - Improved UI, image preview
- 1.7.2011.0530
  - Fixed Bug that caused some PSSG files to be unopenable
- 1.7.2011.0524
  - Added support for Dirt 3
  - Fixed error from having 0 mip maps
  - Fixed pssg size updater
  - NOTE: This is a quick release with minimal testing, may need more work
- 1.7.2011.0324
  - Greatly Improved Speed
  - New Feature: Add Texture
  - Texture Resolution changes are done correctly
  - Minor UI Changes
- 1.6.2010.1225
  - Fixed Bug where you could only edit the first pssg that you open
  - Improved Automatic Selection
- 1.6.2010.1219
  - Fixed Export All Textures function
  - Automatically Selects a Section based on Selected Texture
- 1.6.2010.1217
  - Redesigned UI For Easier Texture Editing
  - Added Export All Textures function
  - Fixed Open With function
- 1.5.2010.1206
  - Added Preview Area for TEXTURE sections
  - Import any section, not just TEXTURES (For the Advanced)
  - Made it faster for you to work with the program
- 1.4.2010.1204
  - Added support for ALL PSSG FILES
  - Redesigned Everything
- 1.3.2010.1128
  - Added support for more pssg files (interior, RainBeads_textures, sky)
  - Changed the way I do versions
- 3.0.2010.1031
  - Fixed Major Bug that would destroy pssg files when importing new files
  - Added support for games Grid and Dirt 2
- 1.0.2010.1030
  - First Release

## Credits

- Petar Tasev - For creating the program.
- luh-koala - For creating icon and other graphics
- famfamfam.com - For the "silk" menu icons.