Commit Graph

169 Commits

Author SHA1 Message Date
Jarrod Doyle 110c9b8a3c
Add initial UI for lightmap layer toggling 2024-08-28 08:07:01 +01:00
Jarrod Doyle 4a80ef547b
Support toggling lightmap layers 2024-08-28 07:44:07 +01:00
Jarrod Doyle 092896aa52
Use Texture2dArray for lightmap texture 2024-08-27 21:18:31 +01:00
Jarrod Doyle cbf309aaa4
Fix incorrect lightmap scale multiplier 2024-08-27 08:02:10 +01:00
Jarrod Doyle bb617ffc52
Get lightmap data as bytes and blit to atlas 2024-08-27 07:46:44 +01:00
Jarrod Doyle d125fb2cd3
Parse lightmaps as flat array rather than multidimensional array 2024-08-27 07:10:38 +01:00
Jarrod Doyle efb15c19dd
Handle lightmap scale 2024-08-26 16:53:01 +01:00
Jarrod Doyle 9605c36303
Change BuildHierarchy type signature 2024-08-26 15:24:07 +01:00
Jarrod Doyle d3e58af75c
Split hierarchy building to a method and time it 2024-08-26 15:10:05 +01:00
Jarrod Doyle 261d5fe399
Decrease target rectpacking density 2024-08-26 14:30:40 +01:00
Jarrod Doyle 42cc08363e
Profile the rectpacking 2024-08-26 14:30:19 +01:00
Jarrod Doyle 20a0796410
Time lightmap building 2024-08-26 14:03:50 +01:00
Jarrod Doyle 326543c0f6
Add timing method that returns a value 2024-08-26 14:03:37 +01:00
Jarrod Doyle e213b3ea26
Add some basic timings 2024-08-26 13:25:06 +01:00
Jarrod Doyle 6e70ad22c1
Add timing function 2024-08-26 13:22:29 +01:00
Jarrod Doyle 413e3bf937
Fix use of obselete methods 2024-08-26 12:40:51 +01:00
Jarrod Doyle 7ec48abda5
Add basic model caching 2024-08-26 12:38:13 +01:00
Jarrod Doyle afb6689683
Update project to Godot 4.3 2024-08-26 11:38:46 +01:00
Jarrod Doyle 1cfbd498c7
Loosely handle campaigns not having an obj folder when trying to get obj texture path 2024-08-25 17:09:59 +01:00
Jarrod Doyle 05e90c1a30
Add jank object texture path gathering 2024-08-25 16:52:21 +01:00
Jarrod Doyle b6a65fc10b
Extract model loading functionality out 2024-08-25 16:47:05 +01:00
Jarrod Doyle e313ca58a7
Merge GetObjectPath implementations 2024-08-25 16:25:12 +01:00
Jarrod Doyle 0d7ff677de
Slightly working support for custom model textures 2024-08-25 16:20:46 +01:00
Jarrod Doyle 2365f09931
Add basic object hierarchy generation and traversal 2024-08-25 15:49:40 +01:00
Jarrod Doyle 501f27a721
Load generic property chunks 2024-08-25 13:56:28 +01:00
Jarrod Doyle 8aa1c7c4bc
Don't render objects marked not rendered 2024-08-25 13:21:55 +01:00
Jarrod Doyle be937d53fc
Add RenderType property support 2024-08-25 13:21:27 +01:00
Jarrod Doyle 2be1bc4352
Add generic prop definition 2024-08-25 13:09:45 +01:00
Jarrod Doyle df923492cf
Make defining property chunks easier 2024-08-25 13:07:49 +01:00
Jarrod Doyle 3b9ff6c852
Jankily read scale in for models 2024-08-25 11:54:33 +01:00
Jarrod Doyle f69a98e880
Let vec3 conversion skip scaling 2024-08-25 11:54:21 +01:00
Jarrod Doyle 505adf5d44
Add scale property support 2024-08-25 11:53:50 +01:00
Jarrod Doyle 655a188a69
Offset any models that aren't centered 2024-08-25 11:22:13 +01:00
Jarrod Doyle ad68c25447
Add world environment with maximum ambient light 2024-08-25 11:21:32 +01:00
Jarrod Doyle 0c0394df86
Handle object rotation 2024-08-25 11:21:00 +01:00
Jarrod Doyle 85599b4069
Merge GetTexturePath implementations 2024-08-25 10:43:17 +01:00
Jarrod Doyle be205897bb
Merge GetMissionNames to handle null campaign 2024-08-25 10:11:55 +01:00
Jarrod Doyle 3270d89b05
Store campaign and mission name on Mission 2024-08-25 10:08:48 +01:00
Jarrod Doyle 659843c743
Merge GetMissionPath to one function 2024-08-25 10:03:52 +01:00
Jarrod Doyle 56a5aa6869
Use C# event for mission selection 2024-08-25 10:01:43 +01:00
Jarrod Doyle 1c3c4cacb4
Fix incorrect path search for OMs 2024-08-25 09:49:27 +01:00
Jarrod Doyle 68f2a851f4
path manager now returns alphabetically sorted lists 2024-08-25 09:21:55 +01:00
Jarrod Doyle 3d41441f2a
Use path manager for mission selector 2024-08-25 09:15:42 +01:00
Jarrod Doyle cb2f016455
We're actually rendering models in the mission now (badly) 2024-08-24 17:36:32 +01:00
Jarrod Doyle de4f3d6381
Add some safety to object path requests 2024-08-24 17:36:12 +01:00
Jarrod Doyle 9fd76815a2
Use new resource manager in mission and textureloader 2024-08-24 17:10:08 +01:00
Jarrod Doyle 62ff5306fe
Add more thorough path manager 2024-08-24 17:09:27 +01:00
Jarrod Doyle c48eb018f5
Merge model related chunks from gam file 2024-08-24 13:37:21 +01:00
Jarrod Doyle db293791e0
Handle GAM_FILE chunk 2024-08-24 13:36:44 +01:00
Jarrod Doyle acc3add512
Super scuffed initial object model detection 2024-08-24 11:33:55 +01:00
Jarrod Doyle 0eb918d863
Add Links, ModelName props, and MetaProp LD loading 2024-08-24 11:33:35 +01:00
Jarrod Doyle b9172df8c3
Place white cubes at object brush positions 2024-08-23 18:55:39 +01:00
Jarrod Doyle f118c151f3
Add initial brush list support 2024-08-23 18:55:20 +01:00
Jarrod Doyle eaf20f7f4a
Merge model faces that share a material 2024-08-18 14:01:43 +01:00
Jarrod Doyle dbabe1527c
Sort selector lists alphabetically 2024-08-18 14:01:09 +01:00
Jarrod Doyle 6db4d75a37
Properly create and apply color based model materials 2024-08-18 12:37:03 +01:00
Jarrod Doyle 20cf0f7292
Really bad awful model texturing 2024-08-18 11:14:30 +01:00
Jarrod Doyle 5aafab148b
Better logging and handling of failed model file loading 2024-08-18 11:14:07 +01:00
Jarrod Doyle 30db43eac8
Make MeshSurfaceData more generic 2024-08-18 11:13:18 +01:00
Jarrod Doyle 2db83a827e
Add fullbright ambient light level 2024-08-18 11:12:47 +01:00
Jarrod Doyle 6340a4c545
Fix incorrect light and uv indices on model materials 2024-08-18 11:08:42 +01:00
Jarrod Doyle 8a22defe17
Add basic model material texture output 2024-08-18 10:34:17 +01:00
Jarrod Doyle d9a54b65d5
Add GIF support for terrain textures 2024-08-18 10:28:22 +01:00
Jarrod Doyle 66c324be53
Add .GIF image loading using ImageSharp 2024-08-18 10:27:44 +01:00
Jarrod Doyle 2c9958a64a
Add model material parsing 2024-08-18 10:23:31 +01:00
Jarrod Doyle b5d3a3c275
Add initial basic .BIN model support 2024-08-17 20:53:16 +01:00
Jarrod Doyle b12070f982
Add ReadVec2 utility function 2024-08-17 20:52:41 +01:00
Jarrod Doyle 742324765f
Remove old unused function 2024-08-17 19:00:04 +01:00
Jarrod Doyle 35a3158ea6
Move Godot utility conversion to TMV namespace 2024-08-17 18:48:01 +01:00
Jarrod Doyle 622192a489
Add safer chunk usage 2024-08-14 18:39:13 +01:00
Jarrod Doyle 736ced24e4
Remove old unused code 2024-08-13 21:38:32 +01:00
Jarrod Doyle 93488ffc65
Add proper overbrightened 32bit2x lightmap rendering 2024-08-13 21:38:00 +01:00
Jarrod Doyle a8b9ce8a54
Fix incorrect lightmap colors 2024-08-13 19:23:52 +01:00
Jarrod Doyle 6f62d2ca00
Load textures from root thief resource CRF 2024-08-13 19:11:03 +01:00
Jarrod Doyle 9db1bc6681
Handle Thief 2 inst config file 2024-08-13 19:10:05 +01:00
Jarrod Doyle e773635677
Mission selector allows better browsing of campaigns 2024-08-13 18:31:20 +01:00
Jarrod Doyle 27dbc47419
Enable loading of PCX textures from FM folders 2024-08-12 19:52:36 +01:00
Jarrod Doyle 21b018298c
Use family palettes for PCX textures 2024-08-12 19:02:20 +01:00
Jarrod Doyle c14f74b108
Add PCX image loading 2024-08-12 18:46:30 +01:00
Jarrod Doyle 3aa6024103
Remove unused imports 2024-08-11 16:22:51 +01:00
Jarrod Doyle d1d6b310ab
Move material creation back to Mission 2024-08-11 15:43:44 +01:00
Jarrod Doyle 59edc0744c
Add texture manager/loader 2024-08-11 15:23:56 +01:00
Jarrod Doyle 51136b9526
Remove old code/comments 2024-08-11 14:31:27 +01:00
Jarrod Doyle 2ec121e056
Create one mesh per texture used 2024-08-11 12:28:24 +01:00
Jarrod Doyle 24ac6395d5
Moved Mission to TMV namespace 2024-08-11 09:18:02 +01:00
Jarrod Doyle 1508ed111d
Load TGA textures 2024-08-10 13:15:06 +01:00
Jarrod Doyle 1b661cbc7f
Meshes no longer cast shadows 2024-08-10 12:31:20 +01:00
Jarrod Doyle 9ef3a17e97
Mission node is no longer an EditorTool 2024-08-10 11:56:36 +01:00
Jarrod Doyle ad359ba656
Remove unnecessary WorldEnvironment node 2024-08-10 11:52:17 +01:00
Jarrod Doyle ae243fcd58
Fix lightmap colour blending 2024-08-10 11:50:46 +01:00
Jarrod Doyle 1539d1910d
Fix incorrect 16bit lightmaps 2024-08-10 10:22:57 +01:00
Jarrod Doyle 64dde9509d
better case insentitive checks 2024-08-10 08:58:02 +01:00
Jarrod Doyle 10da283f02
Add initial support for case sensitivity 2024-08-07 20:10:45 +01:00
Jarrod Doyle aaf93477d0
Fix incorrect paths for textures relative to mission file 2024-08-07 18:40:46 +01:00
Jarrod Doyle 9d49b38bf2
Clear texture cache on map clear 2024-08-07 17:30:20 +01:00
Jarrod Doyle 0758e24be5
Remove dummy mesh instance 2024-08-07 17:09:03 +01:00
Jarrod Doyle b2fc789734
Render textures and lightmaps together 2024-08-05 21:47:03 +01:00
Jarrod Doyle 74f4d0e7c6
Calculate texture UVs and move lightmap UVs to UV2 2024-08-05 19:49:36 +01:00
Jarrod Doyle da3f9b9203
Load and apply textures 2024-08-05 19:25:44 +01:00
Jarrod Doyle 79f7ebd7eb
Re-add occlusion culling 2024-08-05 18:57:21 +01:00