Commit Graph

919 Commits

Author SHA1 Message Date
jeanfrancois dube
df6acf18b3 World Partition:
- FEditorLoadedActorCache was reporting unregistered loaded actors and the code that was using it was expecting registered actors.
- Replaced FEditorLoadedActorCache by FWorldPartitionHelpers::GetLoadedActorGuidsForLevel that gathers registered actors GUIDs and updated callers.
- UWorldPartition::Tick is now private to avoid code like LandscapeEditorUtils::SaveLandscapeProxies doing manual ticks to get around unwanted internal behaviors.
- TExternalDirtyActorsTracker can now filter out tracked actors depending on the parent class wanted behavior.
- Don't track dirty actors coming from non transactional operations.

#rb chris.tchou

[CL 32133372 by jeanfrancois dube in ue5-main branch]
2024-03-08 17:00:42 -05:00
jonathan bard
c9757666de Added system to invalidate VSM pages when using (non-Nanite) landscape, to hide shadow artifacts induced by the vertex morphing system of standard landscape :
* Relies on pre-computing max height delas from mip-to-mip for every landscape component
* Invalidation occurs when the evaluated max delta between the heights at the LOD value that was active when VSM was last cached is different enough from the heights at the current LOD value (for a given persistent view), based on a height threshold that is tweakable per landscape and overridable per landscape proxy
* Invalidation doesn't occur when Nanite landscape is used
* The invalidation rate is decreased as the LOD value goes up, controlled by a screen size parameter in the landscape actor (overridable per proxy), under which no invalidation will occur. This avoids over-invalidating VSM on higher LOD values, since they tend to occupy less real estate and therefore don't need to have perfect shadows
* Added per landscape (overridable per-proxy) shadow map bias to help with this problem too
* Added 3 non-shipping CVars to help tweak those 3 parameters in-game (landscape.OverrideNonNaniteVirtualShadowMapConstantDepthBiasOverride, landscape.OverrideNonNaniteVirtualShadowMapInvalidationHeightErrorThreshold, landscape.OverrideNonNaniteVirtualShadowMapInvalidationScreenSizeLimit)
* The whole invalidation system can be enabled/disabled via CVar landscape.AllowNonNaniteVirtualShadowMapInvalidation
* Added another CVar (landscape.NonNaniteVirtualShadowMapInvalidationLODAttenuationExponent) to tweak the screen-size-dependent invalidation rate curve shape

Misc:
* Fixed landscape.DumpLODs command : now works without parameter and can be used several times
* Changed CachedSectionLODValues system for landscape to be usable both for ViewState-less views (one-shot renders like water info custom render passes) and "persistent" views (those that have  FViewStateInterface associated). This allows to keep track of the previous frame's CachedSectionLODValues for a given persistent view and removes the previous hacky method
* Also, prevented landscape render systems to have their LOD section values cleared when a render is made on another scene (e.g. any time a thumbnail renders in editor or when custom render passes execute) : now only the render systems that pertain to the scene being rendered get udpated
* Fixed game thread data being accessed in render thread landscape scene proxy (component)
* Landscape UX fixes
* Fixed some landscape CVars which were not render-thread safe
* Removed member RHI buffer refs LandscapeLODDataBuffer and LandscapeIndirectionBuffer which didn't serve any purpose
#rb chris.tchou
#tests Editor, cooked game,, cooked game
#jira UE-203928, UE-141201, UE-203934, FORT-687382, UE-203945, UE-163715

[CL 31441773 by jonathan bard in ue5-main branch]
2024-02-13 14:57:38 -05:00
jonathan bard
945beb42d3 Re-select the affected landscape after using the resize tool in landscape mode
#rb roey.borsteinas
#tests editor

