Commit Graph

334 Commits

Author SHA1 Message Date
luc eygasier
31bba2a82d Fixes include warning
#preflight none
#rb trivial
#jira UE-155142

#ROBOMERGE-AUTHOR: luc.eygasier
#ROBOMERGE-SOURCE: CL 20395885 via CL 20395901 via CL 20395913 via CL 20395933
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v949-20362246)

[CL 20398763 by luc eygasier in ue5-main branch]
2022-05-27 16:51:38 -04:00
luc eygasier
a4580ce238 Adds default layer info object setting. Allowing to automatically create Layer Info by cloning the default object when creating a new landscape:
* Unifies the different places creating a Layer Info Object or accessing "sharedassets".
* Fixes UEFN not able to access created LayerInfo objects in the ContentBrowser
* Adds the ability to create Landscape Layer Info Object as a regular asset (ie: without the landscape editor). Needed for example to create a Default LandscapeLayerInfoObject

#preflight 628ff637911f194ea743c6f3
#rb Jonathan.Bard

#ROBOMERGE-AUTHOR: luc.eygasier
#ROBOMERGE-SOURCE: CL 20395352 via CL 20395370 via CL 20395392 via CL 20395403
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v949-20362246)

[CL 20398733 by luc eygasier in ue5-main branch]
2022-05-27 16:50:43 -04:00
patrick enfedaque
94c6af5840 New Landscapes will always have GridSize in their name
#rb richard.malo, jeanfrancois.dube
#preflight 628e3510eb57f851e2271607

#ROBOMERGE-AUTHOR: patrick.enfedaque
#ROBOMERGE-SOURCE: CL 20364116 via CL 20364141 via CL 20364179
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v949-20362246)

[CL 20366287 by patrick enfedaque in ue5-main branch]
2022-05-25 12:09:23 -04:00
patrick enfedaque
6e14bf225a Landscape:
- Allow changing bIsSpatiallyLoaded flag on ALandscapeStreamingProxy and ALandscapeSplineActor
- New flag in ALandscape used to set the bIsSpatiallyloaded flags on newly created AlandscapeStreamingProxy and ALandscapeSplineActor (bAreNewLandscapeActorsSpatiallyLoaded)

#rb richard.malo, jeanfrancois.dube
#preflight 628d1404b378b39d419041cf

#ROBOMERGE-AUTHOR: patrick.enfedaque
#ROBOMERGE-SOURCE: CL 20351658 via CL 20351677 via CL 20351695
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v948-20297126)

[CL 20353647 by patrick enfedaque in ue5-main branch]
2022-05-24 15:21:03 -04:00
dmitriy dyomin
35dc9373cd Fixed: Water surfaces are not aligned between seams across the map on Android
Use Landscape LOD1 for water texture capture. Inline bottom 5 LOD for landscape mesh, similar to texture based landscape which always has 64x64 mip available

#ROBOMERGE-AUTHOR: dmitriy.dyomin
#ROBOMERGE-SOURCE: CL 20339695 via CL 20339785 via CL 20339815 via CL 20340013 via CL 20340045
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v948-20297126)

[CL 20341634 by dmitriy dyomin in ue5-main branch]
2022-05-23 19:36:03 -04:00
zach bethel
c176b233da Renamed CopyTextureWithTransitions to TransitionAndCopyTexture.
#preflight 6287ddfe8828ea88c8701eea

[CL 20303093 by zach bethel in ue5-main branch]
2022-05-20 17:14:41 -04:00
luc eygasier
8f5e6ffb66 Adds Landscape resolution restriction when in Restricted Mode (example: UEFN), preventing to create landscape if the wanted resolution exceed currently supported safe limits.
Applied to:
* New Landscapes, new imported landscape
* Import Landscape tool
* Add component tool

#jira UE-149015
#preflight 627e98d97c26e247735ca7d1
#rb Michael.Balzer, Jonathan.Bard

#ROBOMERGE-AUTHOR: luc.eygasier
#ROBOMERGE-SOURCE: CL 20187875 via CL 20189504 via CL 20189506 via CL 20189507
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20191648 by luc eygasier in ue5-main branch]
2022-05-13 18:58:05 -04:00
zach bethel
2156756315 Replaced use of CopyToResolveTarget with CopyTexture.
#preflight 627a90ff7e5f24d1edd73422
#rb luke.thatcher, jason.hoerner

