- allowed TMeshAttributeRef<TArrayView<T>> to be initialized from *any* attribute type, thus providing a generic way of accessing any type of attribute, be it simple, compound or unbounded array.
ArrayAttribute improvements:
- sped up inserting by not requiring every element of a chunk to be valid if it has not yet been used
- added new API to provide Reserve / Add / AddUnique etc
Indexer improvements:
- fixed issue allowing an attribute with a compound index attribute (e.g. int[3]) to be indexed multiple times
#rb Halfdan.Ingvarsson
[CL 14814025 by Richard TalbotWatkin in ue5-main branch]
Removed attribute views.
Refactored MeshAttributeArray implementation.
Added a new GetArrayView() method for all types of TMeshAttributeRefs which can be used generically.
#rb Alexis.Matte
[CL 14651594 by Richard TalbotWatkin in ue5-main branch]
This is the correct versioning for new MeshDescription objects.
The original versioning (in ReleaseObjectVersion) clashes with changes being brought over from 4.26. MeshDescription objects already saved in UE5 will only be valid for precisely FReleaseObjectVersion::MeshDescriptionNewFormat; subsequent version numbers belong to assets from 4.26 (and derived streams) which have been resaved and merged into UE5, and do *not* have the new MeshDescription format.
Going forward, UE5MainStreamObjectVersion holds the latest version for MeshDescription objects.
#rb Steve.Robb, Marc.Audy
[CL 14377658 by Richard TalbotWatkin in ue5-main branch]
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]
- 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]
#rnx
#rb none
#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900
#ROBOMERGE-BOT: (v613-10869866)
[CL 10870549 by ryan durand in Main branch]
- MeshDescription now held as compressed bulk data and unpacked on demand. This is managed by FMeshDescriptionBulkData.
- Made RawMesh accessors in StaticMesh responsible for performing legacy conversion from MeshDescription if necessary.
- Added FBulkDataReader/FBulkDataWriter for serializing bulk data to/from archives.
- Added FUntypedBulkData::UnloadBulkData() for releasing the bulk data allocation without invalidating it (so it can be reloaded when necessary). Editor only.
- Renamed StaticMesh MeshDescription methods (now GetMeshDescription(), CommitMeshDescription() etc).
- Removed unnecessary mesh description attributes from StaticMesh: those which are used only by Editable Mesh, and transient attributes which are automatically generated when needed for building vertex tangent space.
- Slight change to FAttributesSetBase::RegisterAttribute(): if the attribute specified already exists, it will be amended to adopt the type, passed flags and number of indices. If only the number of indices changes, any existing data will be preserved if possible.
- Added TMeshAttributesRef::Copy() to copy an entire attributes array from one name/index to another.
- Changed implementation of TMeshAttributesRef/TMeshAttributesView to provide a const ref/view if the template type parameter is const. Added TMeshAttributesConstRef/TMeshAttributesConstView as an alias for backwards compatibility.
- Added FMeshDescription::IsEmpty() for determining whether a mesh description has any content or not.
- Removed versioning GUID for mesh description: this should be handled by each mesh description client now.
#rb Alexis.Matte
[CL 4644791 by Richard TalbotWatkin in Dev-Editor branch]
- Removed TMeshAttributeArraySet::AddArray because the functionality was already available as part of SetNumIndices.
- Renamed TMeshAttributeArraySet::InsertArray, RemoveArray to InsertIndex, RemoveIndex for naming convention consistency (these methods deal with attribute indices, not with arrays). Added support for them in other attribute classes, and made them virtual so they can be called as part of an AttributesView.
- Removed redundant code in FUSDStaticMeshImportState::AddPolygons, when determining the number of UVs in the mesh description.
#rb none
[CL 4295326 by Richard TalbotWatkin in Dev-Editor branch]