200 Commits

Author SHA1 Message Date
alexis matte
9ccad7be42 Interchange: Fix skeletal mesh reimport: custom LODs, Alternate skin profiles and Cloth binding are now re-importing properly.
- Also fix the legacy alternate skinning if there is custom LODs in the asset. The alternate skin profiles are not lost anymore

#jira UE-205049 , UE-204958 , FORT-705238
#rb JeanLuc.Corenthin
#rnx

[CL 31337398 by alexis matte in 5.4 branch]
2024-02-09 09:19:36 -05:00
ola olsson
1e7d818b97 Remove needless include of NaniteDefinitions.h to cut UE build items due to changes from ~5000 to ~100
#rnx
#rb graham.wihlidal

[CL 30629721 by ola olsson in ue5-main branch]
2024-01-16 03:46:33 -05:00
jamie hayes
16ce5d4a78 Add an option for Nanite meshes to consider edge length during simplification as a means of preventing oversimplification of meshes that are intended to be deformed (e.g. via WPO, Spline Mesh Component).
#rb brian.karis

[CL 28594884 by jamie hayes in ue5-main branch]
2023-10-09 15:40:27 -04:00
Brian Karis
a622f52036 Added LerpUVs property to Nanite static mesh settings.
Enabled by default. When disabled UVs are not lerped in the simplifier. This is useful when data stored in UVs isn't valid to interpolate, for example indexes.

Fixed long standing bug where locked boundary verts still would get attributes recalculated when taking part in an edge collapse. This results in them not matching when later merged with their neighbor, causing attribute discontinuities where they previously weren't. That will degrade further simplification, bloat vertex work, bloat vertex storage, and generally look worse.

Can reduce rendered vertex count by 14% and disk size by 3%.

#rb rune.stubbe, graham.wihlidal
#lockdown marc.audy

[CL 27715715 by Brian Karis in ue5-main branch]
2023-09-08 12:38:58 -04:00
Rune Stubbe
737c77422f Nanite support for explicit tangents
#jira UE-166732
#rb brian.karis
#fyi graham.wihlidal, jamie.hayes
#preflight 644f9d045403400548450480

[CL 25282711 by Rune Stubbe in ue5-main branch]
2023-05-01 07:48:12 -04:00
florin pascu
0f6d9d9b28 Use PerPlatformProperties properly when in preview
#jira UE-175594
#rb Jack.Porter
#preflight 6408854ec13b7130d2aa2d5b

[CL 24559190 by florin pascu in ue5-main branch]
2023-03-08 09:39:07 -05:00
tiago costa
99ce024d70 Keep all Nanite settings controls in Static Mesh Editor enabled when Nanite is force enabled on the mesh.
#rb graham.wihlidal
#preflight 6402363a5515f4f57be55253

[CL 24508793 by tiago costa in ue5-main branch]
2023-03-03 17:36:09 -05:00
kevin ortegren
4b4f0aa5eb Adding cvar to determine the default collapse mode of Nanite Settings in the details panel of the Static Mesh Editor Tool.
#rnx
#rb jason.stasik, sara.zokaei
#preflight 64009775ef1b24bf94ffe8a2
#test editor

[CL 24493640 by kevin ortegren in ue5-main branch]
2023-03-02 20:26:10 -05:00
tiago costa
71f30ec582 Update which Nanite controls are exposed for Static Meshes in UEFN.
- Context: Nanite support is automatically enabled on all meshes so want to expose quality controls and hide controls to enable/disable Nanite support.
- Expose Nanite quality settings in Static Mesh Editor.
- Hide Nanite menu in Content Browser / Static Mesh Actions.
- Hide option to enable Nanite in FBX import options.

#preflight 63fd3bd3f43e53f6812f8067
#rb aleksander.netzel

[CL 24437086 by tiago costa in ue5-main branch]
2023-02-27 21:08:22 -05:00
brian karis
d1901ae146 Added Nanite static mesh setting: Fallback target.
This is an enum to say which target to reduce to for the fallback. It makes the default "Auto" which gives us more ability to change the default heuristic without needing to change uproperty defaults.

Along with this added r.Nanite.Builder.FallbackTriangleThreshold. Any mesh with source triangle count less than this threshold uses the source triangles directly for the fallback.

#rb graham.wihlidal
#lockdown marc.audy

#preflight 63f0041b1d71bcd26225228c

[CL 24330590 by brian karis in ue5-main branch]
2023-02-20 18:59:18 -05:00
Rune Stubbe
ac1c83ce92 Added new "Root Geometry" visualization. (r.Nanite.Visualize RootGeometry).
Changed Nanite visualization mode values from bits to consecutive numbers.
Removed temporary debug cvars r.Nanite.Streaming.Debug.TrimLockRegion and r.Nanite.Streaming.Debug.PersistPageUploadBuffer

Streamer now updates of cluster leaf flags using a custom shader that preserves the other flags, so we can now support multipe cluster flags.
Moved streaming shaders to separate files.

Format updates:
-Leaf flag subdivided into 3 different flags.
--Root leaf: Clusters that are leaves when only the root data is loaded. Needed for RootData visualization.
--Streaming leaf: Clusters that are leaves with the current streaming cut. Previous leaf semantics.
--Full leaf: Clusters that are leaves when everything is fully streamed in. Useful for VSM cache invalidation heuristics.

-Added root group flag for identifying groups that are fully inside the streaming cut (needed for RootData visualization).
-Added hierarchy depth to pages. Useful for bounding number of passes for multipass culling.

#rb graham.wihlidal
#fyi brian.karis, jamie.hayes
#preflight 63f36aed81646f1f249f2c76

