Commit Graph

20 Commits

Author SHA1 Message Date
matija kecman
b47e74f1a8 Render Capture Baking: Move visibility raycast from evaluators to detail sampler
Benchmark configuration:
- Test scene with 4 meshes: a mossy stone nanite mesh, a beach ball, a ball with an emissive blue cross and a hut mesh
- Target mesh: 11.8k triangles mesh, created by voxel wrapping the meshes in the test scene elements
- 4096x4096 output texture with 16x multisampling baking BaseColor, Emissive, PackedMRS and Normal maps
- 4096x4096 photo capture resolution

Unreal Insights reports the following times for the Bake call:
- Before this change: 2 mins 45 seconds
- After this change: 55.9 seconds

Aside: (Unaffected by this change) In both cases the photo capture, which is done on the game thread, took about 1 min

#jira none
#rb
#rnx
#preflight 627e64e01748fbc85bb24a42

[CL 20221383 by matija kecman in ue5-main branch]
2022-05-16 05:13:25 -04:00
matija kecman
998174e108 Render Capture Baking: Reimplement infill in new baking framework using callbacks
#rb lonnie.li
#rnx
#preflight 627a5feffc07e0a9b4fda490
#jira none

[CL 20121863 by matija kecman in ue5-main branch]
2022-05-10 09:01:17 -04:00
ryan schmidt
a20c04fa0f Fix indexing bug in FStaticMeshLODResourcesToDynamicMesh::Convert. Remove unnecessary template type on TImageBuilder::SampleNearestUV
#preflight 626c00ac7272eba608712119

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 19979955 via CL 19980094 via CL 19980365
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 19985827 by ryan schmidt in ue5-main branch]
2022-04-29 17:04:42 -04:00
ryan schmidt
1fa75e7ad9 GeometryScript: add SampleTexture2DAtUVPositions function that returns texture colors (nearest or bilinear sampled) at UV positions.
GeometryProcessing: add TImageBuilder::NearestSampleUV() function to simplify nearest sampling
#preflight 62682fc8430b9997ebe6a47d

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 19928418 via CL 19928912 via CL 19929469
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 19931478 by ryan schmidt in ue5-main branch]
2022-04-26 19:04:45 -04:00
matija kecman
929525effb Render Capture Baking: Support correspondence sample validity checking, use BSpline filtering and enable multisampling
#rb lonnie.li
#rnx
#jira none
#preflight 6262d4dbd558dfdec3934905

[CL 19899614 by matija kecman in ue5-main branch]
2022-04-25 05:41:52 -04:00
lonnie li
8e197859df ModelingTools: Fix texture filtering into neighboring charts for tightly packed UV shells.
#rb jimmy.andrews michael.balzer
#rnx
#jira none
#preflight 61bbb2868a62de8385c38473

#ROBOMERGE-AUTHOR: lonnie.li
#ROBOMERGE-SOURCE: CL 18480102 in //UE5/Release-5.0/... via CL 18481553
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18481825 by lonnie li in ue5-release-engine-test branch]
2021-12-16 19:57:29 -05:00
tyson brochu
819b7b59cf If a ToolTarget's MeshComponent has no MeshDescription, return an empty but valid one. Harden various tools to not crash on empty meshes.
#jira UE-135710
#rnx
#rb jimmy.andrews
#preflight 61b24e173d544d1a435f6792

#ROBOMERGE-AUTHOR: tyson.brochu
#ROBOMERGE-SOURCE: CL 18422162 in //UE5/Release-5.0/... via CL 18423015
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)

[CL 18423313 by tyson brochu in ue5-release-engine-test branch]
2021-12-09 15:02:36 -05:00
Marc Audy
0c3be2b6ad Merge Release-Engine-Staging to Test @ CL# 18240298
[CL 18241953 by Marc Audy in ue5-release-engine-test branch]
2021-11-18 14:37:34 -05:00
lonnie li
db670aaffc ModelingTools: Add additional trace events to the Bake tools.
#rb trivial
#rnx
#jira none
#preflight 6189db370779df5c6a59f3e9

#ROBOMERGE-AUTHOR: lonnie.li
#ROBOMERGE-SOURCE: CL 18099121 in //UE5/Release-5.0/... via CL 18099168
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v889-18060218)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 18099175 by lonnie li in ue5-release-engine-test branch]
2021-11-08 21:54:53 -05:00
ryan schmidt
b88e05ba4c AutoLOD:
- add support for a Settings Preset, as an explicit Asset type. UStaticMeshLODGenerationSettings contains a copy of the GenerateProcess Settings, UStaticMeshLODGenerationSettingsFactory allows this UObject to be used as an Asset in the Editor.  UGenerateStaticMeshLODAssetTool now has a Preset slot, and action buttons to Read/Write to the currently-selected Settings Asset. New Settings Asset can be created via the Asset Picker popup in the Tool, currently creating via the New Asset menu is disabled via UStaticMeshLODGenerationSettingsFactory::GetMenuCategories()
- UGenerateStaticMeshLODProcess now automatically ignores input textures that have a constant value
- UGenerateStaticMeshLODProcess now skips writing output NormalMap and MultiTexture if they are not referenced by any output Materials
- UGenerateStaticMeshLODProcess now supports configuring whether a Texture or Material will be considered for Baking. If disabled, then the source Texture/Material is used (currently the Textures are still baked, they are just ignored while configuring/writing the outputs).
- UGenerateStaticMeshLODAssetTool now exposes lists of source Texture and Materials with option to skip baking (used to configure the above options)
- wrote header comments for UGenerateStaticMeshLODProcess
- overall cleanup in  UGenerateStaticMeshLODAssetTool, ie category names, organization, etc

