Commit Graph

58 Commits

Author SHA1 Message Date
Marc Audy
0c3be2b6ad Merge Release-Engine-Staging to Test @ CL# 18240298
[CL 18241953 by Marc Audy in ue5-release-engine-test branch]
2021-11-18 14:37:34 -05:00
andrew davidson
57beb335f2 Merging //UE5/Dev-LargeWorldCoordinates [at] 17581892 to //UE5/Main
#ROBOMERGE-AUTHOR: andrew.davidson
#ROBOMERGE-SOURCE: CL 17595295 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17595306 by andrew davidson in ue5-release-engine-test branch]
2021-09-22 10:01:48 -04:00
Andrew Davidson
3ddc3a4da3 Merge up from //UE5/Dev-LargeWorldCoordinates
#rb none

[CL 16211417 by Andrew Davidson in ue5-main branch]
2021-05-05 15:07:25 -04:00
halfdan ingvarsson
0ca6df2ce0 Added a TAttributesSet::ForEachByType utility function to iterate over attributes of a specific type (e.g. all floats). Allows better specialization of the called function for a given type.
#jira none
#rb Richard.TalbotWatkin

[CL 15658268 by halfdan ingvarsson in ue5-main branch]
2021-03-09 15:46:55 -04:00
Richard TalbotWatkin
c1a73f430e Changed behaviour of GetRawArray so that it returns an empty TArrayView when the container has zero elements. Previously it would attempt to dereference the underlying array allocation which may be nullptr for an empty array.
#rb Jimmy.Andrews

[CL 15089599 by Richard TalbotWatkin in ue5-main branch]
2021-01-14 14:31:57 -04:00
Richard TalbotWatkin
71b016ccac MeshAttributeArray improvements:
- 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]
2020-11-25 17:21:42 -04:00
Richard TalbotWatkin
553e0c3155 Temporarily removed some deprecation directives while analysing a difference in compiler behaviour in order to remove build warnings.
[CL 14652513 by Richard TalbotWatkin in ue5-main branch]
2020-11-04 11:07:40 -04:00
Richard TalbotWatkin
48534ff000 Added unbounded arrays as a new attribute type for mesh attributes. They are registered with RegisterAttribute<T[]>, and accessed with GetAttributesRef<TAttributeArray<T>>.
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]
2020-11-04 08:40:25 -04:00
Marc Audy
50a3d7d368 Merge Release-Engine-Staging to Main @ CL# 14467590
This represents UE4/Main @ 14432125 + some cherrypick fixes

[CL 14468207 by Marc Audy in ue5-main branch]
2020-10-09 22:42:26 -04:00
Marcus Wassmer
3b81cf8201 Merging using //UE5/Main_to_//UE5/Release-Engine-Staging @14384769
autoresolved files
#rb none

[CL 14384911 by Marcus Wassmer in ue5-main branch]
2020-09-24 00:43:27 -04:00
Richard TalbotWatkin
6a54e1dced Created new object version in UE5MainStreamObjectVersion for MeshDescription format changes.
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]
2020-09-23 12:12:34 -04:00
Richard TalbotWatkin
458797a366 Fixed issue when serializing legacy assets.
#jira UE-98121
#rb none

[CL 14278334 by Richard TalbotWatkin in ue5-main branch]
2020-09-09 08:58:09 -04:00
Richard TalbotWatkin
51d4cb3f66 Fully deprecated old MeshDescription APIs.
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]
2020-07-16 08:23:15 -04:00
Richard TalbotWatkin
e5eb3cc879 Unbroke static mesh serialization.
#fyi Matt.Kuhlenschmidt

[CL 13571455 by Richard TalbotWatkin in ue5-main branch]
2020-05-28 14:09:49 -04:00
Richard TalbotWatkin
4884bf9d9a First pass of MeshDescription API and format refactor.
- 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]
2020-05-28 10:56:57 -04:00
ryan durand
0f0464a30e Updating copyright for Engine Runtime.
#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]
2019-12-26 14:45:42 -05:00
Robert Manuszewski
7b6f840f7f Copying //UE4/Dev-Core @ 10708550 to Dev-Main (//UE4/Dev-Main)
#rb none

[CL 10708666 by Robert Manuszewski in Main branch]
2019-12-13 11:07:03 -05:00
Chris Gagnon
8ab0638182 Copying //UE4/Dev-Editor to Dev-Main (//UE4/Dev-Main) for 4.24
#rb none

[CL 9325047 by Chris Gagnon in Main branch]
2019-10-01 20:41:42 -04:00
Michael Lentine
9db7de9fdf Copying //UE4/Dev-Physics to Dev-Main (//UE4/Dev-Main) [at] 9098278
#rb none
#rnx

[CL 9098401 by Michael Lentine in Main branch]
2019-09-25 13:55:37 -04:00
Chris Gagnon
8fc25ea18e Merging //UE4/Dev-Main to Dev-Editor (//UE4/Dev-Editor)
#rb none

[CL 4676797 by Chris Gagnon in Dev-Editor branch]
2019-01-02 14:54:39 -05:00
Richard TalbotWatkin
e74a1e7fc4 - Deprecated FRawMesh as source model serialization format for static meshes.
- 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]
2018-12-10 09:29:08 -05:00
Johan Duparc
7d5ee4129a MeshAttributeArray: moved GetAttributeNames from TAttributesSet to FAttributesSetBase
#rb Richard.Talbot-Watkins

[CL 4593415 by Johan Duparc in Dev-Editor branch]
2018-11-26 15:44:26 -05:00
Matt Kuhlenschmidt
cde8160913 Merging //UE4/Dev-Main to Dev-Editor (//UE4/Dev-Editor)
#rb none

[CL 4572510 by Matt Kuhlenschmidt in Dev-Editor branch]
2018-11-16 11:15:08 -05:00
Alexis Matte
8b96dc21df Deprecate FRawMesh - Mesh merge utilities
#jira UE-64437
#rb none

[CL 4424092 by Alexis Matte in Dev-Editor branch]
2018-10-03 16:09:08 -04:00
Richard TalbotWatkin
1dcb741a2b - Updated MeshDescription attribute calls to fix deprecation warnings.
- 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]
2018-08-16 19:55:15 -04:00