34 Commits (a4c3dba734b28557ff659a611849123231acb774)

Author SHA1 Message Date
Nico de Poel b87102afb2 Export model face data 3 years ago
Nico de Poel 197c657361 Prevent 16-bit overflow when storing face area; fixes wildly inconsistent tessellation LOD calculations 3 years ago
Nico de Poel 8d51e7e252 Embed the texture atlas data inside the exported .ps1bsp file and name those files after the actual map. 3 years ago
Nico de Poel dfe7806450 Reorganized model data so as not to cause any memory alignment issues 3 years ago
Nico de Poel 97a08243b5 Added a world spawn element with a generic sky color derived from the sky texture 3 years ago
Nico de Poel 45796822cd Reorganized poly vertex data structure to allow for faster copying in the PS1 code 3 years ago
Nico de Poel caaccee1dd Export model data for dynamic world objects 3 years ago
Nico de Poel cc18611de8 Reorganized texture code so that the palette is loaded separately, and metadata used to calculate UVs are kept out of the exported file for PS1. 3 years ago
Nico de Poel 9f1ed1f35f Draw lava, slime and teleporters as liquids, but not transparent. 3 years ago
Nico de Poel fb66f93b46 Provide some additional data in the PS1 BSP file, including linked list pointers for leaf-based polygon sorting 3 years ago
Nico de Poel cc1fcec7ea Also add leaf bounding sphere for optional per-leaf frustum culling. 3 years ago
Nico de Poel c91e8e6167 Added bounding spheres to node data, used for frustum culling 3 years ago
Nico de Poel 0df5801eba Export face vertex data again, to allow for simplified rendering routines 3 years ago
Nico de Poel 93551117b1 Added surface flags, allowing for rendering of water surfaces 3 years ago
Nico de Poel 4655246b69 Retired the concept of surface vertices, as UVs can in fact not be shared between polygons. 3 years ago
Nico de Poel fc281251ea Overhaul of geometry conversion: 3 years ago
Nico de Poel 72d03aff9c Fixed some issues with texture atlas, page and ID generation. Texture references generally seem to be in order now, but UVs are still a problem. 3 years ago
Nico de Poel d84a14973b First pass at converting texture info to PS1 VRAM data. Not quite right yet but it's starting to work. 3 years ago
Nico de Poel 1882d246b9 A bit of cleanup ahead of attempting to make textures work 3 years ago
Nico de Poel bf3bf810f6 Added computation of face area by projecting its vertices onto its plane and then generating a bounding box. Will be used for determining tessellation subdivisions. 3 years ago
Nico de Poel e65ce7b673 First attempt at calculating lighting per face-vertex with smoothing based on the angle between faces, using edge adjacency to determine neighbouring faces. 3 years ago
Nico de Poel a1e289f5fa Export plane type field, to allow optimizations for axis-aligned planes 3 years ago
Nico de Poel eb548d13d8 Added plane and center point to face struct, for early backface culling. 3 years ago
Nico de Poel f6da144c6a Padded some structs to make them 32-bit aligned 3 years ago
Nico de Poel 86343e96a9 Added export of PVS data 3 years ago
Nico de Poel 049a02fec7 Added conversion of plane, node and leaf data 3 years ago
Nico de Poel a631e5a90d Reworked PS1BSP format to use dentry-style header info, and added structs for planes, nodes and leafs. 3 years ago
Nico de Poel 9af577773d Improved lightmap sampling for face vertices 3 years ago
Nico de Poel f596c008d7 Store sampled light data per face vertex, so we can individually light each face without having to average lighting values. 3 years ago
Nico de Poel ba68bc128e Write face vertex indices to output file instead of triangle data, which takes up less space and allows the PS1 code to decide how to draw the primitives. 3 years ago
Nico de Poel 2f3facc4d8 Added a few more bits of BSP data, fixed edge list which is in fact an array of ints; the documentation was wrong. 3 years ago
Nico de Poel bd339fc737 Separated file loading from BSP processing, making it easier to use data from different sources and also ensuring everything gets cleaned up properly at the end. 3 years ago
Nico de Poel fac8e40425 Made an attempt to add some structure to the BSP file processing 3 years ago
Nico de Poel 8f82f467a0 First import of PS1 MDL/BSP tools project, long overdue 3 years ago