Commit Graph

176 Commits

Author SHA1 Message Date
tiago costa
3d3741df2b Prevent crash when trying to build Nanite Data for mesh with unsupported number of sections.
#preflight 63fd4163dd78dd50f6bee3d0
#rb graham.wihlidal, michael.balzer

[CL 24439073 by tiago costa in ue5-main branch]
2023-02-28 00:39:57 -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
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
graham wihlidal
521b800102 Implemented an "Allow Masked Materials" world setting that can force any any Nanite meshes using masked materials to fallback to non-Nanite rendering (default is to always use Nanite). SMC now also has a "Force Nanite for Masked" checkbox (false by default) that can be use to always use Nanite for masked materials, regardless of the world setting disallowing Nanite. Additionally this change also adds a cvar that can force all meshes to build Nanite data, even if the per-asset enabled checkbox is false.
#rb rune.stubbe
#fyi juan.canada, brian.karis
#preflight skip

[CL 24224547 by graham wihlidal in ue5-main branch]
2023-02-14 20:00:38 -05:00
dan thompson
ee896287b8 Warn when building a static mesh that has NaNs in it.
#rb charles.bloom
#preflight 63e6a891c23d1f29a3fbb411

[CL 24137697 by dan thompson in ue5-main branch]
2023-02-11 12:51:08 -05:00
richard talbotwatkin
da0d791bf7 Fixed issue where non-compact mesh descriptions can build with unused extra data.
#rb
#preflight

[CL 23580211 by richard talbotwatkin in ue5-main branch]
2023-01-04 15:47:28 -05:00
alexis matte
c4765e5da4 Do not cache the MeshDescription triangles/vertices count when we load the mesh description. Setting the cache when building the renderdata is good enough and it can use the already computed "FOverlappingCorners".
#jira UE-172554
#rb danny.couture
#rnx
#preflight 639772422540a78d27c8813f

[CL 23499862 by alexis matte in ue5-main branch]
2022-12-13 18:17:40 -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
henry falconer
4510b454c4 Allow users to limit the number of bone influences per vertex below what the project supports.
BoneInfluencesLimit can be set on each LOD of an asset. DefaultBoneInfluencesLimit is a per-platform global default that can be set from the project settings.

This allows you to, for example, enable Unlimited Bone Influences on a project while ensuring that meshes don't use more than 8 influences by default, even if they've been imported with more.

#rb alexis.matte,josie.yang
#preflight 6380959cf514e1ded907774d

[CL 23265588 by henry falconer in ue5-main branch]
2022-11-25 08:32:25 -05:00
David Lesage
34da27404d #jira UE-168689 Warning: The generation of LOD could have generated spikes on multiple meshes
The threshold in LOD generation to check the quality of the LOD was to small.
It has been update to sqrt(3) i.e. the reduced mesh must stay in the bounding sphere.
#rb none
#preflight 637632ef232e3d12cb949a38

[CL 23174735 by David Lesage in ue5-main branch]
2022-11-17 08:28:33 -05:00
David Lesage
7477e92eb9 #jira UE-168689 Warning: The generation of LOD could have generated spikes on multiple meshes
The threshold in LOD generation to check the quality of the LOD was to small.
It has been update.
#rb none
#preflight 637226fdb6636838285df8ae

[CL 23116233 by David Lesage in ue5-main branch]
2022-11-14 06:39:57 -05:00
jamie hayes
efc7833b06 Fix an issue where Nanite would be built for LOD0 when it was not supposed to be for non-Nanite platforms.
#rb graham.wihlidal
#rnx
#preflight 636cfe5d843e6ac79476f43f

[CL 23085790 by jamie hayes in ue5-main branch]
2022-11-10 14:37:59 -05:00
krzysztof narkowicz
78088a94e0 Distance Fields - Generate mesh distance fields from highest quality available data in order to match Nanite data.
#preflight 63611edd731604696a0f9134
#jira

[CL 22890143 by krzysztof narkowicz in ue5-main branch]
2022-11-01 16:01:53 -04:00
David Lesage
4fe8d2122b #jira UE-90182
The spikes seems to not happen any more with the new simplification algorithm.
Whatever, the bounding box of the simplified mesh is compared to the original mesh. If the new bounding box is larger, a message is output.
#preflight 635a8628316cf8bef6442135

