*Added FPrimitiveSceneDesc, a structure you can initialize with a description of the primitive you're trying to Add/Remove/Update in the FScene
-Added entry points in FSceneInterface to do those operations, legacy entry points using UPrimitiveComponent are untouched.
-The code that executes those operations in FScene has been refactored to be shared between the two entry points as much as possible to lessen the additional maintenance burden.
*Added FPrimitiveSceneProxyDesc/FStaticMeshSceneProxyDesc/FInstancedStaticMeshSceneProxyDesc, structures that hold all the necessary information to create a FPrimitiveSceneProxy/FStaticMeshSceneProxy/FInstancedStaticMeshSceneProxy without depending on AActors or UPrimitiveComponent.
-Those structures can be initialized by constructing them with the corresponding UPrimitiveComponents, or by constructing their default versions and initializing the desired fields.
-Creation code for FPrimitiveSceneProxy/FStaticMeshSceneProxy/FInstancedStaticMeshSceneProxy now takes all its info from those desc structures. They are created on demand during scene proxy creation for UPrimitiveComponents. This means no additional memory, and all serialized assets & blueprints are unaffected.
*Added IPrimitiveComponent/IStaticMeshComponent interfaces
-These allow for some editor-only interactions occurring during proxy creation, and serve as a common interface for some code that expected to manipulate UPrimitiveComponent/UStaticMeshComponents. For example FObjectCacheEventSink / FObjectCacheContext now uses those interfaces to associate the resources between various users and interactions like proxy recreation on shader/mesh changes occur through those interfaces.
* Misc
-Moved scene primitive related member variables into a new structure (FPrimitiveSceneInfoData) to facilitate code sharing and implementations of various related functionality (like SetLastRenderTime).
-Changed ObjectCacheContext to store associations between resources and components using component interfaces so that other systems creating proxies have the proper behaviors when resource changes require proxy recreation.
-Added natvis support so that component interfaces to UPrimitiveComponent/UStaticMeshComponent display the component ptr for easier debugging.
-Changed FMotionVectorSimulation to use UObject* instead of UPrimitiveComponent*, it was already using this internally
-Templatized some nanite helpers like ShouldCreateNaniteProxy & AuditMaterials since we need to use them from both UPrimitiveComponent & FPrimitiveSceneProxyDesc and it'll help make sure we keep them in sync.
#jira UE-191990
#rb Zach.Bethel, Ola.Olsson, Jason.Nadro, Krzysztof.Narkowicz
[CL 27200716 by dominic couture in ue5-main branch]
* Reused existing code to share it between all HLOD generation methods
#jira UE-161274, UE-156559
#rb patrick.enfedaque
#preflight 632927c99840225da23c49a5
[CL 22088941 by sebastien lussier in ue5-main branch]
HLOD meshes were sometime referencing MaterialInstanceDynamic, that aren't assets (!RF_Standalone)
* MIDs are usually outered to the components they are assigned to
* Duplicate MIDs and outer them to the generated HLOD UStaticMesh
#rb jeanfrancois.dube
#preflight 6308dfc392620e5ec3b61103
[CL 21597931 by sebastien lussier in ue5-main branch]
WP HLOD - Add Landscape support
Changes to support WP landscape material capture
* Moved IsValidBaseMaterial() from MeshMergeUtilities to MaterialUtilities
* Moved CreateProxyMaterialInstance() from MeshMergeUtilities to MaterialUtilities
* Added FCreateTexture2DParameters::bVirtualTexture
* Added FMaterialUtilities::ExportLandscapeMaterial() which doesn't need a list of primitives to hide (will only render the landscape component primitives)
* Added VT primming to ensure the captured textures have the expected resolution
#rb patrick.enfedaque
#preflight 6206a9e454003c49ad44c354
#ROBOMERGE-AUTHOR: sebastien.lussier
#ROBOMERGE-SOURCE: CL 18980162 in //UE5/Release-5.0/... via CL 18980592 via CL 18980979
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)
[CL 18981032 by sebastien lussier in ue5-main branch]
Changed fallback settings to be largely error based with new property FallbackRelativeError.
Nanite builder will now provide the LOD fallbacks for all autogenerated LOD levels which is far faster than generating them from scratch.
#rb graham.wihlidal
#preflight 61f9e1fe9e4d23cd93b8d556
#ROBOMERGE-AUTHOR: brian.karis
#ROBOMERGE-SOURCE: CL 18820056 in //UE5/Release-5.0/... via CL 18820070 via CL 18822916
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)
[CL 18825066 by brian karis in ue5-main branch]
This represents UE4/Main @18073326, Release-5.0 @18081140 and Dev-PerfTest @18045971
[CL 18081471 by aurel cordonnier in ue5-release-engine-test branch]
The scheme solves issues where meshes would no longer align properly after converting them to Nanite. It also solves the precision issues in clusters with triangles of non-uniform size.
By default the precision is heuristically selected by Nanite, but the user also has the ability to override with an explicit precision to solve issues or optimize for disk size.
Clusters store the coordinate components using the minimal number of bits required to span the range of values in the cluster.
Apart from fixing issues, the default quality seems no worse than before and is typically ~5-10% smaller than before.
Added Position Precision to the top left of Mesh viewer along with the other mesh stats.
Added Position Precision dropdown to Nanite import settings.
Added debug mode "r.nanite.visualize PositionBits" that shows the vertex position bit sizes for clusters.
New quantization code now updates float positions and cluster bounds to reflect the quantized coordinates.
#rb brian.karis, graham.wihlidal
#JIRA UE-102722
#preflight 607d56774df3b60001ef477c
[CL 16049335 by Rune Stubbe in ue5-main branch]
- Preserve guid during save if static mesh bulkdata content hasn't changed to avoid triggering unnecessary rebuilds
- Make sure the next HLOD generation is going to use the HashAsGuid feature to avoid recompiling staticmesh that are generated if they are exactly the same as before
- 31m10s to 14m15s to cook P_Construct_WP with a warmed-up DDC
#fyi Richard.TalbotWatkin
#rb Matt.Peters, Sebastien.Lussier, Yuriy.ODonnell
[CL 15755322 by danny couture in ue5-main branch]
* General cleanup
* Removed ExtractImposterToRawMesh() which was overspecialized and not specifically handling Imposters
* Renamed remains of FRawMesh to MeshDescription
#rb patrick.enfedaque
[CL 14243261 by Sebastien Lussier 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]
#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]