Commit Graph

851 Commits

Author SHA1 Message Date
chris tchou
eabb74f607 Tool changes to use local edit layer instead of shared state
The upgraded tools are:

FLandscapeToolSculpt
FLandscapeToolSmooth
FLandscapeToolFlatten
FLandscapeToolRamp
FLandscapeToolErosion
FLandscapeToolHydraErosion

The helper class FLandscapeLayerDataCache was fully upgraded to use explicit local edit layers (all tools that made use of it were upgraded, so no need for back compat).

For the tools, I decided to pass down the explicit edit layer via a "SetEditingLayer()" function -- legacy tools simply ignore that function call and continue to use the landscape shared state,
and upgraded tools will use it to set up the layer they should work in.

#rb jonathan.bard
#jira UE-133198
#preflight 63fe67b630633435f8b0e646

[CL 24472138 by chris tchou in ue5-main branch]
2023-03-01 17:22:50 -05:00
Florin Pascu
106ea7508c Preparation changes for removing FeatureLevel from World
FeatureLevel is Deprecated
Add Setter/Getter for FeatureLevel
NextStep: Make GetFeatureLevel returns DDSPI::GetFeatureLevel, remove FeatureLevel memberfrom UWorld
#jira UE-168551
#rb christopher.waters
#preflight 63ff5e49f43e53f6811c86a4

[CL 24461796 by Florin Pascu in ue5-main branch]
2023-03-01 09:41:33 -05:00
jonathan bard
9f597de169 * Fixed bad tangent space computations for various landscape utilities (static lighting, Nanite...) : mimic what is done in the vertex shader when reconstructing the normal's Z in order to avoid quantization issues
* Also factorized lots of redundant code in landscape for accessing weightmap/heightmap data

#rb don.boogert
#preflight 63f8b80aa134e0b05998c7a3

[CL 24403600 by jonathan bard in ue5-main branch]
2023-02-24 12:42:35 -05:00
jonathan bard
1f3f143992 Added Include Border to the landscape tool's component brush. Since the border is shared with neighbors, oftentimes the user wants to paint within the bounds of the component but not on the border (e.g. to quickly paint weightmaps on components but not have the paint "bleed" onto neighboring components)
#rb chris.tchou
#preflight 63f4f79d26233b957f699b79

[CL 24346736 by jonathan bard in ue5-main branch]
2023-02-21 14:34:16 -05:00
don boogert
70e33a3783 Landscape : Calculate AddComponent action resolution increase by actually working out where components will be created
#rb chris.tchou
#preflight 63f013853c1eb56f05ee9633

[CL 24296767 by don boogert in ue5-main branch]
2023-02-17 22:12:55 -05:00
luc eygasier
8062afc2c3 Adds Landscape BP Brush visibility layer editing.
* Deprecate Render method for BP Brushes, RenderLayer should now be used
* Adds FLandscapeBrushParameters struct that should be used to pass arguments when rendering a layer
* Modifies ELandscapeToolTargetType to be an enum class, usable by blueprints
* Adds BP Brush visibility layer toggle in Landscape Editor
* Adds visibility layer editing for LandscapeCircleHeightPatches
* Adds visibility layer editing for LandscapeTexturePatches
* Adds helper method to determine if a layer info object name is a visibility layer

#jira UE-163386
#rb Jonathan.Bard
#preflight 63ebb119e92f139c51b2a842

[CL 24251734 by luc eygasier in ue5-main branch]
2023-02-16 01:57:40 -05:00
jonathan bard
6089355aca Added perf tags and markers for easier profiling of landscape tools + some code improvements
#rb chris.tchou
#preflight 63e4c7497a15f127a810e3cc

[CL 24096741 by jonathan bard in ue5-main branch]
2023-02-09 09:00:05 -05:00
jonathan bard
554d98ab08 * Added CPU traces to LandscapeTrace
* Fixed important slowdown when using a landscape brush with a large radius : sphere sweeps perform very poorly on landscapes with high resolutions. Replaced with a bounded series of concentric raycasts (hundreds of ms -> 1 or less ms in the worse case) and adjusted hit point extrapolation in order to be more consistent

#rb don.boogert
#preflight 63e2b3cdc11233cdcaa71747

[CL 24094412 by jonathan bard in ue5-main branch]
2023-02-09 05:17:36 -05:00
michael balzer
b5e2c955ad LandscapeEditor: Disable Retopo tool in restrictive mode
#preflight 63e2fc1c7467a6960f62da57
#rb jonathan.bard

[CL 24081848 by michael balzer in ue5-main branch]
2023-02-08 15:59:25 -05:00
jonathan bard
52e1ca6c17 Fixed crash when using alpha brush/pattern landscape tool and generally better support various cases with the alpha brush texture :
* The brushes becomes red and non-interactive when the alpha brush is invalid
* Setting an invalid alpha brush (e.g. a cooked texture in a cooked editor or a virtualized texture with invalid virtualization settings such that the texture source cannot be retrieved) is not crashing the UI anymore and will show as empty in the UI (+ a log error will be done)
* The brushes now support the same failure conditions as the normal brush (unloaded components, etc.)
* The alpha brush textures now supports all texture formats and will be linearized if necessary when reading the texture data
* The alpha brush texture channel is auto-corrected if one uses an invalid channel (e.g. Green on a G8 texture)

