Update README.md

This commit is contained in:
Bandwidth
2025-04-07 22:12:36 +02:00
committed by GitHub
parent 103f1b4191
commit 3d6dd4c385

View File

@@ -1,6 +1,9 @@
# SplashEdit
SplashEdit is a Unity Package that converts your Unity scenes into authentic PSX worlds by exporting binary data loadable in a PlayStation 1 game. It streamlines the export process for your scenes and offers additional tools for VRAM management and texture quantization.
SplashEdit is a Unity Package that converts your Unity scenes into authentic PSX worlds by exporting binary data loadable in a PlayStation 1 as a binary fileformat called **SPLASHPACK**. It streamlines the export process for your scenes and offers additional tools for VRAM management and texture quantization.
## Important: Instructions in this readme are writen terribly (PR welcome, please I suck at writing these) REFER TO THE VIDEO DOWN BELOW FOR USAGE
https://youtu.be/1JJFYptDTk0
## Features
@@ -8,6 +11,10 @@ SplashEdit is a Unity Package that converts your Unity scenes into authentic PSX
Export your scene with a single click using the PSX Scene Exporter component. This process automatically packs textures into the PSX's 2D VRAM.
- **Texture Packing & Quantization:**
Convert and preview your textures in a PSX-compatible format with built-in quantization tools.
- **Light baking**
Prebakes any lights in the Scene into the output mesh data
- **Navmesh generation**
Generates a navmesh for FPS movement in your scene
## Installation
@@ -29,13 +36,21 @@ If you only need to export the scene, follow these steps:
1. **PSX Object Exporter:**
- Attach the **PSX Object Exporter** component to every GameObject you wish to export.
- This GameObject **must** have a mesh filter on it with a viable mesh
- The GameObject **must** have a texture on it. Colored polygons are not yet supported
- Set the desired bit depth for each object's texture in the component settings.
2. **PSX Scene Exporter:**
- Add the **PSX Scene Exporter** component to a GameObject in your scene (using an empty GameObject is recommended for organization).
- Click the export button in the PSX Scene Exporter. You will be prompted to choose an output file location.
- Click the **Export** button in the PSX Scene Exporter. You will be prompted to choose an output file location for the splashpack.
- The exporter will automatically handle texture packing into the PSX's 2D VRAM.
3. **PSX Navmesh**
- Add the **PSX Navmesh** component to a GameObject in your scene.
- A Navmesh surface will get automatically generated and exported into your splashpack upon scene export.
- **Important:** a PSX Player component is required within the scene for Navmesh exporting to work correctly.
- **Important:** due to a scaling and overflow bug which is currently being worked on, you may encounter some Navmesh issues. To mitigate these, turn up the GTE scaling on the scene exporter to a higher value.
### Additional Features
SplashEdit also includes extra tools to enhance your workflow:
@@ -58,56 +73,12 @@ SplashEdit also includes extra tools to enhance your workflow:
All textures must have dimensions that are a power of two (e.g., 64x64, 128x128, 256x256) with a maximum size of **256x256**.
- **No Automatic Downscaling:**
SplashEdit does not automatically downscale textures that exceed these limits.
- **READ/WRITE Enabled:**
Ensure all textures have **READ/WRITE enabled** in Unity.
## Output Format
You can use the [Imhex project file](https://github.com/psxsplash/splashedit/blob/main/tools/imhex.hexproj) file to learn about the binary format
The binary file output by SplashEdit is structured as follows.
1. **VRAM Data (1 MB):**
- The file begins with a 1 MB block of VRAM data.
- This data is generated by iterating through a 2D array in row-major order.
2. **Object Count:**
- Immediately following the VRAM data, a 2-byte unsigned short is written indicating the number of exported objects (PSXObjectExporters).
3. **Per-Object Data:**
For each exported object, the following data is written sequentially:
- **Triangle Count (2 bytes):**
An unsigned short representing the number of triangles in the object's mesh.
- **Texture Information:**
- **Bit Depth (1 byte):**
The bit depth of the object's texture.
- **Texpage Coordinates (2 bytes total):**
Two 1-byte values for `TexpageX` and `TexpageY`.
- **CLUT Packing (4 bytes total):**
Two unsigned shorts (2 bytes each) for `ClutPackingX` and `ClutPackingY`.
- **Packing Byte (1 byte):**
- **Triangles Data:**
For each triangle in the object's mesh, data for its three vertices is written in sequence. Each vertex consists of:
- **Position (6 bytes):**
Three signed shorts (2 bytes each) representing `vx`, `vy`, and `vz`.
- **Normal (6 bytes):**
Three signed shorts representing `nx`, `ny`, and `nz`.
- **Texture Coordinates (2 bytes):**
- **U coordinate (1 byte):**
The U coordinate relative to texpage start
- **V coordinate (1 byte):**
The V coordinate relative to texpage start
- **Color (3 bytes):**
Three bytes representing the RGB values.
- **Padding (7 bytes):**
Seven bytes of zero padding.
Each vertex is 24 bytes in total, making each triangle 72 bytes (3 vertices × 24 bytes).
## I have a splashpack file. What now?
You can preview it using [psxsplash](https://github.com/psxsplash/psxsplash).
## Contributing
@@ -116,6 +87,7 @@ Contributions are welcome! To contribute:
1. Fork the repository.
3. Submit a pull request with your changes.
Please use branches.
For major changes, please open an issue first to discuss your ideas.