Commit Graph

314 Commits

Author SHA1 Message Date
robert millar
387bb0bd06 Add ability to presize name table in editor for large projects.
Example config in Editor.ini:

[Names]
PreallocateNames=10485760
PreallocateNameMemoryMB=900

#rb ben.zeigler

[CL 27883674 by robert millar in ue5-main branch]
2023-09-14 12:46:21 -04:00
rune stubbe
45018186fd Fix for Nanite builder not handling empty submeshes correctly. It now outputs a single node with no children, instead of duplicating a cluster.
FResources::NumClusters now reflects the number of clusters after trim, not before.
#rb brian.karis
[FYI] graham.wihlidal, jamie.hayes

[CL 27830347 by rune stubbe in ue5-main branch]
2023-09-13 10:24:12 -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
stu mckenna
c051ba798e - Fix NaN's poisoning the VVM constant table
- Comparing A==B will return true for NaN depending on the FP mode, so we now compare if both values are finite before comparing for equality.
- This does not fix the source of the error, but will stop all subsequent float values being set to NaN

#rb rob.krajcarski
#jira UE-194597

[CL 27694043 by stu mckenna in ue5-main branch]
2023-09-07 18:51:56 -04:00
simon tovey
5f1dc7de9f niagara shader version bump.
#rb none

[CL 27671586 by simon tovey in ue5-main branch]
2023-09-07 09:51:18 -04:00
simon tovey
ef22e1a883 Support Spawning into any emitter from one shared DI.
- New special case path through the translator to support Engine.Emitter.ID. Into which we hard code the emitter's handle index to pass to the DI's later.
- Also included Engine.ExecIndex here.
- Adding EmitterID to SpawnConditional and including upgrade path.
- Removed unused Spawn function from read DI + supporting code.
- Slight tidy and refactor of Read DI.
- Expose EmitterIndex to translator to be made into the EmiterID

[CL 27669572 by simon tovey in ue5-main branch]
2023-09-07 08:05:14 -04:00
rob krajcarski
12c568f3ca Fix for some attribute bindings not getting renamed properly with emitter merging
#rb stu.mckenna

[CL 27620360 by rob krajcarski in ue5-main branch]
2023-09-05 20:06:25 -04:00
sebastien hillaire
841369fbba Potential fix for a Niagara issue after 27478969, then 27492615.
#rb Rob.Krajcarski

[CL 27524442 by sebastien hillaire in ue5-main branch]
2023-08-31 11:32:15 -04:00
louisphilippe seguin
36c722f3c4 Fix wrong printf parameters in checkf & ensuremsgf found in engine code
#rb Fabian.Giesen, Kirill.Zorin
#rnx

[CL 27519547 by louisphilippe seguin in ue5-main branch]
2023-08-31 08:56:30 -04:00
rune stubbe
bccf39e9bc Implemented support for Nanite streaming pool larger than 2GB when it is supported by the hardware.
Fixed NANITE_SANITY_CHECK_STREAMING_REQUESTS path so it compiles again and reduced size of Magic to make room for wider page indices.
Changed independent coding of PageIndex and ClusterIndex in FVisibleCluster to a smaller combined encoding.
Added more descriptive error messages when running out of pool space.
#rb graham.wihlidal
[FYI] brian.karis, jamie.hayes

[CL 27504613 by rune stubbe in ue5-main branch]
2023-08-30 18:17:10 -04:00
steve robb
e48f030aa5 Moved FString usage out of various headers to allow them to be compiled with only a forward-declaration.
#rb none

[CL 27373301 by steve robb in ue5-main branch]
2023-08-25 06:54:06 -04:00
jason hoerner
c702497629 Shader Compiler Job Cache: Fix for bugs caused by sharing incompatible results generated by single and pipeline jobs with one shader that happen to have the same hash, due to the pipeline job hash just being the sum of the individual shader hashes. Solution is to set the bCompilingForShaderPipeline on the first pipeline stage job on construction (rather than later during compile), so it produces a different input hash. Also need to include bCompilingForShaderPipeline as part of the input hash when generating the hash from preprocessed results.
Fixing this bug allows enabling the parallel SubmitJobs optimization once again.  Parallel SubmitJobs, combined with the bug of incompatible sharing of results, meant that single shader jobs would sometimes use pipeline results, leading to runtime crashes.  Single threaded job submit hid the bug, because single shader jobs were always issued first, and took precedence over pipeline jobs in the cache.  Other minor changes:  validate input hash in the output data returned by shader compiler tasks or workers, and use a reference pointer in code that attempts to change job priority, to ensure it can't be deleted by another thread during that time.

#rnx
#rb jason.nadro dan.elksnitis

[CL 27133038 by jason hoerner in ue5-main branch]
2023-08-16 00:43:44 -04:00
marc audy
a75b48030b More compressible Nanite disk format (typically ~10% smaller after compression)
-Delta code vertex attributes and cluster refs
-ZigZag code deltas
-Store them as whole bytes
-Split high/mid/low bytes into separate streams

Transcode
-Transcode is now split into an independent pass and a number of dependent passes
-Launch a group per cluster instead of launching a group per potential cluster in a page and have them early out

Got rid of unused vertex color mode: NANITE_VERTEX_COLOR_MODE_WHITE
#rb brian.karis
[FYI] graham.wihlidal, jamie.hayes
#jira

