Commit Graph

8 Commits

Author SHA1 Message Date
rune stubbe
30e20b54dc Moved buffer objects out of FBitStreamReaderState/FBitStreamWriterState to make it compile on compilers that don't support buffers in structs.
Fixed typo causing character to melt.

#rb lukas.hermanns
#preflight 612fa77c9db3090001c34f45


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

[CL 17390057 by rune stubbe in ue5-main branch]
2021-09-01 14:03:12 -04:00
peter sumanaseni
b661496d98 Back out changelist 17383956
#rune.stubbe #josie.yang
#preflight


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

[CL 17388422 by peter sumanaseni in ue5-main branch]
2021-09-01 12:13:22 -04:00
rune stubbe
089fba2657 Moved buffer objects out of FBitStreamReaderState/FBitStreamWriterState to make it compile on compilers that don't support buffers in structs
#rb lukas.hermanns
#preflight 612e523a79d62b0001953539


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

[CL 17384499 by rune stubbe in ue5-main branch]
2021-09-01 05:59:23 -04:00
rune stubbe
624e1ff814 Give BitStreamReader_Create/BitStreamReader_Create_Aligned overloads unique names to fix shader compilation issues on certain compilers.
#rb lukas.hermanns
[FYI] graham.wihlidal


#ROBOMERGE-SOURCE: CL 16658432
#ROBOMERGE-BOT: (v834-16658389)

[CL 16659805 by rune stubbe in ue5-main branch]
2021-06-14 12:28:21 -04:00
rune stubbe
6b332a6ab5 Progress on Nanite compression. ~19% on AncientGame.
Pages can now refererence data from the parent page.
Page transcoding is now batched based on page dependencies.
Removed Nanite's LZ container for platforms that don't have hardware LZ. Rely on iostore compression instead. ~4% disk saving. 32mb system memory saving from temp buffer.
Better integer-based UV quantization code similar to new position quantization.
Got rid of remaining old position quantization code.
Reduced float4s per cluster from 8 to 6. ~2% memory density.
Added BitStreamReader support for reading from UAV. Needed to reference parent data.
#rb graham.wihlidal
[FYI] brian.karis


#ROBOMERGE-SOURCE: CL 16621364
#ROBOMERGE-BOT: (v830-16605563)

[CL 16621388 by rune stubbe in ue5-main branch]
2021-06-10 08:09:23 -04:00
Rune Stubbe
9dbd92093b New Nanite vertex quantization code that replaces the cluster-relative coordinates with quantization to an absolute po2-sized grid centered around the mesh center.
The scheme solves issues where meshes would no longer align properly after converting them to Nanite. It also solves the precision issues in clusters with triangles of non-uniform size.
By default the precision is heuristically selected by Nanite, but the user also has the ability to override with an explicit precision to solve issues or optimize for disk size.
Clusters store the coordinate components using the minimal number of bits required to span the range of values in the cluster.
Apart from fixing issues, the default quality seems no worse than before and is typically ~5-10% smaller than before.

Added Position Precision to the top left of Mesh viewer along with the other mesh stats.
Added Position Precision dropdown to Nanite import settings.
Added debug mode "r.nanite.visualize PositionBits" that shows the vertex position bit sizes for clusters.
New quantization code now updates float positions and cluster bounds to reflect the quantized coordinates.

#rb brian.karis, graham.wihlidal
#JIRA UE-102722
#preflight 607d56774df3b60001ef477c

[CL 16049335 by Rune Stubbe in ue5-main branch]
2021-04-19 06:58:00 -04:00
rune stubbe
0dcaff90db Fixed GeometryCollections having uninitialized vertex color when the source mesh has no colors.
Fixed issue in BitStreamWriter_Writer when NumBits=32.
#jira UE-110362
#rb graham.wihlidal

#ROBOMERGE-OWNER: rune.stubbe
#ROBOMERGE-AUTHOR: rune.stubbe
#ROBOMERGE-SOURCE: CL 15675611 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v781-15675533)
#ROBOMERGE-CONFLICT from-shelf

[CL 15676219 by rune stubbe in ue5-main branch]
2021-03-11 10:07:26 -04:00
graham wihlidal
234e0bc06e Moved GetPackedPosition() and DecodePosition() from Rasterizer.usf into NaniteDataDecode.ush, and refactored a bunch of code in NaniteVertexFactory.ush to use these helper functions.
Added a new BitPacking.ush utility header and moved the bit stream class and other helpers into it

#rb rune.stubbe
#fyi brian.karis

[CL 14995570 by graham wihlidal in ue5-main branch]
2021-01-05 18:12:19 -04:00