[CL 20127337 by zach bethel in ue5-main branch]
2022-05-10 14:47:34 -04:00
Jason Nadro
fc3dcee397 Restore backed out CL, with fixes.
Also restores follow-up CLs 19973746, 19973782
FStaticParameterSet::MaterialLayers can't be deprecated, since a property with the same name is included via FStaticParameterSetRuntimeData
So instead, FMaterialLayersFunctionsRuntimeData is updated with SerializeFromMismatchedTag, to allow serializing a full FMaterialLayersFunction.
When this happens, the EditorOnly portion is stored in a separate heap allocation, and then transferred to FStaticParameterSet::EditorOnly::MaterialLayers
#preflight 626c3405e31dbb512cef1e98

[Backout] - CL19973745
#fyi bob.tellez
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL19964485
#fyi Ben.Ingram
Original CL Desc
-----------------------------------------------------------------
Add 'Optional' EditorOnly data for UMaterialInterface and UMaterialFunctionInterface
These are separate UObject hierarchies that store editor-only UPROPERTIES, but can be included with cooked content, which allows full editor support.
In principle, all editor-only properties could be moved over.  So far, this has been limited to UMaterialExpressions, and data related to material parameters.
FStaticParameterSet, FMaterialLayersParameters, and FMaterialCachedExpressionData have all been split into separate editor-only/non-editor-only classes,
which allows the editor-only portion to be stored on the optional editor-only UObject.
#preflight 626ab21dad56c0cbbea32dc4
#rb jason.nadro, francis.hurteau
#jira FORT-463329

[CL 20043286 by Jason Nadro in ue5-main branch]
2022-05-04 12:21:52 -04:00
bob tellez
34d8d5badd [Backout] - CL19964485
#fyi Ben.Ingram
Original CL Desc
-----------------------------------------------------------------
Add 'Optional' EditorOnly data for UMaterialInterface and UMaterialFunctionInterface
These are separate UObject hierarchies that store editor-only UPROPERTIES, but can be included with cooked content, which allows full editor support.
In principle, all editor-only properties could be moved over.  So far, this has been limited to UMaterialExpressions, and data related to material parameters.
FStaticParameterSet, FMaterialLayersParameters, and FMaterialCachedExpressionData have all been split into separate editor-only/non-editor-only classes,
which allows the editor-only portion to be stored on the optional editor-only UObject.
#preflight 626ab21dad56c0cbbea32dc4
#rb jason.nadro, francis.hurteau
#jira FORT-463329

[CL 19973745 by bob tellez in ue5-main branch]
2022-04-28 20:08:12 -04:00
Ben Ingram
448b0a9807 Add 'Optional' EditorOnly data for UMaterialInterface and UMaterialFunctionInterface
These are separate UObject hierarchies that store editor-only UPROPERTIES, but can be included with cooked content, which allows full editor support.
In principle, all editor-only properties could be moved over.  So far, this has been limited to UMaterialExpressions, and data related to material parameters.
FStaticParameterSet, FMaterialLayersParameters, and FMaterialCachedExpressionData have all been split into separate editor-only/non-editor-only classes,
which allows the editor-only portion to be stored on the optional editor-only UObject.
#preflight 626ab21dad56c0cbbea32dc4
#rb jason.nadro, francis.hurteau
#jira FORT-463329

[CL 19964485 by Ben Ingram in ue5-main branch]
2022-04-28 12:56:28 -04:00
Julien StJean
175d5f6ab4 Adding elements support for the marquee selection.
Added a new registry to let the objects provide how their elements should be selected when doing a selection by a volume such as a box or a frustum.
Added a some editor only functions for the marquee selection into the world interface.

#jira UETOOL-4797
#rb Brooke.Hubert
#preflight 624cb2dca64871f1a113bf2a

[CL 19727315 by Julien StJean in ue5-main branch]
2022-04-12 15:52:44 -04:00
jonathan bard
0660f91839 Added BP setters for ForcedLOD and LODBias on landscape components. SetLOD can now be called both at runtime and edit-time.
#rb luc.eygasier
[FYI] cody.haskell

#ROBOMERGE-AUTHOR: jonathan.bard
#ROBOMERGE-SOURCE: CL 19720596 via CL 19720629 via CL 19720639 via CL 19720646
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v938-19570697)

[CL 19721952 by jonathan bard in ue5-main branch]
2022-04-12 11:31:39 -04:00
michael balzer
a942806ea1 Landscape: Change LogLandscape default verbosity from Warning to Log
#preflight 623e4e9f6d39f6b5a0622c12
#rb jonathan.bard

[CL 19542148 by michael balzer in ue5-main branch]
2022-03-29 10:50:47 -04:00
dmitriy dyomin
d5741f624b Added option to disable usage of a baked landscape mesh on mobile platforms (r.Mobile.LandscapeMesh)
#rb jack.porter

