Tomb-Editor
Tomb-Editor copied to clipboard
WAD2 format issues
It seems that WAD2 format has several flaws which should be fixed.
-
[ ] Bones are kept as simple list, not as tree. While Monty said it is done to replicate original hacky bone format which isn't real tree but "pseudo-tree" that still requires absolute index for some actions (e.g. gunflashes and meshswaps), better solution is to keep bone numerical index and sort bones on legacy compilation based on it, or even simply sort bones based on their name. To fix this, a rollback of this commit must be done: https://github.com/MontyTRC89/Tomb-Editor/commit/86b40d84af3c279a32d99c0dd9931c8a082e4a38
-
[x] There is no vertex colours field for mesh vertices. Instead, there is legacy "shades" field which is kept as raw TR-like ushort inverted value (higher = darker). This is very inconvenient and unflexible. Instead, vertex color must be kept and converted to luma for legacy engines on the fly.
-
[x] Additional fields needed for vertex effect type and strength. In future, TR5Main should allow various vertex effects in different combination, not just "glow" and "movement". These effects should be individually assigned to every vertex, and eventually replace inconvenient workflow with "shades as effect" currently used for merged statics.
-
[x] All textures are kept disjointed. This results in UV-mapped mesh to split whole texture in small pieces which is lossy and can't be properly exported later. Wad2 texture format should support ParentArea field, similar to TE textures which allows to keep whole "parent" texture area. This will also preserve texture layout on compilation.
-
[ ] Animcommand struct should be extended. In future, TR5Main will use scriptable lua animcommands. Animcommand field should include string name reference to scripted animcommand, but NOT direct lua script (scripts should be edited separately via future TIDE unified script editor).