Commit Graph

14 Commits

Author SHA1 Message Date
sebastien lussier
2689dd71cb World Partition - HLOD: Added support for automatic texture sizing for Merged & Simplified HLODs
* 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]
2022-09-20 01:40:59 -04:00
nick darnell
8c6dccfce9 Core - Making some improvements to TObjectPtr, introducing some templating utilities so that we can better template match TObjectPtr vs UObject* pointers so that a single templated function can work for either.
Core - Added support for assigning a TObjectPtr<T> to a TScriptInterface just like you'd expect from a raw Object*.

Actor - Making a version of GetComponents that will work for TObjectPtr collections.  Additionally fixed several places in the engine where we're forcing the template parameter instead of allowing it to be determined automatically - which forced me to leave one of the GetComponent implementations, but I think we aught to remove it. e.g.

Don't Do

TArray<UPrimitiveComponent*> PrimComponents;
Actor->GetComponents<UPrimitiveComponent>(PrimComponents);

Do

TArray<UPrimitiveComponent*> PrimComponents;
Actor->GetComponents(PrimComponents);

Slate - Introducing support for collections of TObjectPtr<T>'s being used as source lists for the STableView.

#preflight 630f7af8e54ec9d581b03d65
[REVIEW] [at]Marc.Audy, [at]Steve.Robb, [at]Zousar.Shaker

[CL 21727328 by nick darnell in ue5-main branch]
2022-08-31 16:13:49 -04:00
Sebastien Lussier
b62288f3a9 #jira UE-152943
Merge Actor - Mesh Approximate Tool - Improved error handling
#rb trivial
#preflight 630d9572a416f6df25c87702

[CL 21696028 by Sebastien Lussier in ue5-main branch]
2022-08-30 00:47:09 -04:00
Matt Peters
7ad238a806 AssetRegistry includes (Engine/Source): change #include "AssetData.h" -> #include "AssetRegistry/AssetData.h", and similar for the other moved AssetRegistry headers.
#rb Zousar.Shaker
#rnx
#preflight 6270509a220f89f0ad573030

[CL 20016982 by Matt Peters in ue5-main branch]
2022-05-02 18:06:48 -04:00
robomerge
c8933e3cc7 Fix crash when trying to run Merge Actor Tool using new Approximation and replace an already generated mesh.
#jira UE-140994
#rb phil.deseve
[FYI] sebastien.lussier
#preflight 621e8a355824646acb648ca5


#ROBOMERGE-AUTHOR: jeanfrancois.dube
#ROBOMERGE-SOURCE: CL 19221959 via CL 19222040 via CL 19222047 via CL 19222056 via CL 19224803
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19229293 by robomerge in ue5-main branch]
2022-03-02 16:13:27 -05:00
sebastien lussier
7721055c7d #jira UE-140994
Crash when trying to run Merge Actor Tool using new Approximation and replace an already generated mesh

Will now generate the assets in temp packages & replace the original ones after.

#rb jeanfrancois.dube
#preflight 6214e1ff542abc0c8d56fa14

#ROBOMERGE-AUTHOR: sebastien.lussier
#ROBOMERGE-SOURCE: CL 19082677 in //UE5/Release-5.0/... via CL 19097167
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19140948 by sebastien lussier in ue5-main branch]
2022-02-24 23:36:32 -05:00
sebastien lussier
6c116e1d08 #jira UEDOC-20563
Doc / UI improvements for the Merge Actors tool
#rnx
#rb luc.eygasier
#preflight 61def7904f0bdec364a15690

#ROBOMERGE-AUTHOR: sebastien.lussier
#ROBOMERGE-SOURCE: CL 18584832 in //UE5/Release-5.0/... via CL 18584845 via CL 18584856
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Test -> Main) (v899-18417669)

[CL 18584860 by sebastien lussier in ue5-main branch]
2022-01-12 11:00:25 -05:00
sebastien lussier
e2bfa527a4 Actor Merging Tool
* Fixed copy paste error causing the wrong texture size to be computed when using the approximate actor merge method along with an automatic texture size based on the mesh draw distance
#rb richard.malo
#preflight 612f841d677f0e00018a507b


#ROBOMERGE-SOURCE: CL 17386441
#ROBOMERGE-BOT: (v865-17346139)

[CL 17387892 by sebastien lussier in ue5-main branch]
2021-09-01 11:51:31 -04:00
sebastien lussier
d76f7fa374 World Partition HLODs - Added automatic texture size selection based on hints
Supports either:
* From texel density
* From expected mesh screen size
* From expected mesh draw distance

Compute best texture size, taking UV map waste into account.
Currently only supported by the Approximate Actors merge method, to be integrated in the ProxyLOD later.
#rb ryan.schmidt, luc.eygasier