#ROBOMERGE-OWNER: dmitriy.dyomin
#ROBOMERGE-AUTHOR: dmitriy.dyomin
#ROBOMERGE-SOURCE: CL 19528072 via CL 19528235 via CL 19528695 via CL 19528703
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v937-19513599)

[CL 19532768 by dmitriy dyomin in ue5-main branch]
2022-03-28 16:28:57 -04:00
richard malo
8ad410579e Landscape using Brushes now forces its LS Streaming Proxies to also be loaded in editor (until partial loading of landscape proxies is properly supported when using BP brushes).
#rb patrick.enfedaque, jeanfrancois.dube, jonathan.bard
#preflight 622f4cb90a342dea04e8dda2

#ROBOMERGE-AUTHOR: richard.malo
#ROBOMERGE-SOURCE: CL 19384401 via CL 19384407
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19384754 by richard malo in ue5-main branch]
2022-03-15 09:55:25 -04:00
fred kimberley
e7e64e1749 Make FVector conversions explicit.
#preflight 6221270ea00412627d0b7dd3
#jira UE-122078
#lockdown Julien.Marchand
#rb Andrew.Davidson

#ROBOMERGE-AUTHOR: fred.kimberley
#ROBOMERGE-SOURCE: CL 19253774 in //UE5/Release-5.0/... via CL 19257968
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v924-19243027)

[CL 19263535 by fred kimberley in ue5-main branch]
2022-03-04 03:48:53 -05:00
luc eygasier
643ed6eea9 Undo //UE5/Main/Engine/Source/... changelist 19235312
Fixes uninitialized member in FLandscapePerLODMaterialOverride

#rb Jonathan.Bard
#jira UE-144566
#preflight 6220c3397e0217a606ee7545

Original CL Desc
* Removed incomplete per-platform per-LOD level material overrides for landscape. The code isn't meant to support that since material instances are built at edit-time. We would need to somewhat hack it at cook time in order to regenerate (and recompile) the list of material instances per-platform, which is not a recommended thing to to in the engine. Instead, we choose to simply make the per-LOD level material overrides constant across platforms since the recommended way is to customize the material for platforms using material expressions such as Quality Level switc, Shading Path Switc or Feature Level Switc.
* Deprecated/merged FLandscapeComponentMaterialOverride and FLandscapeProxyMaterialOverride into FLandscapePerLODMaterialOverride since they were identical
* Fixed UpdateLayersMaterialInstances which, unlike UpdateMaterialInstances, didn't take into account per-component material overrides

[CL 19242882 by luc eygasier in ue5-main branch]
2022-03-03 08:55:00 -05:00
eric mcdaniel
78d6c0d3f5 [Backout] - CL19230219
#rb none
#jira UE-144566
#preflight 62200fba943787f1d21ae8ae

#fyi luc.eygasier, Jonathan.Bard
Original CL Desc
-----------------------------------------------------------------
* Removed incomplete per-platform per-LOD level material overrides for landscape. The code isn't meant to support that since material instances are built at edit-time. We would need to somewhat hack it at cook time in order to regenerate (and recompile) the list of material instances per-platform, which is not a recommended thing to to in the engine. Instead, we choose to simply make the per-LOD level material overrides constant across platforms since the recommended way is to customize the material for platforms using material expressions such as Quality Level switc, Shading Path Switc or Feature Level Switc.
* Deprecated/merged FLandscapeComponentMaterialOverride and FLandscapeProxyMaterialOverride into FLandscapePerLODMaterialOverride since they were identical
* Fixed UpdateLayersMaterialInstances which, unlike UpdateMaterialInstances, didn't take into account per-component material overrides

From shelve 17931928 on behalf on Jonathan.Bard

#rb Jonathan.Bard
#jira UE-132031
#preflight 621cd5cd49723678579d9ec1

#ROBOMERGE-OWNER: luc.eygasier
#ROBOMERGE-AUTHOR: luc.eygasier
#ROBOMERGE-SOURCE: CL 19221589 via CL 19223810 via CL 19223838 via CL 19226205
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19235312 by eric mcdaniel in ue5-main branch]
2022-03-02 20:08:32 -05:00
luc eygasier
e78d41114a * Removed incomplete per-platform per-LOD level material overrides for landscape. The code isn't meant to support that since material instances are built at edit-time. We would need to somewhat hack it at cook time in order to regenerate (and recompile) the list of material instances per-platform, which is not a recommended thing to to in the engine. Instead, we choose to simply make the per-LOD level material overrides constant across platforms since the recommended way is to customize the material for platforms using material expressions such as Quality Level switc, Shading Path Switc or Feature Level Switc.
* Deprecated/merged FLandscapeComponentMaterialOverride and FLandscapeProxyMaterialOverride into FLandscapePerLODMaterialOverride since they were identical
* Fixed UpdateLayersMaterialInstances which, unlike UpdateMaterialInstances, didn't take into account per-component material overrides

