Prepared direct attribute access for deprecation, preferring use of APIs to access static mesh attributes.
Fixed recently merged Enterprise code to comply with new APIs.
Changed all tools to use triangle-centric iteration where possible.
Added new MeshAttributeArray APIs for querying attribute flags, and added a new Mandatory flag.
Various bug fixes.
#rb Alexis.Matte
[CL 13873755 by Richard TalbotWatkin in ue5-main branch]
- Feature can be activated in the Experimental section of the Editor Settings
- Replace Texture2D/TextureCube resources by placeholders until their PlatformData is ready
- Add a utility class allowing to encapsulate raw field pointers without breaking compatibility
- Protect PlatformData from unsafe access through encapsulation.
- Protect texture's resource from race conditions between game and render threads through encapsulation.
- This allows to get rid of FlushRenderingCommands and long game-thread stutters when Updating a texture's resource.
- UpdateResource was never safe to call without a FlushRenderingCommands and multiple call-site are doing exactly that, this will fix those cases.
- Those were probably undetected due to their low occurence rate under normal conditions but can easily be reproed during async texture compilation on 32 cores.
- Force wait on required texture compilations for MaterialBaking, ProxyMesh, Thumbnail generation for disk usage
- Wait on all textures compilation whenever a wait for all shaders compilation is requested for safety (i.e. screenshot)
- Compile UI and heightmap textures with higher priority to reduce visual artefacts
- Increase priority of texture that have been rendered to improve time-to-usefulness of the editor under low core count
- Async compilation is disabled for -game / non-editor mode as there is currently no support for async bulk data loading from external files
- Properly cancel async tasks when UTexture is garbage collected before the compilation is finished
- Show progress when explicitly waiting on compilation
- Changing the mip settings in the texture editor (or any settings requiring the running platform data to be recomputed) will now be processed asynchronously.
DEBUGGING
- Can be forcibly enabled/disabled through command-line via -asynctexturecompilation=[off, on, paused]
- Can pause texture compilation using Editor.AsyncTextureCompilation = 2 or -asynctexturecompilation=paused
- Can manually resume a specified amount of paused compilation using Editor.AsyncTextureCompilationResume [Num]
- Can forcibly wait on all compilation using Editor.AsyncTextureCompilationFlushAll
BENCHMARKS
- 3m15s to 1m20s when loading Apollo_Terrain with no textures in DDC (AMD TR 3970X)
- 6m45s to 1m11s when loading Apollo_Terrain with no textures in DDC (-corelimit=8)
- 3m10s to 1m54s when lauching PIE on Apollo_Terrain with no textures in DDC (AMD TR 3970X)
- 7m43s to 1m36s when lauching PIE on Apollo_Terrain with no textures in DDC (-corelimit=8)
- 0m57s to 0m42s when importing Attic_NVIDIA.usd with no textures in DDC (AMD TR 3970X)
- 2m14s to 0m35s when importing Attic_NVIDIA.usd with no textures in DDC (-corelimit=4)
TESTS
- Success on all material baking tests from EngineTests with -asynctexturecompilation=paused
- Runned with -corelimit=1 all the way to unlimited
- Cooking worked
- Opening the texture editor/material editor will force the compilation to finish like expected.
- Changing a setting in the texture editor will recompile async, even allowing to close the editor and continue doing other changes.
- Unpausing the compilation will update the texture thumbnails properly.
- Started with -asynctexturecompilation=paused, and then unpaused after a map loading, and then into a PIE session to stresstest UpdateResources.
- Tested both dx11/dx12
- Vulkan fails on Fortnite even with -asynctexturecompilation=off because of Landscape weigthmap, not this CL.
- Compiled and tested FortniteGame / UE4 / ShooterGame projects
#rb Uriel.Doyon, Francis.Hurteau
[CL 13694814 by danny couture in ue5-main branch]
- Removed hardcoded element type arrays (Vertices, Edges, Triangles etc.). Mesh element types can now be arbitrarily added, with any number of channels.
- Mesh element containers have a much leaner format; instead of sparse arrays, they are now represented by a simple bitarray, determining whether an index is used or not. Consequently, mesh topology is now entirely described with the attribute system, e.g. edge start and end vertices, triangle vertices, etc.
- Support added for attributes of arbitrary dimensions, e.g. float[4] or int[2].
- Support added for attributes which index into another mesh element container.
- Added FMeshElementIndexer: this is an efficient container for maintaining backward references from one element type to another; for example, edges have an attribute specifying which vertices are at each end (an attribute of type FVertexID[2]). With an indexer, it is possible to look up which edges contain a given vertex, even though this is not explicitly stored. Indexers are designed to do minimal allocations and update lazily and in batch when necessary.
- Added support for preserving UV topology in static meshes. UVs are now a first-class element type which may be indexed directly from triangles.
- Added the facility to access the underlying array in an attribute array directly.
- Triangles now directly reference their vertex, edge and UV IDs. Vertex instances are to be deprecated.
- Changed various systems to be triangle-centric rather than polygon-centric, as this is faster. Triangles are presumed to be the elementary face type in a MeshDescription, even if polygons are still supported. The concept of polygons will be somewhat shifted to mean a group of triangles which should be treated collectively for editing purposes.
- Optimised normal/tangent generation and FBX import.
- Deprecated EditableMesh, MeshEditor and StaticMeshEditorExtension plugins - these are to be removed, but they still have certain hooks in place which need removing.
#rb
[CL 13568702 by Richard TalbotWatkin in ue5-main branch]
- ShaderMapId being identical makes the in-memory case alias material SMs when caching resources for -targetplatform=Windows+WindowsNoEditor
- Not a full fix, next up - Niagara and OpenColorIOColor
#rb Ben.Ingram
#jira UE-90852
#ROBOMERGE-SOURCE: CL 13011405 in //UE4/Release-4.25/... via CL 13011409 via CL 13011412
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v683-13008971)
[CL 13011420 by arciel rekman in Main branch]
#rnx
#rb ben.ingram, zousar.shaker
#ROBOMERGE-SOURCE: CL 10996668 via CL 10996669 via CL 10996670
#ROBOMERGE-BOT: (v633-10983880)
[CL 10996671 by mickael gilabert in Main branch]
#rnx
#rb none
#ROBOMERGE-SOURCE: CL 10869240 via CL 10869516 via CL 10869902
#ROBOMERGE-BOT: (v613-10869866)
[CL 10870584 by ryan durand in Main branch]
Certain texture maps generated by merge actors would be red instead of greyscale
#rb rolando.caloca, uriel.doyon
#rnx
#ROBOMERGE-SOURCE: CL 10073049 in //UE4/Release-4.24/...
#ROBOMERGE-BOT: RELEASE (Release-4.24 -> Main) (v574-10069753)
[CL 10073051 by sebastien lussier in Main branch]
Replicated from CL# 7924370.
#rb none
#ROBOMERGE-OWNER: steve.robb
#ROBOMERGE-AUTHOR: steve.robb
#ROBOMERGE-SOURCE: CL 9279060 via CL 9279063
#ROBOMERGE-BOT: (v443-9013191)
[CL 9279836 by steve robb in Main branch]
Stubbed out material instance implementation for now
Use the new interface in RVT parameter material expressions
#ROBOMERGE-SOURCE: CL 8556897 via CL 8562562
#ROBOMERGE-BOT: (v406-8472469)
[CL 8562734 by jeremy moore in Main branch]
* Option is disabled by default
* When enabled, the resulting merged mesh will have:
** An additional unused material which is created from the merge of all meshes materials
** An additional set of UV coordinates that can be used to apply the merged material to any section of the mesh
** Added additional static switch params to BaseFlattenMaterials to allow specifying UV channel
[FYI] jurre.debaare
#rnx
#ROBOMERGE-SOURCE: CL 7473968 via CL 7474018
#ROBOMERGE-BOT: (v372-7473910)
[CL 7474030 by sebastien lussier in Main branch]