21 Commits (7fd5f09a34bab8b525214f15a822d4ebc867bffd)

Author SHA1 Message Date
Nico de Poel f35fd7287e Made an attempt at detecting T-junctions in geometry and correcting the vertices for that. It sort of works but it doesn't have the desired effect yet. Back to the drawing board. 3 years ago
Nico de Poel b43dff99a2 Fixed a floating point rounding error preventing faces from being found for some world-space points. Fixes lighting bugs in a few areas. 3 years ago
Nico de Poel ca08893253 Relaxed vector equality margin of error a little bit, hopefully leading to less instances of faces not being found for a given point 3 years ago
Nico de Poel caaccee1dd Export model data for dynamic world objects 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 c91e8e6167 Added bounding spheres to node data, used for frustum culling 3 years ago
Nico de Poel 93551117b1 Added surface flags, allowing for rendering of water surfaces 3 years ago
Nico de Poel ef9adf8de0 Introduced some matrix math to properly construct a texture space transform, that we can also invert to create a transform back to world space. Finally our tesselated polygons are working perfectly! 3 years ago
Nico de Poel 568f2450eb Added a new lighting sampler to take advantage of the improved lightmap indexing: use a pseudo-random jitter pattern to take multiple light samples in an area around the sample point, from all surrounding faces at a shallow angle. 3 years ago
Nico de Poel fb3d1ac6a1 Upgraded dot product and cross product-related functions to doubles, to improve accuracy of various calculations 3 years ago
Nico de Poel 161ef0acee Improved lightmap sampling accuracy. The generated UVs now more closely match what Quake is doing, we can reject invalid UVs, and we're getting less false rejects of valid faces to sample from. 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 5137fe0a15 A bit of cleanup and moved the facesWithPoint function to world_t, for easier reuse 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 86343e96a9 Added export of PVS data 3 years ago
Nico de Poel c429529e88 Fixed lightmap sampling: 3 years ago
Nico de Poel 9f9bf49a86 Sample lightmaps to accumulate and average lighting values per vertex, then store those in the exported BSP file. 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 8f82f467a0 First import of PS1 MDL/BSP tools project, long overdue 3 years ago