2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-06-17 14:02:12 +00:00
Commit Graph

712 Commits

Author SHA1 Message Date
Jan b2aa4749c1 fix: no support for gltf using vec3 for vertex colors (#832)
* fix: gltf loder not supporting vec3 for color info

* fix: collision tree creator accessing invalid index via array accessor
2026-06-15 19:58:40 +02:00
mo 44d6710991 feat: initial T4 support (#807)
* feat: initial T4 support

* chore: adjust t4 symbols a bit for accuracy

* chore: add PackIndex asset to T4

* chore: remove unused AssetXModelPieces

* chore: add default and global asset pools loader for T4

* chore: use separate defines for T4 in ImageDumper

* chore: remove unnecessary namespaces in gfximage_actions

* chore: small things

* chore: fix T4 PhysPreset type

* chore: use proper XQuat2 type for T4 xanims

* chore: fix errors on T4 types

* chore: use iw3 like struct for XModelStreamInfo

* docs: add basic docs for T4

* chore: add basic ObjCompiler setup for T4

* chore: adjust loaded sound definition

* chore: make sure t4 material has the correct alignment

* chore: make sure t4 uses similar names for assets as other games

* fix: asset references should not be reusable

* chore: add content writer for t4

* feat: add t4 localize loader

* chore: reorder game ids to be alphabetically ordered

---------

Co-authored-by: Jan Laupetin <jan@laupetin.net>
2026-06-07 14:06:33 +02:00
Jan 036b27568c fix: t6 must use two separate structs for quat indices (#824)
Otherwise arraysize cannot be adjusted from appropriate parent struct
2026-06-07 00:37:16 +00:00
Jan 0d0f928267 feat: add binary xanim support for remaining games (#818)
* refactor: use generic loader for iw3 xanims

* refactor: use generic dumper for iw3 xanims

* chore: use templating on XAnimDumper

* chore: use templating on XAnimLoader

* feat: dump xanims for T5

* feat: load binary t5 xanims

* feat: load and dump t6 xanims

* feat: load and dump iw4,iw5 xanims

* chore: make sure iw3 and t5 notify about unsupported delta3D

* chore: also use CommonVec3U8 and CommonVec3U16 for non delta trans track
2026-06-06 14:47:51 +00:00
mo 0c22dddd0e feat: IW3 xanim dumping/loading in CoD4 Mod Tools raw binary format (#768)
* feat: IW3 dump xanim to cod4 mod tools compatible binary

* chore: add XAnimPartType enum to game headers

* chore: use XAnimPartType in XAnimDumperIW3

* chore: extract xanim filename into XAnimCommon

* chore: prefer emplace_back over push_back

* chore: small code style improvements

* chore: use proper unsigned types for XAnimParts structs

* chore: use better understandable calculations for bitfields

* chore: use game names for parts

* chore: rename method to WriteNoteTracks

* chore: adds comments and improve clearity of what the game does

* chore: extract stream writing methods into StreamUtils

* chore: use vec3 for XAnimPartTransFrames mins and size

* chore: properly differ between XQuat and XQuat2 structs

* chore: use constants for xanim flags

* chore: use optional for delta track quats and trans

* chore: split delta track writing methods into quat and trans

* chore: add assertion for bDelta

* chore: simplify quat frame encoding indexing

* chore: simplify float to int bit casting

* chore: do not throw exception on failing to reconstruct bone tracks

* feat: add xanim loader for iw3

* fix: make sure to sort quats and trans like the game

* chore: prevent empty dumped files on bad xanim data

* chore: ensure no exception on zero frames in xanim notifies

* test: add system test for iw3 xanims

---------

Co-authored-by: Jan Laupetin <jan@laupetin.net>
2026-06-01 22:52:49 +02:00
Jan Laupetin e1ec018f09 chore: modernize collision tree code 2026-05-24 11:38:21 +02:00
Jan Laupetin a81548e300 fix: account for possible zero items when building aabb trees 2026-05-24 11:13:55 +02:00
Jan Laupetin 64d518405d feat: calculate full collision tree for xmodels 2026-05-24 11:13:55 +02:00
Jan Laupetin 5cf0ce37c1 feat: calculate model collision tree with leafs 2026-05-24 11:13:55 +02:00
Jan Laupetin a128fbeb5e chore: imitate game xmodel behaviour in always having even tri count 2026-05-24 11:13:54 +02:00
Jan Laupetin 8a791816ed chore: set XSurface deformed property when applicable 2026-05-24 11:13:54 +02:00
Jan Laupetin 015544eb79 chore: reorder assignment of light def members slightly 2026-05-16 10:45:26 +02:00
njohnson 72dd51609f Clang format. 2026-05-16 09:54:26 +02:00
njohnson 336c9d8d86 Fix LMAP parsing and don't resolve till after ptr is ready. 2026-05-16 09:54:26 +02:00
njohnson 4208bab758 Remove un-needed constants and switch to parsing name by null character. 2026-05-16 09:54:25 +02:00
njohnson d1b74c7230 Remove vestigial lmapLookupStart code. 2026-05-16 09:54:25 +02:00
njohnson 42ed9d8616 Move const to anonymous namespace. 2026-05-16 09:54:25 +02:00
njohnson efbbc05626 Clang format. 2026-05-16 09:54:25 +02:00
njohnson e92681914f Add CreationState to fill in lightdef lookup start. 2026-05-16 09:54:24 +02:00
njohnson 531b4811ca Fill in lookup start. 2026-05-16 09:54:24 +02:00
njohnson 773fee4a03 T5 and T6 set lmapLookupStart to 0. 2026-05-16 09:54:24 +02:00
njohnson 7d3791a404 Change manual CString reader to std::getline builtin. Don't require cucoloris be present. 2026-05-16 09:54:23 +02:00
njohnson e0c1ba1724 Remove unused max constant. 2026-05-16 09:54:23 +02:00
njohnson 2b3f680d48 feat: add t6 gfxlight dumper and loader 2026-05-16 09:54:23 +02:00
njohnson 5b6a725f78 feat: add t5 gfxlight dumper and loader 2026-05-16 09:54:23 +02:00
njohnson 3c15f8ad7e feat: add iw5 gfxlight dumper and loader 2026-05-16 09:54:22 +02:00
njohnson a905a6d161 feat: add iw3 gfxlight dumper and loader 2026-05-16 09:54:22 +02:00
Jan Laupetin 71ca182524 feat: properly parse data from xenon ipaks 2026-05-12 23:44:53 +02:00
Jan Laupetin e1bb8ae4d2 chore: enable reading of big endian ipaks 2026-05-11 23:54:25 +02:00
Jan Laupetin 7ae7cf85ff fix: make sure ipak reading stops in time 2026-05-11 22:20:57 +02:00
Jan Laupetin b2c271956a chore: reorder methods of ipak entry read stream 2026-05-11 22:16:56 +02:00
Jan Laupetin 36b4ec7781 feat: add support for extracting ipaks to ImageConverter 2026-05-11 21:58:25 +02:00
Jan Laupetin 582d8abbbf feat: reorder bones when their order is not corresponding to xmodel constraints 2026-05-03 21:01:38 +02:00
Jan Laupetin 92e236b1fe chore: only allocate 3 floats per bone for applicable games 2026-05-03 17:19:48 +02:00
Jan Laupetin 875e1fb360 fix: properly load all root bones from gltf 2026-05-03 16:35:15 +02:00
Jan Laupetin ff7b940e86 fix: properly dump gltf with root node in models with more than one root bone 2026-05-03 16:35:06 +02:00
Jan Laupetin 2d2ea30b45 fix: iw5 uses isFrictionInfinity as well 2026-05-03 16:00:30 +02:00
Jan Laupetin a31d3c4b88 fix: iw4 physpreset uses FLT_MAX as infinite friction 2026-05-03 15:56:09 +02:00
Jan Laupetin 67bdb79654 fix: do not clamp iw4 physpreset mass 2026-05-03 15:46:52 +02:00
Jan Laupetin 0c1bc747dc chore: update default root bone name to empty string and do not specify if matching default name 2026-05-03 13:51:56 +02:00
Jan Laupetin ed1ed73c73 chore: warn about mismatching root bone name between model and xmodel json 2026-05-03 13:40:31 +02:00
Jan Laupetin 989d29b359 feat: support root bone name from xmodel json 2026-05-03 13:27:35 +02:00
njohnson 1d6c028454 Clang format. 2026-05-02 12:04:51 +02:00
njohnson 0eb1f9f978 Add IW5 SndCurve dumper. 2026-05-02 12:04:51 +02:00
njohnson dec2ae96cb Add loader logic from IW4. 2026-05-02 12:04:50 +02:00
njohnson 3136a03754 Add dumper and loader call to parents. 2026-05-02 12:04:45 +02:00
Paging Red 759a3ccf0e Merge pull request #753 from pagingred/iw5_physpreset_dumper
feat: phys presets dumping and loading for IW3, IW5, T5
2026-05-02 12:01:59 +02:00
Jan 3dbc70755c Merge pull request #759 from michaeloliverx/asset-source-log
feat: add asset source description to loading logs
2026-05-01 22:04:36 +02:00
Jan Laupetin 3063550931 chore: adjust asset source description a bit 2026-04-27 21:29:14 +02:00
Michael Oliver 3aa28a0ded fix: IW3 ensure XModel::surfs is set in loader 2026-04-27 18:24:02 +01:00