- add TImageBuilder::IsConstantValue(), checks if all pixels of image are the same value

#rb tyson.brochu
#rnx
#jira none
#preflight 6137ae4fd9c85a00013838c1

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 17449788 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17449840 by ryan schmidt in ue5-release-engine-test branch]
2021-09-07 16:51:03 -04:00
ryan schmidt
7d446ee14c GeometryProcessing: clean up TVector4 and usage in preparation for LWC conversion
#rb none
#rnx
#jira none
#preflight 6126abe6250579000172095f

#ROBOMERGE-SOURCE: CL 17316245 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v861-17282326)

[CL 17316301 by ryan schmidt in ue5-release-engine-test branch]
2021-08-26 08:34:06 -04:00
lonnie li
7a26fc113e GeometryProcessingUnitTests: Added unit tests for FMeshMapBaker.
#rb jimmy.andrews michael.balzer
#rnx
#jira UETOOL-4057
#preflight 6112a4c99c7bb1000195412a

#ROBOMERGE-SOURCE: CL 17120103 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17120111 by lonnie li in ue5-release-engine-test branch]
2021-08-10 13:55:05 -04:00
lonnie li
e9839fc587 ModelingTools: Add texture filtering support to BakeTexture.
#rb michael.balzer
#rnx
#jira UETOOL-3818
#preflight 610da9df6c6eb00001b677c3

#ROBOMERGE-SOURCE: CL 17102582 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v853-17066230)

[CL 17102588 by lonnie li in ue5-release-engine-test branch]
2021-08-09 10:50:14 -04:00
lonnie li
d37f2a8e8e GeometryCore: Fix gutter list entries for samples outside search space in ImageOccupancyMap.
#rb trivial
#rnx

#ROBOMERGE-SOURCE: CL 17085504 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v853-17066230)

[CL 17085512 by lonnie li in ue5-release-engine-test branch]
2021-08-06 13:48:41 -04:00
halfdan ingvarsson
1f4a9c6eee Fixed a build break in debug builds.
[FYI] lonnie.li
#rnx

#ROBOMERGE-SOURCE: CL 16933967 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 16933968 by halfdan ingvarsson in ue5-release-engine-test branch]
2021-07-22 22:40:43 -04:00
lonnie li
e2dc9f0f7b ModelingTools: Refactored ImageTile out of ImageDimensions
- Inlined MeshMapBaker::BakePixel().
- Fixed gutter texels when multisampling.

#rb michael.balzer
#rnx
#jira UETOOL-3818
#preflight 60f9f06de885f200011f33b3

#ROBOMERGE-SOURCE: CL 16932816 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 16932820 by lonnie li in ue5-release-engine-test branch]
2021-07-22 19:48:08 -04:00
tyson brochu
5938c6e30a Optimize occupancy map construction for large textures by removing lock
#rnx
#rb ryan.schmidt lonnie.li
#pf 60ca206d4ce02c0001885e5f

#ROBOMERGE-SOURCE: CL 16690851 via CL 16690858
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16690866 by tyson brochu in ue5-release-engine-test branch]
2021-06-16 13:00:56 -04:00
ryan schmidt
2fab582c78 GeometryProcessing:
- extend FImageAdapter to support reading
ModelingComponents::
- Add AssetUtils::ForceVirtualTexturePrefetch(), ::SaveDebugImage() variants to Texture2DUtil
- Add support for debug image writing to WorldRenderCapture and SceneCapturePhotoSet
- FWorldRenderCapture now computes more accurate bounds (visible Components instead of Actors), and does an explicit VirtualTexture prefetch before doing render capture
- FStaticMeshAssetOptions now exposes Nanite settings to allow UStaticMeshes to be created with Nanite already enabled (currently NaniteSettings.PositionPrecision defaults to max)
ApproximateActors:
- IGeometryProcessing_ApproximateActors::FOptions now has settings for enabling Nanite on generated meshes
- ApproximateActorsImpl applies these settings, also enables VT on generated textures if necessary
- FMeshApproximationSettings/FMeshApproximationTool updated w/ new Nanite settings
#rb none
#rnx
#jira none
[FYI] sebastien.lussier
#preflight 60b08323f51cd90001775b98

#ROBOMERGE-OWNER: ryan.schmidt
#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 16499613 in //UE5/Private-Frosty/...
#ROBOMERGE-BOT: STARSHIP (Private-Frosty -> Main) (v823-16466674)
#ROBOMERGE-CONFLICT from-shelf

[CL 16499647 by ryan schmidt in ue5-main branch]
2021-05-28 02:46:59 -04:00
lonnie li
04eedbdd12 ModelingTools: Refactor new bake path to bake evaluators.
Add support for variable float size and bake results per evaluator.

#rb jimmy.andrews michael.balzer
#rnx
#jira UETOOL-3397
#preflight 60aea5a35f6905000159e87b

[CL 16475935 by lonnie li in ue5-main branch]
2021-05-26 17:14:57 -04:00
Ryan Schmidt
623e4f96fe GeometryCore: create new GeometryCore Module. Move GeometricObjects code from GeometryProcessing plugin to this new module, as well as core FDynamicMesh3 classes (attributes, aabbtree/octree, change tracking). Update module Build.cs files that reference GeometricObjects.
#rb none
#rnx
#jira none
#preflight 60a713700569f300014a064a

[CL 16415082 by Ryan Schmidt in ue5-main branch]
2021-05-21 01:04:38 -04:00