[CL 31046811 by jonathan bard in ue5-main branch]
2024-01-31 09:49:19 -05:00
max chen
3148c9509b Property Editor: Added ctrl/shift multiplier increments to spin box. Default behavior is: Shift multiplies the value by 10, Ctrl multiplies the value by 0.1.
These are the changes in existing behavior:
- ShiftMouseMovePixelPerDelta has been deprecated in favor of these new mechanisms of ShiftMultiplier and CtrlMultiplier.
- SupportDynamicSliderMaxValue and SupportDynamicSliderMinValue now activate with Alt instead of Ctrl so that Ctrl can be used for CtrlMultiplier.
- OnMouseWheel had hardcoded ctrl/shift step increments and these now follow the ShiftMultiplier and CtrlMultiplier attributes.

There are two changes required so that snapping to the Delta attribute does not occur when using ShiftMultiplier and CtrlMultiplier:
- OnMouseMove commits the value by CommittedViaSpinMultiplier
- OnMouseButtonUp detects that the mouse event either has Shift or Ctrl

#jira UE-195384
#rb Patrick.Boutot, Vincent.Gauthier

[CL 30962670 by max chen in ue5-main branch]
2024-01-28 23:19:46 -05:00
evgenii babinets
690bc2cbc4 Fixed unreachable code warnings/errors.
#rb simon.orr

[CL 30620936 by evgenii babinets in ue5-main branch]
2024-01-15 12:29:05 -05:00
jonathan bard
4dae52efa0 Changed "Mode" property in landscape import/export to either "Import Mode" or "Export Mode" to be more explicit to the user
#rb luc.eygasier

[CL 30428784 by jonathan bard in ue5-main branch]
2023-12-21 11:44:28 -05:00
semion piskarev
1b1194164b Landscape: Make it possible to drag landscape brushes to different edit layers in landscape mode.
#rb jonathan.bard

[CL 30292395 by semion piskarev in ue5-main branch]
2023-12-13 10:02:05 -05:00
jonathan bard
de8005187b Fixed bad english
[CL 29958681 by jonathan bard in ue5-main branch]
2023-11-28 09:10:19 -05:00
chris tchou
5062c530e6 Async Runtime Grass Map Generation
Intended to save disk space and runtime memory, at the cost of generating grass density maps at runtime.

Enabled per platform via cvar "grass.GrassMap.UseRuntimeGeneration" (disabled by default), and enabled per landscape via the "bUseRuntimeGrassMapGeneration" object property (also disabled by default).  Both must be enabled at cook time for disk and memory savings.

Original review in Main:  https://p4-swarm.epicgames.net/reviews/29027747

#rb jonathan.bard
#tests console testers tested grass in cooked builds on all platforms, I ran and profiled game projects in editor and cooked standalone, and tested grass editing in game projects in editor

[CL 29539554 by chris tchou in ue5-main branch]
2023-11-07 18:20:01 -05:00
marc audy
59f0feb3e4 Fix warning V595: The pointer was utilized before it was verified against nullptr.
#rnx

[CL 29459035 by marc audy in ue5-main branch]
2023-11-04 01:30:32 -04:00
jonathan bard
a64839fef6 Removed unused landscape code
#rb luc.eygasier
#tests editor

[CL 29189465 by jonathan bard in ue5-main branch]
2023-10-27 13:51:45 -04:00
jonathan bard
efb76d5b4c Fixed potential crashes in landscape code when iteration over garbage actor
#jira UE-197397, UE-197398
#tests editor
#rb chris.tchou

[CL 28809958 by jonathan bard in ue5-main branch]
2023-10-16 14:28:43 -04:00
don boogert
16e96bbf10 Resize Landscape: Use transform when calculating new position of Landscape after resize.
#jira UE-189886
#rb jonathan.bard

[CL 28760159 by don boogert in ue5-main branch]
2023-10-13 13:44:48 -04:00
don boogert
a7f46faf50 Landscape : Fix only importing weightmaps
#rb jonathan.bard
#jira UE-173254
#jira UE-188145

