Commit Graph

218 Commits

Author SHA1 Message Date
tiago costa
a879eeb8d0 Initial implementation of FStaticMeshRayTracingProxy.
- members of FStaticMeshRayTracingProxy can point to either ray tracing specific mesh data or reuse the rendering LODs (in this initial CL only rendering LODs are supported).

#rb aleksander.netzel
#jira UE-216293

[CL 34054854 by tiago costa in ue5-main branch]
2024-06-01 09:48:03 -04:00
tiago costa
7c964bec02 Store pointer to FRayTracingGeometry in FStaticMeshLODResources instead of object.
- only create FRayTracingGeometry objects if ray tracing is enabled on static mesh, project and platform.

#rb aleksander.netzel, Kenzo.Terelst

[CL 33969193 by tiago costa in ue5-main branch]
2024-05-29 07:22:38 -04:00
tiago costa
d9f1c76fd5 Provide TargetPlatform to FStaticMeshBuilder.
- used to decide whether to build nanite data and soon ray tracing proxies.

[CL 33888724 by tiago costa in ue5-main branch]
2024-05-24 04:17:14 -04:00
alexis matte
f605234b9c StaticMesh: Make sure static mesh validation verify the LOD 0 contain a valid geometry. Test also the hi-res mesh if exist also contain a valid geometry.
#rb jeanluc.corenthin
#rnx

[CL 33407148 by alexis matte in ue5-main branch]
2024-05-02 15:44:20 -04:00
bob tellez
655216348a #UE Fix NaN bounds on meshes that have no verts that contribute to bounds
[FYI] Graham.Wihlidal

[CL 32754350 by bob tellez in ue5-main branch]
2024-04-05 03:12:31 -04:00
graham wihlidal
aa0e88a3cc [Nanite-Skinning] Fix up bone indices when there are bone maps that perform bone index remapping
#rb halfdan.ingvarsson, kiaran.ritchie
#jira UE-210664

[CL 32610973 by graham wihlidal in ue5-main branch]
2024-03-29 05:25:22 -04:00
graham wihlidal
48d58b1fd4 [Nanite-Skinning] Initial implementation of Nanite mesh builder and simplifier support for USkeletalMesh
#jira UE-210664
#rb Brian.Karis
#fyi rune.stubbe, halfdan.ingvarsson, jamie.hayes

[CL 32537348 by graham wihlidal in ue5-main branch]
2024-03-27 02:36:48 -04:00
graham wihlidal
327d29d1cd [Backout] - CL32536193
#fyi graham.wihlidal
Original CL Desc
-----------------------------------------------------------------
[Nanite-Skinning] Initial implementation of Nanite mesh builder and simplifier support for USkeletalMesh

#jira UE-210664
#rb Brian.Karis
#fyi rune.stubbe, halfdan.ingvarsson, jamie.hayes

[CL 32536669 by graham wihlidal in ue5-main branch]
2024-03-27 00:04:44 -04:00
graham wihlidal
b5e64fd7ec [Nanite-Skinning] Initial implementation of Nanite mesh builder and simplifier support for USkeletalMesh
#jira UE-210664
#rb Brian.Karis
#fyi rune.stubbe, halfdan.ingvarsson, jamie.hayes

[CL 32536193 by graham wihlidal in ue5-main branch]
2024-03-26 22:53:16 -04:00
graham wihlidal
222d5992e1 Minor code cleanup
#jira none

[CL 32495908 by graham wihlidal in ue5-main branch]
2024-03-26 00:02:49 -04:00
jeanluc corenthin
e8fff13968 Modified logic to allow a static mesh to have an empty mesh description
#rb Alexis.Matte
#rnx

[CL 32448449 by jeanluc corenthin in ue5-main branch]
2024-03-22 16:24:07 -04:00
halfdan ingvarsson
168fcbee1a Skeletal Mesh: Change storage of morph target normals to be on vertex instances rather than vertices, to match how the base normals are stored. Add a backward compatibility path for skeletal meshes imported from Alembic files that have manually constructed UMorphTargets to support non-standard normals on the morph targets.
#jira UE-204464
#rb benoit.gadreau
#rnx

[CL 31566631 by halfdan ingvarsson in ue5-main branch]
2024-02-16 11:06:04 -05:00
alexis matte
7ff253d7ab 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 31335966 by alexis matte in ue5-main branch]
2024-02-09 07:59:04 -05:00
halfdan ingvarsson
b469488f3d Skeletal Mesh: Allow importing alt influence meshes with mismatched bones.
#rb kiaran.ritchie
#jira UE-204814
#rnx

[CL 30869573 by halfdan ingvarsson in ue5-main branch]
2024-01-24 19:44:15 -05:00
halfdan ingvarsson
b692d6e175 Skeletal Mesh: Change the import storage to use FMeshDescription instead of FSkeletalMeshImportData. This includes deprecating the USkeletalMesh::LoadLODImportedData and friends, in lieu of an API more similar to the one on UStaticMesh (GetMeshDescription/CommitMeshDescription/etc).
#jira UE-166343
#rb Alexis.Matte, benoit.gadreau, john.vanderburg