[CL 24312697 by Rune Stubbe in ue5-main branch]
2023-02-20 08:07:14 -05:00
graham wihlidal
70fd7c02c5 Refactored places fetching the result of NaniteSettings.bEnabled to instead get the value from UStatic::IsNaniteEnabled() so it correctly includes the force flag (except places using it to determine whether settings should be set).
#fyi brian.karis
#preflight trivial

[CL 24291376 by graham wihlidal in ue5-main branch]
2023-02-17 16:35:05 -05:00
dave belanger
41f6b2e3bd Expose StaticMesh LOD ScreenSize property (a detail customization row)
#rb none
#preflight skip

[CL 24215602 by dave belanger in ue5-main branch]
2023-02-14 13:02:53 -05:00
Rune Stubbe
ffb5c81aad Added normal/TangentZ precision controls for Nanite meshes
#rb graham.wihlidal
#fyi brian.karis, jamie.hayes
#jira https://jira.it.epicgames.com/browse/UE-167934
#preflight 63d12f69be435f17b4d5eb51

[CL 23846959 by Rune Stubbe in ue5-main branch]
2023-01-25 09:05:47 -05:00
christopher waters
7215f7d4ec Fully moving MaterialDomain to its own header.
#jira none
#preflight 639b4dc335203bc7aa695078

[CL 23531533 by christopher waters in ue5-main branch]
2022-12-15 16:01:51 -05:00
alexis matte
4897d11583 Add Absolute criterion to staticmesh FMeshReductionSettings.
#rb brian.karis , jeanluc.corenthin , richard.talbotwatkin
#rnx
#preflight 638e35291776b8c21c32026b

[CL 23399365 by alexis matte in ue5-main branch]
2022-12-05 16:24:30 -05:00
Brian Karis
6bbf24f314 Static displacement
Displacement map array added to UStaticMesh Nanite settings.
UI is still a bit WIP

#rb graham.wihlidal
#preflight 638a9e83cb3b754183a01555

[CL 23381627 by Brian Karis in ue5-main branch]
2022-12-02 20:22:17 -05:00
alexis matte
bcd48fa510 The fbx import option "Build Nanite" should be hidden from the UI when doing a reimport or when showing import setting in the staticmesh editor detail panel. After the initial import the user should see only the staticmesh "Nanite settings -> Enable".
#rb jeanmichel.dignard
#rnx
#preflight 6362d4509160784fc32c589c

[CL 22959178 by alexis matte in ue5-main branch]
2022-11-03 14:24:00 -04:00
jason stasik
222aef911e Add RowTags for StaticMeshBuildSettings customization
#rb none

[CL 22876442 by jason stasik in ue5-main branch]
2022-10-31 21:23:20 -04:00
david hill
58dd5cd3d4 StaticMeshEditor: fix implicit cast warnings
#preflight 633479a39768d784d9cfa72d
#rb jimmy.andrews

[CL 22262806 by david hill in ue5-main branch]
2022-09-29 23:43:57 -04:00
graham wihlidal
561e36e5c7 Nanite: Added "Preserve Area" checkbox to correct leaves disappearing on trees.
This aims to preserve the surface area during simplification. If area is lost, open boundary edges of the mesh are dilated to compensate. This is useful for foliage that tends to thin out in the distance if not enabled.

Also include misc fixes:
Collapses that completely remove disjoint triangles have an error of the area of what was removed.
Would not alias 0 and -0 verts due to binary comparison.

#rb graham.wihlidal
#preflight 63349e32141f314ed601978d

#ushell-cherrypick of 22229630 by Brian.Karis
#preflight 6334c401f418a1071a35b4a4

[CL 22260505 by graham wihlidal in ue5-main branch]
2022-09-29 20:24:18 -04:00
alexis matte
fb24253449 Interchange: Fix the custom LOD import issues
- Static mesh editor LOD number not updated when importing custom LOD asynchronously
- Static mesh reimport LOD with new file need to dirty the ddc key
- Gltf translator must set a valid local transform on the root scene node

#jira none
#rnx
#rb jeanmichel.dignard
#preflight 632a800afc7f1efbdf781075

[CL 22113972 by alexis matte in ue5-main branch]
2022-09-21 11:36:20 -04:00
christopher waters
43aa8630c4 Shader Model 6 warning dialogs
- If a static mesh is detected to use Nanite or a project is configured to use Virtual Shadow Maps and SM6 is not in the project settings, show a warning that SM6 needs to be enabled.
- Both cases only warn if the project was already configured to use a D3D platform.
- Added a UI option for enabling Nanite in project settings.

#jira UE-162011
#rb mihnea.balta
#preflight 6324cabf5f55ba280e1fb164

[CL 22064124 by christopher waters in ue5-main branch]
2022-09-16 20:30:43 -04:00
rune stubbe
76a529066f Nanite Hi-Res mesh is now built with the LOD0 build settings instead of the default ones
Gray out Fallback Triangle Percent and Fallback Relative Error when a model is specified in Source Import Filename

#preflight 631f5ed412092e9faa846d86
#rb graham.wihlidal
[FYI] Ryan.Schmidt

[CL 21989542 by rune stubbe in ue5-main branch]
2022-09-13 15:01:31 -04:00
bryan sefcik
b93a6cf7ed Pass 1 on editor include fixes:
Removed redundant private include paths from build.cs files.
Fixed include paths to be relative to the private or public folders.
Hid or removed includes that reached into other private module folders.
Updated PublicInclude paths when necessary.

#jira
#preflight 631e283bec5b0c765fc0ffdb

[CL 21960084 by bryan sefcik in ue5-main branch]
2022-09-11 18:33:06 -04:00