[CL 28760145 by don boogert in ue5-main branch]
2023-10-13 13:44:42 -04:00
nick edwards
69726f5ee7 Update code using FJsonObject to use TCHAR strings instead of ANSI strings. Removes unnecessary string conversions and removes compilation errors when FJsonObject is updated to use FStringViews.
[CL 28536648 by nick edwards in ue5-main branch]
2023-10-06 08:18:42 -04:00
chris tchou
138274687a Fix for very long iteration times when resizing landscapes with foliage instances
The main problem was that the cell count calculation was overflowing, when passed WORLD_MAX/MIN as input bounds -- so it thought that iterating the entire space was faster than iterating the populated cells.
I also modified the query code to not query WORLD_MAX/MIN on Z, but to instead expand the world bounds by a good amount, which helps it take more optimal paths by limiting the query volume.

#rb jonathan.bard
#jira UE-197004

[CL 28475067 by chris tchou in ue5-main branch]
2023-10-04 17:00:39 -04:00
chris tchou
12cf664215 Fix for missing or incorrect tool tips in Landscape Mode / Sculpt tab
Adding back the "Reset to default" option to some landscape tool properties

#jira UE-156290, UE-152894
#rb luc.eygasier

[CL 28236473 by chris tchou in ue5-main branch]
2023-09-26 13:29:19 -04:00
jonathan bard
303b251684 Various UX improvments for landscape :
* Added an option to be able to consider the paint layer's hardness parameter when using the erosion tool. Set to false by default because this used to be misleading for users
* Set hardness to 0 by default for landscape layer info assets (for the same reason as above)
* Added several missing tooltips
* Added support for double-clicking on a paint layer thumbnail to open the corresponding landscape layer info asset
#rb chris.tchou

[CL 28185367 by jonathan bard in ue5-main branch]
2023-09-25 08:58:18 -04:00
jonathan bard
92b8fdb0a5 Turned landscape brush size's max slider and max clamp value into project settings
Misc:
* Removed FLandscapeEditorServices, which didn't make much sense in terms of design wrt dependency inversion : instead, FLanscapeEditorModule is the one implementing ILandscapeEditorServices

#jira UE-195737
#tests editor
#rb don.boogert

[CL 28079921 by jonathan bard in ue5-main branch]
2023-09-21 05:17:01 -04:00
jonathan bard
a6f7cb9d56 Landscape cleanup :
* Removed deprecated code from <=UE5.2
* Moved UHierarchicalInstancedStaticMeshComponent::AcceptPrebuiltTree and UHierarchicalInstancedStaticMeshComponent::BuildTreeAnyThread to UGrassInstancedStaticMeshComponent

#rb jamie.hayes, chris.tchou

[CL 27992212 by jonathan bard in ue5-main branch]
2023-09-19 08:24:35 -04:00
chris tchou
d1145fa8e6 Fix spelling error in landscape tool tip
#rb trivial

[CL 27832910 by chris tchou in ue5-main branch]
2023-09-13 11:22:53 -04:00
luc eygasier
3c52b7ef37 Fixes new landscape location/rotation/scale reset to default button not showing up when using the gizmos.
Adds LandscapeEditor DetailsView RightColumnMinWidth to allow ResetToDefault button to be properly hit testable.

#rb Jonathan.Bard
#jira UE-194977

[CL 27828563 by luc eygasier in ue5-main branch]
2023-09-13 09:40:34 -04:00
luc eygasier
bfab9cf037 Updates Landscape editor icons (BP Brush affects Heightmap/Weightmap/VisibilityLayer).
Changes buttons to toggle buttons for landscape editor BP brushes affecting layers features.
Updates landscape editor target list colors, padding, text color to reflect UE5 style.

#rb Jonathan.Bard

[CL 27346857 by luc eygasier in ue5-main branch]
2023-08-24 12:49:20 -04:00
don boogert
8ae36d3057 Landscape: Fix duplicate localization key
#rb trivial

[CL 26906483 by don boogert in ue5-main branch]
2023-08-07 20:01:44 -04:00
don boogert
97d6069c92 Landscape : Better handling of 8 bit images for heights and 16 bit images for weights.
Allows for reading 8bit images for heights and 16bit images for weights.

#rb jonathan.bard

[CL 26898588 by don boogert in ue5-main branch]
2023-08-07 16:50:13 -04:00