Commit Graph

35 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
richard talbotwatkin
176b37fb0c First pass implementaiton of a message passing system for Interchange. This permits messages, warnings and errors to be output from translators, pipelines and factories, as well as from external processes via the Interchange dispatcher.
Implemented UI tab widget for dislaying import results.
Implemented basic static mesh import, excluding collision import.
Various API tweaks, to accomodate the message passing, plus various bugfixes.
#rb Alexis.Matte

#ROBOMERGE-SOURCE: CL 16822676 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16822681 by richard talbotwatkin in ue5-release-engine-test branch]
2021-07-12 05:33:04 -04:00
johan duparc
24da5eadae Datasmith: potential fix for crash in FStaticMeshOperations::ComputeTangentsAndNormals
#jira UE-117403
#rb JeanLuc.Corenthin
#rnx
#lockdown Simon.Tourangeau

#ROBOMERGE-OWNER: johan.duparc
#ROBOMERGE-AUTHOR: johan.duparc
#ROBOMERGE-SOURCE: CL 16613047 in //UE5/Release-5.0-EarlyAccess/... via CL 16613256
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v828-16531559)

[CL 16613266 by johan duparc in ue5-release-engine-test branch]
2021-06-09 17:26:10 -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
5ab1f8001f Added IsReservedAttributeName to check if an attribute is "reserved", i.e. meaning it should only be created by the given *MeshAttributes class or its bases.
#rb richard.talbotwatkin
#jira none
#rnx

[CL 16168127 by halfdan ingvarsson in ue5-main branch]
2021-04-30 10:30:27 -04:00
Marc Audy
3cfedaade8 Fix PVS warning V502 when comparing against NAME_None in a trinary
[CL 16137741 by Marc Audy in ue5-main branch]
2021-04-28 01:58:36 -04:00
Sebastien Lussier
8b0ca6b2ea Optimized FStaticMeshOperations::GenerateUniqueUVsForStaticMesh()
* Create a mesh view instead of working with a copy of the FMeshDescription

[CL 15669870 by Sebastien Lussier in ue5-main branch]
2021-03-10 17:06:44 -04:00
richard talbotwatkin
7d27d48d42 Do not assume that the static mesh triangles array will be compact prior to calculating triangle face normals/tangents.
#jira UE-109753

#ROBOMERGE-SOURCE: CL 15572840 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)

[CL 15572863 by richard talbotwatkin in ue5-main branch]
2021-03-02 15:34:39 -04:00
Sebastien Lussier
f0b9abd9a8 FStaticMeshOperations - Added AppendMeshDescriptions()
* A more efficient version of AppendMeshDescription() for multiple meshes
* Properly reserve arrays to limit amount of temporary allocations
* Add triangles rather than polygons, avoid the costlier SourceMesh.GetPolygonVertexInstances() which had to perform a map lookup
#rb patrick.enfedaque
#robomerge Release-5.0-EarlyAccess

[CL 15419836 by Sebastien Lussier in ue5-main branch]
2021-02-16 13:49:10 -04:00
Sebastien Lussier
9ba281aa0b FStaticMeshOperations::GenerateUniqueUVsForStaticMesh() shouldn't test all attributes when trying to merge UVs
* We only care for UVs & vertex colors
#rb julien.lheureux

[CL 15217147 by Sebastien Lussier in ue5-main branch]
2021-01-27 10:10:54 -04:00
Marc Audy
bc88b73a29 Merge Release-Engine-Staging to Main @ CL# 15151250
Represents UE4/Main @ 15133763

[CL 15158774 by Marc Audy in ue5-main branch]
2021-01-21 16:22:06 -04:00
ionut matasaru
a90718a7fb Fixed usage of TRACE_CPUPROFILER_EVENT_SCOPE macro(s) in various places.
Common mistakes:

a) TRACE_CPUPROFILER_EVENT_SCOPE("Foo") or TRACE_CPUPROFILER_EVENT_SCOPE("FClass::Foo")
    --> results in a timer named "Foo" or "FClass::Foo" (the quotes will be included in the name)

b) TRACE_CPUPROFILER_EVENT_SCOPE(TEXT("Foo"))
    --> results in a timer named L"Foo" (L and quotes will be included in the name)

c) TRACE_CPUPROFILER_EVENT_SCOPE_TEXT(TEXT("Other Foo")) or TRACE_CPUPROFILER_EVENT_SCOPE_TEXT("Foo")
    --> Slow! It will use dynamic string matching that adds an unnecessary overhead.