[CL 30711382 by halfdan ingvarsson in ue5-main branch]
2024-01-19 00:37:06 -05:00
jimmy andrews
230b4408b7 fix incorrect scaling of tangents w/ non-uniform BuildScale in StaticMeshBuilder, but support still using incorrect scaling as a legacy option on static mesh (enabled on existing meshes that have non-uniform build scales, and disabled on all new meshes or meshes with uniform build scale). Add the legacy option flag to the static mesh DDC key suffix so that the mesh is rebuilt when the flag changes.
#rb Alexis.Matte, David.Hill, Richard.TalbotWatkin

[CL 29964987 by jimmy andrews in ue5-main branch]
2023-11-28 13:43:35 -05:00
alexis matte
9bf35f960c Make sure importers do not allow nan or infinite float mesh data.
Also make sure the static mesh build fix those issue before building the mesh description.

#rb jeanluc.corenthin
#rnx

[CL 29314418 by alexis matte in ue5-main branch]
2023-11-01 09:26:52 -04:00
tiago costa
1334d92ec1 Removed some code related to Nanite Coarse Mesh Streaming
- don't modify DDC key based on cvar since it doesn't impact LOD generation since CL 18820056.
- removed bGenerateCoarseMeshStreamingLODs parameter from a few functions since it isn't used anymore.

#rb brian.karis
#prelight 652516f53a59af0b367fbd0b

[CL 28614902 by tiago costa in ue5-main branch]
2023-10-10 07:29:08 -04:00
alexis matte
2a152ff6e2 Downgrade a log verbosity from Error to Display to avoid breaking the CIS.
#rb trivial
#rnx

[CL 27956157 by alexis matte in ue5-main branch]
2023-09-18 09:50:56 -04:00
alexis matte
8872049eea Make sure Hires mesh number of sections is equal or lower than LOD 0 number of sections. Issue an Error log if the hires is invalid and default nanite on the LOD 0.
#jira UE-194416
#rb jeanluc.corenthin
#rnx

[CL 27893484 by alexis matte in ue5-main branch]
2023-09-14 16:24:58 -04:00
alexis matte
eb0a09d380 [Backout] - CL27835483
[FYI] Alexis.Matte
Original CL Desc
-----------------------------------------------------------------
Make sure Hires mesh number of sections match LOD 0 number of sections.
#jira UE-194416
#rb jeanluc.corenthin
#rnx

[CL 27853575 by alexis matte in ue5-main branch]
2023-09-13 17:45:11 -04:00
alexis matte
a76f93ad5b Make sure Hires mesh number of sections match LOD 0 number of sections.
#jira UE-194416
#rb jeanluc.corenthin
#rnx

[CL 27835504 by alexis matte in ue5-main branch]
2023-09-13 12:21:38 -04:00
tiago costa
abca6b5a6c Resubmit CL26160360, 26146080, 26137852, 26126752
Only leaving CL 26157603 reverted since accessing GenerateSource in FDistanceFieldVolumeData::CacheDerivedData is not safe due to async mesh compilation.

#prelight 64948190a26e02126bc0a64f
#rb Krzysztof.Narkowicz

[CL 26206875 by tiago costa in ue5-main branch]
2023-06-23 04:28:57 -04:00
bob tellez
4c7e2e1b32 [Backout] - CL26160360, 26157603, 26146080, 26137852, 26126752
[FYI] tiago.costa
Original CL Desc
-----------------------------------------------------------------
Use FSignedDistanceFieldBuildSectionData when generating distance fields for Nanite meshes.

Context:
- Nanite meshes distance fields are generated using the original mesh data instead of the coarse representation generated by Nanite, however that code path was not checking section data such as blend mode, two sided, etc.

Fix:
- Modified FStaticMeshBuilder::BuildMeshVertexPositions(...) to also output a FStaticMeshSectionArray.
- Updated MeshRepresentation::SetupEmbreeScene(...) to check section flags when using SourceMeshData.IsValid() code path.

#prelight
#rb Krzysztof.Narkowicz

[CL 26174853 by bob tellez in ue5-main branch]
2023-06-22 00:25:01 -04:00
tiago costa
2b73cf0aa3 Use FSignedDistanceFieldBuildSectionData when generating distance fields for Nanite meshes.
Context:
- Nanite meshes distance fields are generated using the original mesh data instead of the coarse representation generated by Nanite, however that code path was not checking section data such as blend mode, two sided, etc.

Fix:
- Modified FStaticMeshBuilder::BuildMeshVertexPositions(...) to also output a FStaticMeshSectionArray.
- Updated MeshRepresentation::SetupEmbreeScene(...) to check section flags when using SourceMeshData.IsValid() code path.

#prelight
#rb Krzysztof.Narkowicz

[CL 26160411 by tiago costa in ue5-main branch]
2023-06-21 16:17:07 -04:00