#rb luc.eygasier
#preflight 63ca08acd368fed9e5f22517

[CL 23815938 by jonathan bard in ue5-main branch]
2023-01-23 12:50:34 -05:00
steve robb
f9d63beaed Removed some miscellaneous TIsSame usage (part of a larger change to deprecate TIsSame).
#rb none
#preflight 63c025140717c570e527465b

[CL 23682288 by steve robb in ue5-main branch]
2023-01-13 13:48:03 -05:00
sebastian nordgren
dbc7b3902c Landscape editor Brush Size now has a maximum fractional digits of 2.
#review-23510164 @editor-ux
#preflight 6399b253c16855964dfd40e1

[CL 23662274 by sebastian nordgren in ue5-main branch]
2023-01-12 09:29:28 -05:00
jonathan bard
60455ead68 Landscape : removed CollisionThickness (unused since even before Chaos was introduced)
#rb semion.piskarev
#preflight 63bd961eaf3ebedd991e94e3

[CL 23632616 by jonathan bard in ue5-main branch]
2023-01-10 15:50:36 -05:00
luc eygasier
b521e678d3 Removes TLazyObjectPtr usage in ALandscapeStreamingProxy, ULandscapeInfo, ULandscapeComponent, ULandscapeHeightfieldCollisionComponent.
Adds package deprecation and fixup mechanism to allow users to update fixedup packages.
Fixes Guid Remapping inTLazyObjectPtr asserting when multiple PIE sessions

#rb Jonathan.Bard
#preflight 63b49c2c35203bc7aacb1d15
#jira UE-156921

[CL 23631796 by luc eygasier in ue5-main branch]
2023-01-10 15:22:05 -05:00
christopher waters
0d5b23e2e3 Adding includes to prepare for a header dependency cleanup.
#preflight 63b5e0bfff7b9ad7030f0f81

[CL 23581920 by christopher waters in ue5-main branch]
2023-01-04 17:07:40 -05:00
jonathan bard
3056f9dfc4 Disabled Layer Info object creation from the asset picker context menu in the Create landscape panels
#rb don.boogert
#jira UE-171960
#preflight 639b931c2960b73220175f92

[CL 23533253 by jonathan bard in ue5-main branch]
2022-12-15 17:43:56 -05:00
christopher waters
7215f7d4ec Fully moving MaterialDomain to its own header.
#jira none
#preflight 639b4dc335203bc7aa695078

[CL 23531533 by christopher waters in ue5-main branch]
2022-12-15 16:01:51 -05:00
jonathan bard
02dc0e3486 Fixed assert when resizing a landscape with a landscape splines component
#rb chris.tchou
#jira UE-169246
#preflight 6398e821c16855964dc63fbf

[CL 23516554 by jonathan bard in ue5-main branch]
2022-12-14 14:53:20 -05:00
jonathan bard
ec6377908d Landscape fix : prevent invalid paint layer names from being displayed in the New/Import landscape tool, like they are in the Paint panel
#preflight 63989a4035203bc7aa69db8c
#jira UE-171960

[CL 23499961 by jonathan bard in ue5-main branch]
2022-12-13 18:22:05 -05:00
Bryan sefcik
80f80e7a25 Updated the underlying types for regular and namespaced enums.
#jira
#preflight 638e6d479549ddaa2822be9a

[CL 23421568 by Bryan sefcik in ue5-main branch]
2022-12-06 19:43:59 -05:00
jonathan bard
55b5be6670 Use more explicit names for landscape tool materials
#rb
#jira none
#preflight 638e4f745624e6da5e9b0fbe

[CL 23397806 by jonathan bard in ue5-main branch]
2022-12-05 15:18:29 -05:00
don boogert
4c7b4f4fa9 Landscape: Import Gimzo usability improvements
* Added snap modes (texel and component)
* Added reset to landscape minimum corner.

#jira UE-132294
#rb jonathan.bird
#preflight 6331fb29b20e73a09854867c

[CL 23340775 by don boogert in ue5-main branch]
2022-11-30 16:59:05 -05:00
jonathan bard
b51bd86959 Fixed editor transaction being incorrectly started when using the mouse shortcut (ctrl+shift+right click-drag) to adjust the brush radius/falloff in landscape mode
#rb luc.eygasier
#jira UE-170752
#preflight 637df4e7f514e1ded95e53df

[CL 23248892 by jonathan bard in ue5-main branch]
2022-11-23 09:22:20 -05:00
jonathan bard
97e27ea18a Removed dead code
#rnx
#rb don.boogert
#preflight 637bd7ec2a05dabce9159b8a

[CL 23243825 by jonathan bard in ue5-main branch]
2022-11-22 19:51:30 -05:00
don boogert
af26b158de Landscape : Fix height pack function.
#rb jonathan.bird
[REVIEW] 63768e1ec85523092aad49a7

[CL 23184849 by don boogert in ue5-main branch]
2022-11-17 17:11:51 -05:00