Correct usage:
    TRACE_CPUPROFILER_EVENT_SCOPE(Foo)
    TRACE_CPUPROFILER_EVENT_SCOPE(FClass::Foo)
    TRACE_CPUPROFILER_EVENT_SCOPE_STR("Other Foo") // when timer name has spaces
    TRACE_CPUPROFILER_EVENT_SCOPE_TEXT(*Foo.ToString()) // only if a dynamic name is really needed

#rb Catalin.Dragoiu
#fyi Marc.Audy, Krzysztof.Narkowicz, Rune.Stubbe, Michal.Valient

[CL 15134822 by ionut matasaru in ue5-main branch]
2021-01-19 06:29:15 -04:00
Jimmy Andrews
0a7e843bbf Fix mikkt crashing when meshdescription has no triangles
#rb Richard.TalbotWatkin

[CL 15085810 by Jimmy Andrews in ue5-main branch]
2021-01-14 12:19:06 -04:00
Marc Audy
ada7c144fa Merge //UE5/Release-Engine-Staging @14903491 to //UE5/Main
[CL 14906022 by Marc Audy in ue5-main branch]
2020-12-11 14:21:20 -04:00
Richard TalbotWatkin
065224a5b0 Support for the UMeshDescriptionBase / UStaticMeshDescription hierarchy to take a reference to an existing mesh description as well as hold one by value.
Added additional API for getting element counts.

[CL 14719778 by Richard TalbotWatkin in ue5-main branch]
2020-11-11 11:25:09 -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
Jeff Farris
5d6a040e5f Moved/added some deprecation pragmas to fix warnings on some compilers (e.g. VS2017).
#review-14495615 ben.marsh, marcus.wassmer

[CL 14517515 by Jeff Farris in ue5-main branch]
2020-10-19 16:13:57 -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
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
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
sebastien lussier
dd3e8d03fd Fix multiple UV remapping issues for merged meshes
* Vertex color was not taken into account
* OnCreatedMergedRawMeshes() extensions could wiping out vertices colors (was the case for Fortnite)
** Only call extension for the final merged mesh result

Force an update of all HLODs by changing the proxy key
#rb patrick.enfedaque

#ROBOMERGE-OWNER: sebastien.lussier
#ROBOMERGE-AUTHOR: sebastien.lussier
#ROBOMERGE-SOURCE: CL 12671370 via CL 12671428 via CL 12671436 via CL 12671437
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v675-12543919)

[CL 12672166 by sebastien lussier in Main branch]
2020-04-08 10:13:22 -04:00
Sebastien Lussier
055f5e2c31 CIS fix
#rb none
#jira none

[CL 11968903 by Sebastien Lussier in Main branch]
2020-03-05 18:24:55 -05:00
sebastien lussier
c51c310de7 Remove extra UV sets from HLOD meshes
* HLOD0 (merged) - Reliance on DoesUVChannelContainData() & the FMeshMergeSettings::OutputUVs[] array was lost during what looks like a bad code merge in ~2018
* HLOD1 (simplified) - Removed strange processing that added a second UV set, supposedly for lightmapping.  This isn't needed as it's handled in the static mesh build.

Bumped the HLOD proxy key to force a rebuild of all HLODs
#rb chris.bunner, jeanfrancois.dube


#ROBOMERGE-OWNER: sebastien.lussier
#ROBOMERGE-AUTHOR: sebastien.lussier
#ROBOMERGE-SOURCE: CL 11958420 via CL 11958431 via CL 11958469 via CL 11958487
#ROBOMERGE-BOT: (v656-11643781)

[CL 11961121 by sebastien lussier in Main branch]
2020-03-05 16:01:44 -05:00
danny couture
28b496e8a7 Filter out any polygon referencing vertices positions containing NaN to fix crash in MikkTSpace during a datasmith import
Recompile MikkTSpace to include debug symbols in release so we can see callstacks
  - Negligible performance impact (<0.2% of total scene import time) when importing a mesh heavy scene (DATASET-0008a)

#jira UE-88333
#rb Jean-Michel.Dignard

#ROBOMERGE-SOURCE: CL 11535830 in //UE4/Release-4.25/...
#ROBOMERGE-BOT: RELEASE (Release-4.25 -> Release-4.25Plus) (v654-11333218)

[CL 11535833 by danny couture in 4.25-Plus branch]
2020-02-19 06:00:18 -05:00