[CL 27132972 by marc audy in ue5-main branch]
2023-08-16 00:39:49 -04:00
brian karis
e634ee40dc Fix mesh reduction bugs due to replacing TSimpVert with FLerpVert.
#rb rune.stubbe

[CL 26720922 by brian karis in ue5-main branch]
2023-07-31 17:02:36 -04:00
rune stubbe
494a9aa930 Fixed builder crash when mesh vertex position coordinates become extremely large.
Clusters already have a max range for position. An additional exponent bit has been added to the position encoding to cover that range.
Added sanity check to make sure the largest possible cluster bound can always be encoded with the current position encoding parameters.
#rb jamie.hayes
[FYI] brian.karis, graham.wihlidal

[CL 26630917 by rune stubbe in ue5-main branch]
2023-07-26 21:23:48 -04:00
rune stubbe
7070422ce9 Refactor to remove assumption about page disk size being 2x the gpu page size.
Disk pages sizes can now have arbitrary sizes, but are assumed to rarely be more than ~1.5x when reserving memory or sizing the upload staging buffer.
#rb ola.olsson
[FYI] brian.karis, graham.wihlidal, jamie.hayes

[CL 26534981 by rune stubbe in ue5-main branch]
2023-07-22 06:33:46 -04:00
johan berg
9fe22ee65f Fix tracing of FNames for numbered names when outline numbers is enabled.
When UE_FNAME_OUTLINE_NUMBER is enabled the number is part of the name entry so we can format the name before tracing it.

#rb robert.millar,johan.torp
#jira UE-189546

[CL 26340314 by johan berg in ue5-main branch]
2023-06-30 03:22:11 -04:00
rune stubbe
cf5df32446 Nanite streamer performance optimizations:
-Replaced slow doubly-linked list LRU with array based LRU
-Replaced hash tables for mapping virtual pages to physical pages with direct lookups (+2 dwords per virtual page)
-Removed custom hash table for fast request deduplication (FRequestsHashTable)
-Trimmed one dword from FPageStreamingState  (-1 dword per virtual page)
-Made a direct mapping from RuntimeResourceID to root page / FResource to avoid more expensive hashmap lookups
-Cache array of virtual page dependencies for resident pages to accelerate parent traversal
-Improved locality of assignment of groups to pages. Reduces streaming pool memory requirements by ~3-4%

Added Magic word to FFixupChunk to make it easier to identify corrupt data
#rb graham.wihlidal
[FYI] brian.karis, jamie.hayes

[CL 26080397 by rune stubbe in ue5-main branch]
2023-06-17 01:33:52 -04:00
marc audy
dbfe6b43fe Repurpose NC object version for Season streams
#lockdown Bob.Tellez, JeanFrancois.Dube
#jira
#rnx

[CL 26069623 by marc audy in ue5-main branch]
2023-06-16 16:52:40 -04:00
charles derousiers
f964f463f5 Invalid material shader map due to image layout changed in CL 25946381
#rb none
[FYI] sebastien.hillaire

[CL 26006845 by charles derousiers in ue5-main branch]
2023-06-15 05:22:37 -04:00
rune stubbe
86ab36f639 Fixed issue where non-Nanite simplification would have broken UVs or colors
#rb brian.karis
[FYI] graham.wihlidal, jamie.hayes

[CL 25910319 by rune stubbe in ue5-main branch]
2023-06-10 02:08:40 -04:00
richard talbotwatkin
9c5c838e22 Primitive refactor.
- AtomPrimitive now has geometry container objects, each one holding geometry corresponding to a given export style as bulk data
- Removed all scaling from common parts transforms, connection fields, collision and bounds. AtomPrimitive is now coordinate system agnostic. Deprecated old accessors and fixed up all code assuming baked scale.
- Flex element refactor - now FBX with bones / skinning can be imported, and the bone / skinning attributes held in the generated mesh description. The default pose is that of the reference skeleton in the FBX scene.
- Added new mesh utilities for baking a flex element to a static mesh in a given bone pose.
- Added a range of Blueprint callable functions for the purpose of processing geometry from a Model Processor.
- Refactored common parts instance importing to handle differences between different export style geometry.
#rb
#preflight 646f1f1b2c0a5da0dc7ce5a0

[CL 25635559 by richard talbotwatkin in ue5-main branch]
2023-05-25 19:42:54 -04:00
stu mckenna
fd6cae6b42 - Add VVM support for bit casting between floats and ints
#rb rob.krajcarski
#preflight 6466532e743f7c995bc67a0f

[CL 25548196 by stu mckenna in ue5-main branch]
2023-05-19 13:51:29 -04:00
johan torp
9f72a9b4e7 Silence MSVC static analysis warnings
#rb none
#rnx
#preflight none

[CL 25545981 by johan torp in ue5-main branch]
2023-05-19 12:02:46 -04:00
johan torp
2ee2d51077 Fix natvis and alignment of numbered 4B FNames
Also removed unneeded IterateNumberedNames
Only impacts UE_FNAME_OUTLINE_NUMBER

#rb robert.millar
#preflight 6464ec2a317ee2d9d14bc72f
#rnx

[CL 25540926 by johan torp in ue5-main branch]
2023-05-19 04:07:21 -04:00