Fixed animated group textures not animating#1124
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes a compiler-side issue where animated textures applied as sub-areas (via group texturing tools using ParentArea) were not being recognized as animated, causing them to compile as static textures instead.
Changes:
- Detects textures with a non-zero
ParentAreaand attempts to match them against reference animated textures using reconstructed “full-frame” UVs. - When a match is found, synthesizes a sub-area
AnimatedTextureSet, generates lookup entries for it, and retriesAddTextureso the sub-area can be treated as animated. - Implements the same logic in both the classic TR compiler texinfo manager and the TombEngine texinfo manager.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 10 comments.
| File | Description |
|---|---|
| TombLib/TombLib/LevelData/Compilers/Util/TexInfoManager.cs | Adds sub-area animated-texture detection + synthetic sub-animation lookup generation for classic/TR compilers. |
| TombLib/TombLib/LevelData/Compilers/TombEngine/TombEngineTexInfoManager.cs | Mirrors the sub-area animated-texture handling for TombEngine texture compilation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
TombLib/TombLib/LevelData/Compilers/TombEngine/TombEngineTexInfoManager.cs
Outdated
Show resolved
Hide resolved
TombLib/TombLib/LevelData/Compilers/TombEngine/TombEngineTexInfoManager.cs
Outdated
Show resolved
Hide resolved
TombLib/TombLib/LevelData/Compilers/TombEngine/TombEngineTexInfoManager.cs
Outdated
Show resolved
Hide resolved
TombLib/TombLib/LevelData/Compilers/TombEngine/TombEngineTexInfoManager.cs
Outdated
Show resolved
Hide resolved
TombLib/TombLib/LevelData/Compilers/TombEngine/TombEngineTexInfoManager.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
TombLib/TombLib/LevelData/Compilers/TombEngine/TombEngineTexInfoManager.cs
Outdated
Show resolved
Hide resolved
TombLib/TombLib/LevelData/Compilers/TombEngine/TombEngineTexInfoManager.cs
Outdated
Show resolved
Hide resolved
TombLib/TombLib/LevelData/Compilers/TombEngine/TombEngineTexInfoManager.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
TombLib/TombLib/LevelData/Compilers/TombEngine/TombEngineTexInfoManager.cs
Outdated
Show resolved
Hide resolved
TombLib/TombLib/LevelData/Compilers/TombEngine/TombEngineTexInfoManager.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
TombLib/TombLib/LevelData/Compilers/TombEngine/TombEngineTexInfoManager.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
This PR is now complete and ready for review. |
This pull request introduces robust support for animated texture sub-areas - enabling tools that apply textures to only a portion of an animated frame (such as group texturing) to work seamlessly. The changes include a new utility for matching and generating sub-area animation sets, cache key structures for deduplication, and integration with both the general and TombEngine-specific texture managers. Additionally, some redundant code related to resetting texture parent areas was removed.
Animated texture sub-area support:
AnimatedTextureLookupUtilitywith methods for matching, quantizing, and generating sub-area animation sets, as well as aSubAreaKeystruct for deduplicating sub-area lookups. (TombLib/TombLib/LevelData/Compilers/AnimatedTextureLookupUtility.cs)TexInfoManagerandTombEngineTexInfoManager, including logic to handle only compatible animation types and prevent redundant processing via_processedSubAreas. (TombLib/TombLib/LevelData/Compilers/Util/TexInfoManager.cs,TombLib/TombLib/LevelData/Compilers/TombEngine/TombEngineTexInfoManager.cs) [1] [2] [3] [4] [5]isForRoomparameter, ensuring correct scoping of generated lookups. (TombLib/TombLib/LevelData/Compilers/Util/TexInfoManager.cs) [1] [2]Code cleanup and bug fixes:
texture.ParentAreabefore applying textures, preventing accidental loss of parent area information needed for sub-area matching. (TombEditor/EditorActions.cs) [1] [2]Dependency management:
usingdirective for the new utility inTexInfoManager. (TombLib/TombLib/LevelData/Compilers/Util/TexInfoManager.cs)