#ROBOMERGE-SOURCE: CL 16635038
#ROBOMERGE-BOT: (v831-16623017)

[CL 16635077 by sebastien lussier in ue5-main branch]
2021-06-10 21:49:51 -04:00
sebastien lussier
4c88fc99af Approximate Actors HLOD
* Moved duplicated code that was constructing a IGeometryProcessing_ApproximateActors::FOptions from a FMeshApproximationSettings to FApproximateActorsImpl::ConstructOptions()
* Added mesh generation options
** bAllowDistanceField - on by default
** bSupportRayTracing - on by default
** bGenerateLightmapUVs - off by default

* Disable creation of physics body for HLOD

* Scale texture size based on grid promotion (higher z grid index -> higher area covered) - Only temporary, will probably switch to a texel density option instead

#rb ryan.schmidt, jeanfrancois.dube, luc.eygasier

#ROBOMERGE-SOURCE: CL 16538607 in //UE5/Private-Frosty/...
#ROBOMERGE-BOT: STARSHIP (Private-Frosty -> Main) (v828-16531559)

[CL 16538620 by sebastien lussier in ue5-main branch]
2021-06-02 16:08:31 -04:00
ryan schmidt
2fab582c78 GeometryProcessing:
- extend FImageAdapter to support reading
ModelingComponents::
- Add AssetUtils::ForceVirtualTexturePrefetch(), ::SaveDebugImage() variants to Texture2DUtil
- Add support for debug image writing to WorldRenderCapture and SceneCapturePhotoSet
- FWorldRenderCapture now computes more accurate bounds (visible Components instead of Actors), and does an explicit VirtualTexture prefetch before doing render capture
- FStaticMeshAssetOptions now exposes Nanite settings to allow UStaticMeshes to be created with Nanite already enabled (currently NaniteSettings.PositionPrecision defaults to max)
ApproximateActors:
- IGeometryProcessing_ApproximateActors::FOptions now has settings for enabling Nanite on generated meshes
- ApproximateActorsImpl applies these settings, also enables VT on generated textures if necessary
- FMeshApproximationSettings/FMeshApproximationTool updated w/ new Nanite settings
#rb none
#rnx
#jira none
[FYI] sebastien.lussier
#preflight 60b08323f51cd90001775b98

#ROBOMERGE-OWNER: ryan.schmidt
#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 16499613 in //UE5/Private-Frosty/...
#ROBOMERGE-BOT: STARSHIP (Private-Frosty -> Main) (v823-16466674)
#ROBOMERGE-CONFLICT from-shelf

[CL 16499647 by ryan schmidt in ue5-main branch]
2021-05-28 02:46:59 -04:00
Ryan Schmidt
9defa23f46 GeometryProcessing:
- Add FImageAdapter, wraps TImageBuilder of different types and provides a consistent interface, so that other code doesn't need specializations for each image type
- FMeshSceneAdapter now supports the ability to detect and thicken "thin" meshes, by flattening the instances into unique mesh copies (generally necessary due to scaling). Can also now return statistics about the mesh scene, return a full flattened mesh (for debugging), and automatically generate a "closing mesh" that can help to cap off the base of mesh assemblies when trying to generate a solid/etc.

ModelingComponents:
- FWorldRenderCapture now writes via FImageAdapter instead of an Image4f
- FSceneCapturePhotoSet now stores less data for photo sets. BaseColor/Emissive/WorldNormal are 3f, Roughness/Specular/Metallic are 1f
- IApproximateActors and implementation now support optional base-capping, occluded mesh removal, geometric-tolerance simplification, thin mesh auth-thickening. Now creates MICs based on an input Material, instead of new Material. Added ability to emit a flattened debug mesh, and print debug info.

MergeActors:
- Expose above improvements to IApproximateActors

#rb none
#rnx
#jira none
#preflight 609ef005f6c6e3000144c5e2

[CL 16338550 by Ryan Schmidt in ue5-main branch]
2021-05-14 21:11:51 -04:00
Sebastien Lussier
fec9e8df17 WorldPartition HLOD - First pass at hooking MeshApproximation merge method to HLODs
#rb patrick.enfedaque

[CL 16254621 by Sebastien Lussier in ue5-main branch]
2021-05-10 16:13:14 -04:00
Ryan Schmidt
6cbc01fc8a MergeActors: add new Approximation method based on GeometryProcesingInterfaces implementation
#rb none
#rnx
#jira none
#preflight 6091d421a370e10001cda7e9
#fyi sebastien.lussier

[CL 16203014 by Ryan Schmidt in ue5-main branch]
2021-05-05 00:44:46 -04:00