Asset Pipeline Overview
Polygon Engine uses a GUID-based asset pipeline. Source files live under Assets/, imported runtime files live under Library/, and scenes reference imported assets by GUID through Library/asset_db.json.
This split matters for PS1 builds. The editor can keep source files and import settings, while the runtime only receives compact files that are staged into Build/ps1/disc_root/DATA.
Supported Asset Types
| Category | Source | Imported output | Runtime use |
|---|---|---|---|
| Models | .obj, .fbx in Assets/Models/ | .msh | Mesh Renderer asset meshes |
| Skeletal animation | hard-skinned .fbx in Assets/Models/ | .skn | Animator mesh and baked clips |
| Level Builder meshes | .pmsh in Assets/Meshes/ | .msh | Reusable editor-authored meshes |
| Textures | .png, .bmp, .tga in Assets/Textures/ | .tex | Materials and UI images |
| Materials | .mat.json in Assets/Materials/ | material asset entry / staged material data | Mesh Renderer materials |
| Resident audio | .wav in Assets/Audio/ | .vag | Audio Source effects and short loops in SPU RAM |
| Streaming music | .wav with Streaming Music (CD-XA) enabled | .xa staged during build | Global Music playback from CD-ROM |
| Scripts | .lua in Assets/Scripts/ | validated, precompiled Lua bytecode at build time | Lua Behaviour components and UI callbacks |
Import Workflow
The pipeline is: source file in Assets -> importer settings and metadata -> compiled file in Library -> GUID reference in scenes and materials -> staged PS1 asset during Build.
- Place a source file in the correct
Assets/folder. - The editor creates or updates the source metadata.
- For a dense static model, open PS1 Asset Optimizer, review the recommendation, and generate a constrained lower-poly copy.
- The import step writes runtime-ready output to
Library/. Library/asset_db.jsonrecords the GUID, type, display name, paths, and stats. Import settings and the optimization recipe live in the source.meta.json.- Scene GameObjects reference assets by GUID.
- The build pipeline stages only the data needed by the PS1 runtime.
Asset Database
Library/asset_db.json is generated by the editor. Do not hand-edit it during normal work.
Each entry can include:
{
"guid": "a1b2c3d4-...",
"type": "Mesh",
"name": "HallWall",
"path": "Library/meshes/a1b2c3d4-....msh",
"sourcePath": "Assets/Meshes/HallWall.pmsh",
"stats": {
"vertexCount": 128,
"triangleCount": 64,
"fileSize": 4096
}
}
The exact fields vary by asset type.
Reimporting
Use the editor rather than editing generated files:
- Select the source asset in the Project panel.
- Adjust import settings in the Inspector.
- Click Apply, Import, or Reimport depending on the asset type.
- Check Problems and PS1 Budget if the asset affects runtime budgets.
Build Staging
During a PS1 build, imported assets are staged into disc-friendly locations such as:
Build/ps1/disc_root/DATA/M/ # meshes
Build/ps1/disc_root/DATA/K/ # skeletal animation assets
Build/ps1/disc_root/DATA/T/ # textures
Build/ps1/disc_root/DATA/R/ # materials
Build/ps1/disc_root/DATA/A/ # audio
Build/ps1/disc_root/DATA/X/ # CD-XA streaming music
Build/ps1/disc_root/DATA/L/ # Lua scripts
The runtime resolves those files through DATA/MANIFEST.JSN.
Production Rule
Treat Assets/ as the source of truth, Library/ as imported cache/output, and
Build/ps1/ as disposable generated build output. See Skeletal
Animation for the hard-skinned FBX path and Audio
Import before deciding whether a WAV should be resident or streamed.
The PS1 Asset Optimizer is non-destructive: it preserves
the project source model and stores a reproducible optimization recipe in its
metadata while replacing only generated output.