From shelve 17931928 on behalf on Jonathan.Bard

#rb Jonathan.Bard
#jira UE-132031
#preflight 621cd5cd49723678579d9ec1

#ROBOMERGE-OWNER: luc.eygasier
#ROBOMERGE-AUTHOR: luc.eygasier
#ROBOMERGE-SOURCE: CL 19221589 via CL 19223810 via CL 19223838 via CL 19226205
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19230219 by luc eygasier in ue5-main branch]
2022-03-02 16:51:01 -05:00
Ben Ingram
b6f8dbd89b Use HLSLTree to generate cached data when using new HLSL translator
This allows cached data to be based on expressions that are active/connected
#rb none
#jira none
#preflight 621fce7831454c90cc079dd2

[CL 19227403 by Ben Ingram in ue5-main branch]
2022-03-02 15:20:48 -05:00
jonathan bard
dc0273093d Landscape edit layers local merge fixes :
* Fixed assert when updating heightmaps of different sizes
* Fixed crash when deleting components : the deleted components were still referenced in the shared weightmap texture usages

Misc:
* Properly delete edit layers heightmaps and weightmaps when deleting landscape components

#rb luc.eygasier
#jira UE-140551
#preflight 62164eea37178b0175ac9cf9

#ROBOMERGE-AUTHOR: jonathan.bard
#ROBOMERGE-SOURCE: CL 19094154 via CL 19100022 via CL 19100646 via CL 19109891
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19147208 by jonathan bard in ue5-main branch]
2022-02-25 10:09:16 -05:00
jonathan bard
82943cf1f2 Fixed assert when cooking landscape components on mobile and creating materials
Cooking a ULandscapeComponent is updating a LandscapeMaterialInstanceConstant and the landscape MIC has already had BeginCacheForCookedPlatformData() called on it.

Here is what's happening:

UMaterialInstance::BeginCacheForCookedPlatformData is called for a Landscape MIC
This MIC's bHasStaticPermutationResource == false so no resources are cooked for the MIC.  The MIC's CachedMaterialResourcesForCooking is empty.
ULandscapeComponent::BeginCacheForCookedPlatformData is called on a Landscape component.
The Landscape component changes the MIC to have a static permutation and calls `CombinationMaterialInstance->UpdateStaticPermutation(StaticParameters, InMaterialUpdateContext);`
We then go to Save the MIC, which now has bHasStaticPermutationResource==true, but it doesn't have resources cached for cooking and triggers the assert.

The new code ensures we call `BeginCacheForCookedPlatformData` on any material instances created during landscape generation while cooking.

#rb jason.nadro
#preflight 620fb676be45100d32bccef9
#jira UE-142195

#ROBOMERGE-AUTHOR: jonathan.bard
#ROBOMERGE-SOURCE: CL 19081744 in //UE5/Release-5.0/... via CL 19096958
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19140598 by jonathan bard in ue5-main branch]
2022-02-24 23:20:47 -05:00
sebastien lussier
245f347384 #jira UE-132273
WorldPartition - Added Lanscape HLODs

Created a custom HLOD builder for ULandscapeComponent
* Landscape LOD used to generate the HLOD is autocomputed from the expected draw distance, same for the baked texture size

* Expose ALandscapeProxy::GetLODScreenSizeArray()
* Actually reverting changes done in CL 18794652 (moving proxy mesh creation back to ALandscapeProxy)
* ComputeLayerHash() now takes a bool to choose if we want to compute the hash for edition or runtime data
#preflight 620a60a1583261b0a6539c22
#rb Patrick.Enfedaque

#ROBOMERGE-AUTHOR: sebastien.lussier
#ROBOMERGE-SOURCE: CL 18980225 in //UE5/Release-5.0/... via CL 18980661 via CL 18981014
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)

[CL 18981050 by sebastien lussier in ue5-main branch]
2022-02-14 12:02:22 -05:00
andrew davidson
8e95b10069 Fix FVector2D variant casts - Runtime
Submitted on behalf of fred.kimberley
#rb andy.davidson
#preflight 61f8729a5a026d2d19bb9ca6
#preflight 61f87a025a026d2d19be76ed

#ROBOMERGE-OWNER: andrew.davidson
#ROBOMERGE-AUTHOR: andrew.davidson
#ROBOMERGE-SOURCE: CL 18802361 in //UE5/Release-5.0/... via CL 18802891 via CL 18821557
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)

[CL 18821641 by andrew davidson in ue5-main branch]
2022-02-02 01:47:07 -05:00