merge ws/source: VBSP v19-21, VMF, KeyValues / data/vdf, codecs/model/Displacement (with ws/quake's Brush / Patch / Miptex)

This commit is contained in:
4DBug committed 2026-11-01 19:46:56 -06:00
commit e100366cb8
44 files changed
+18855 -1508

No files matched your search

+8 -1
View File
@@ -74,6 +74,7 @@ is tested under both runtimes (luau `--codegen -O2` and LuaJIT through the build
| model | iqm | .iqm | yes | yes | materials: true, skins: true, animation: true, vertexColors: true | `tests/model/iqm.luau` |
| model | ldraw | .ldr .mpd .dat | yes | - | materials: true, lines: true, instancing: true | `tests/model/ldraw.luau` |
| model | lwo | .lwo .lxo | yes | - | materials: true, polygons: true, vertexColors: true, morphTargets: true | `tests/model/lwo.luau` |
| model | map | .map | yes | yes | variants: "quake", "valve220", "quake2", "quake3", patches: true | `tests/model/map.luau` |
| model | mca | .mca .mcr | yes | - | voxels: true, blocks: true | `tests/model/mca.luau` |
| model | md2 | .md2 | yes | - | morph: true, animation: true | `tests/model/md2.luau` |
| model | md3 | .md3 | yes | - | morph: true, animation: true, tags: true | `tests/model/md3.luau` |
@@ -93,6 +94,8 @@ is tested under both runtimes (luau `--codegen -O2` and LuaJIT through the build
| model | sourcemdl | .mdl | yes | - | skins: true, morph: true, animation: true, lods: true | `tests/model/sourcemdl.luau` |
| model | stl | .stl | yes | yes | ascii: true, binary: true, colors: true, indexed: false | `tests/model/stl.luau` |
| model | usda | .usda .usd .usdz | yes | yes | materials: true, animation: true, cameras: true, lights: true, polygons: true, vertexColors: true, usdz: "read", usdc: false | `tests/model/usda.luau` |
| model | vbsp | .bsp | yes | - | versions: 19, 20, 21, displacements: true, staticProps: true, pak: true | `tests/model/vbsp.luau` |
| model | vmf | .vmf .vmx | yes | yes | displacements: true, roundTrip: true | `tests/model/vmf.luau` |
| model | vox | .vox | yes | yes | voxels: true, sceneGraph: true, materials: true | `tests/model/vox.luau` |
| model | vrml | .wrl .wrz .vrml | yes | yes | materials: true, polygons: true, animation: true, cameras: true, lights: true, lines: true, points: true | `tests/model/vrml.luau` |
| model | x | .x | yes | - | text: true, binary: true, compressed: true, materials: true, skins: true, animation: true, polygons: true, vertexColors: true | `tests/model/x.luau` |
@@ -240,7 +243,8 @@ Codecs (layer 3, shared by formats; not loadable on their own), by domain:
- codecs/image/Etc: ETC1 / ETC2 / EAC block texture decoding (Khronos Data Format Specification 1.3, section 21).
- codecs/image/Half: IEEE 754 binary16 <-> number (round to nearest even, overflow to infinity). New in rosetta.
- codecs/image/Jpeg: the JPEG codec (ITU T.81), bit-exact with libjpeg-turbo's djpeg and byte-identical with cjpeg.
- codecs/image/Pixels: row loops between packed pixel layouts and rgba8 for BMP / DIB.
- codecs/image/Miptex: Quake / GoldSrc mip textures and the WAD2 / WAD3 lump directory, read and write.
- codecs/image/Pixels: row loops between packed pixel layouts and rgba8 for BMP / DIB, and palette helpers.
- codecs/image/Quantize: palette quantization of rgba8 pixels (median cut or octree, Floyd-Steinberg dithering).
- codecs/image/Raster: an antialiased scanline rasterizer (nonzero / even-odd) for line and Bézier paths, plus a stroker.
- codecs/image/Texel: uncompressed GPU texel formats -> the standard pixel formats. New in rosetta.
@@ -249,10 +253,13 @@ Codecs (layer 3, shared by formats; not loadable on their own), by domain:
- codecs/image/Vp8L: WebP lossless (VP8L, RFC 9649 section 3).
- codecs/image/Yuv: planar 4:2:0 Y'CbCr <-> rgba8, BT.601 / BT.709, limited or full range.
- **model**
- codecs/model/Brush: convex plane brushes -> polygons and Scene primitives, with Quake-family texture projection.
- codecs/model/Displacement: Source engine displacement surfaces (VBSP ddispinfo_t / Hammer dispinfo), as
- codecs/model/Draco: Google Draco geometry decompression (.drc; glTF KHR_draco_mesh_compression; Roblox mesh v6 / v7).
- codecs/model/Mat4: 4x4 matrix (column-major, glTF / Types.Scene layout) and quaternion { x, y, z, w } helpers.
- codecs/model/MeshFlatten: a Scene to one world-space mesh, for the writers of mesh-only formats (STL, PLY, OFF).
- codecs/model/Minecraft: what Minecraft's voxel formats share (model/schematic, model/mca). New code.
- codecs/model/Patch: Quake III / Doom 3 Bezier patches (control grids) -> evaluated grids, triangles, normals.
- codecs/model/Polygon: 2D polygons with holes to triangles by hole bridging and ear clipping. New code.
- codecs/model/Rbx: the Roblox instance tree and property values shared by model/rbxm and model/rbxmx.
- codecs/model/Rig: the Scene mapping shared by game model formats (MD2 / MD3 / MDL / MD5 / SMD / ...). New code.