[CL 22809103 by David Lesage in ue5-main branch]
2022-10-27 09:53:48 -04:00
henrik karlsson
b5b86c796c This change is a strategical submit for a coming change that removes lots of includes in headers that are included by many files. This change contains adding of includes in files that previously got those includes transitively from other inclkudes
#preflight 6355d4940313c24974b2107b
#rb none

[CL 22783162 by henrik karlsson in ue5-main branch]
2022-10-26 12:57:32 -04:00
jian ru
b539ff9aa7 Feed the same set of weights to FMeshSimplifier when generating LODs for nanite fallback meshes to ensure that auto-computed LOD transition screen sizes are consistent
[FYI] brian.karis, chris.morrison, bryce.lumpkin

[CL 22459671 by jian ru in ue5-main branch]
2022-10-11 12:15:30 -04:00
Brian Karis
1b845f1def Remove doubles from mesh processing
#rb graham.wihlidal
#preflight 633b662e842f0d4c55e4b3d9

[CL 22319966 by Brian Karis in ue5-main branch]
2022-10-03 19:39:31 -04:00
rune stubbe
7b990d37d4 Nanite tangent fixes
-Nanite-specific settings for tangent and degenerates are no longer also applied to the non-nanite mesh LODs on the same mesh.
-100% fallback meshes now have identical tangents to input mesh. Don't skip the tangent generation in StaticMeshBuilder for these meshes and don't recalculate tangents in Nanite builder.

#preflight 632b04c0b40000c8f0c29adb

#rb brian.karis
[FYI] jamie.hayes, graham.wihlidal
#lockdown marc.audy

[CL 22201439 by rune stubbe in ue5-main branch]
2022-09-27 02:14:48 -04:00
jamie hayes
54f2eebeff Fix a bug where high resolution Nanite meshes would not be simplified on platforms that do not support Nanite
#rb graham.wihlidal, rune.stubbe
#jira UE-162652
#preflight skip

[CL 22105158 by jamie hayes in ue5-main branch]
2022-09-20 19:25:18 -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
rune stubbe
bd86bf40d8 Fix for potential DDC corruption issue where meshes with NaniteEnabled set generate incorrect normals/tangets in projects that have Nanite disabled.
Tangent generation now also respects the Nanite project setting, not just the per-mesh setting.
#lockdown marc.audy

[CL 21862271 by rune stubbe in ue5-main branch]
2022-09-07 17:01:12 -04:00
Alexis Matte
b37d30b444 Interchange:
Add some CPU trace for interchange task, fbx translator, skeletalmesh factory.
Fix issues with UVs count crashing when there is no UVs layer.
Add generic pipeline asset to always cook in the plugin game.ini config file.
Make sure we use only half of the worker thread to avoid deadlock because there is no worker thread available.

#jira none
#rb jeanmichel.dignard
#rnx
#preflight 630f748ce11248377579b132

[CL 21721013 by Alexis Matte in ue5-main branch]
2022-08-31 10:56:08 -04:00
bryan sefcik
de1956f47b Ran IWYU on Public headers under Engine/Source/Developer/...
Headers are updated to contain any missing #includes needed to compile and #includes are sorted.  Nothing is removed.

#ushell-cherrypick of 21064294 by bryan.sefcik
#jira
#preflight 62d5c2111062f2e63015e598

#ROBOMERGE-OWNER: bryan.sefcik
#ROBOMERGE-AUTHOR: bryan.sefcik
#ROBOMERGE-SOURCE: CL 21155249 via CL 21158121 via CL 21161259
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21182053 by bryan sefcik in ue5-main branch]
2022-07-20 12:03:45 -04:00
Josie Yang
ac15a1d5e3 Cloth asset - Add synchronous DDC render data support and serialization of sk mesh model
#jira UE-157842
#rb kriss.gossart
#preflight 62bb296c1813601bbecfb59b

[CL 20934821 by Josie Yang in ue5-main branch]
2022-07-04 10:32:08 -04:00
graham wihlidal
7e92ab173a Remove Nanite static mesh memory from incompatible platforms
#rb devin.doucette
[FYI] brian.karis, rune.stubbe, zousar.shaker
#preflight 62bbdeabd8366789fdc55c95

#ROBOMERGE-AUTHOR: graham.wihlidal
#ROBOMERGE-SOURCE: CL 20878146 via CL 20878158 via CL 20878172
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v971-20777995)

[CL 20880187 by graham wihlidal in ue5-main branch]
2022-06-29 15:11:23 -04:00