Commit Graph

1709 Commits

Author SHA1 Message Date
john huelin
9474366a85 Fix disappearing grass when switching 120fps on/off
#rnx

[CL 23175663 by john huelin in ue5-main branch]
2022-11-17 09:58:04 -05:00
brandon dawson
0d7f00f805 Expose updating heightmap collision data at runtime by moving the neccessary components of CookCollisionData into a runtime accessbile call.
[REVIEW] [at]jonathan.bard
#preflight 6373932e232e3d12cbb5b511

[CL 23148125 by brandon dawson in ue5-main branch]
2022-11-15 19:46:25 -05:00
henrik karlsson
5b96352978 Fixes for c++ headerunits/modules.
* Adding forward declarations
* Adding "inline" in front of const/constexpr variables in headers
* Adding includes
* A few moves of ctor/dtor to cpp file

#preflight 6372b3ac0c74adb48b49f313
#rb none

[CL 23130896 by henrik karlsson in ue5-main branch]
2022-11-14 19:59:41 -05:00
aleksander netzel
5fb13876bb Add proper support for streamed geometries (geometries initialized as StreamingDestination) when dynamic ray tracing is enabled:
* Add FRayTracingGeometry::EGeometryStateFlags for tracking the state instead of several bools:
 - Add new state for tracking if the geometry was streamed in - its primary use is for dynamic ray tracing.
 - When ray tracing is toggled on at runtime we only recreate geometries that were marked as streamed in.
* Streamed geometries have to be created in a different way than regular geometries:
 - Creating geometry with StreamingDestination type will not allocate any memory for BLAS buffers.
 - Those can only be initialized by InitRHIForStreaming from temporary geometry with a StreamingSource type
 - Added FRayTracingGeometry::InitRHIForDynamicRayTracing() to handle both StreamingDestination and Rendering
  - For StreamingDestination it will do similar steps as normal mesh streaming does.
* Add missing RayTracingGeometry initialization when dynamic ray tracing was enabled but ray tracing was disabled.

#rb tiago.costa, yuriy.odonnell
#preflight 6372245ebf76990b71f5d021

[CL 23116977 by aleksander netzel in ue5-main branch]
2022-11-14 08:48:54 -05:00
derek ehrman
9eebc09d06 Fixing grass not spawning in ES3.1 preview mode - bringing in on behalf of Jonathan.Bard
[FYI] Jonathan.Bard

[CL 23104552 by derek ehrman in ue5-main branch]
2022-11-11 15:55:54 -05:00
richard malo
9c4ce2e8de Fixed static analysis
#rb jeanfrancois.dube

[CL 23102271 by richard malo in ue5-main branch]
2022-11-11 14:12:28 -05:00
richard malo
e80d8dc275 Added ULandscapeSubsystem::PrioritizeGrassCreation method to enable/disable boosting the grass creation process.
Added CVar grass.GrassCreationPrioritizedMultipler defaulted to 4 that affects grass.MaxCreatePerFrame and grass.MaxAsyncTasks when PrioritizeGrassCreation is true.
#rb patrick.enfedaque
#preflight 636d4e7a1a66e7f73186bd91

[CL 23091009 by richard malo in ue5-main branch]
2022-11-10 19:57:37 -05:00
jeremy moore
fc8ec5d756 Add landscape actor setting for choosing to use high quality per pixel heightmap sampling used with RVT.
Add a per platform CVar to completely disable high quality per pixel heightmap sampling if we want minimal cost.

[CL 23075430 by jeremy moore in ue5-main branch]
2022-11-10 06:33:30 -05:00
jonathan bard
08e482fca9 Added support for landscape material instances (per-component MICs) for Nanite landscape:
* Refactored ExportToRawMesh function to allow exporting one mesh section per component
* Implemented support for UV mappings usually provided by the landscape vertex factory in the non-Nanite case (as per the LandscapeLayerCoords material expression + others)
* For Nanite landscape materials, the relevant UV channels are :
** Texcoords0-2 : TerrainCoordMapping_XY, TerrainCoordMapping_XZ, TerrainCoordMapping_YZ (note : TerrainCoordMapping_XZ doesn't work ATM because texcoords1 seems to be a special case...)
** Texcoords3 : WeightmapUV
** Texcoords4 : LightmapUV (not implemented by ExportToRawMesh yet and not supported by Nanite meshes ATM : max 4 UV channels)
** Texcoords5 : HeightmapUV (implemented by ExportToRawMesh but not supported by Nanite meshes ATM : max 4 UV channels)
* Nanite landscape meshes now have 1 polygroup per component, with the proper landscape material instance being assigned to it
* Since Nanite meshes are capped at 64 meshes per section, Nanite landscape mesh will now fail to build on proxies sporting more than this amount of components. This is a first implementation and can be fixed later by adding as many Nanite landscape components as needed
* Implemented some missing virtual overrides on FLandscapeMaterialResource leading to landscape material instances potentially being used for non-landscape usages (hair, etc.)
* Fixed LandscapeNaniteComponent not being attached to the root component (and the mesh being exported in world space coordinates), leading to it not following when moving the  actor
* Added NaniteLODIndex property in ALandscape to be able to tweak the LOD level used when generating the Nanite meshes. It's mostly a debug feature to test the LODLevel > 0 landscape mesh export and to accelerate the Nanite landscape mesh generation since you usually want Nanite to be the most defined mesh possible
* All Nanite landscape meshes will be auto-invalidated by this change

#rb roey.borsteinas, graham.wihlidal
#preflight 6365e2a2882365b8590525ac
#lockdown marc.audy

[CL 23069843 by jonathan bard in ue5-main branch]
2022-11-09 21:04:18 -05:00
jeremy moore
76953fbb8e Use sampling that matches vertex interpolation when sampling per pixel height in landscape.
This fixes the mismatch between rendering landscape to RVT with a single quad and with a high LOD mesh.

[CL 23069485 by jeremy moore in ue5-main branch]
2022-11-09 20:55:49 -05:00
jonathan bard
ac5edb6a33 Fixed typos
#rb trivial
#preflight trivial
#rnx

[CL 23026065 by jonathan bard in ue5-main branch]
2022-11-08 06:18:04 -05:00
brandon dawson
c4a4e818d4 Remove access to SetWeightmapLayerAllocations when outside of the editor.
[REVIEW] [at]jonathan.bard
#preflight 63690fdd4d3c1d9d925807f3

[CL 23014317 by brandon dawson in ue5-main branch]
2022-11-07 13:33:00 -05:00
henrik karlsson
80a0aeccfe [Engine]
Removal of includes to reduce transitive includes in high traffic headers to reduce compile times
Highlights
* Skeleton and BonePose not leaked out of commonly used animation headers
* AudioComponent leaking out less
* Brush not leaking Level.h (Brush is included indirectly a lot)
* VertexStreamComponent moved to its own file so Components.h can include that instead of VertexFactory (which would leak out all of RHI and others)

#preflight 6365dd15c53af2f47f8d8c40
#rb none

[CL 23003402 by henrik karlsson in ue5-main branch]
2022-11-05 20:36:27 -04:00
bob tellez
0c4c6b808b #UE Expose a pointer to a landscape foliage type to garbage collection
[FYI] Jonathan.Bard
#rb Jonathan.Bard

[CL 22994776 by bob tellez in ue5-main branch]
2022-11-04 16:42:16 -04:00
henrik karlsson
d5026d4d83 Strategical submit which adds includes in preparation for coming change which removes includes in headers
#preflight 636531a1581dc906bce283d1
#rb none

[CL 22994620 by henrik karlsson in ue5-main branch]
2022-11-04 16:37:48 -04:00
jonathan bard
a3b9214d09 Added profile tag
#rb trivial
#preflight trivial

[CL 22983281 by jonathan bard in ue5-main branch]
2022-11-04 06:00:32 -04:00
jeremy moore
06c4ce76d4 Add option to sample landscape height per pixel when rendering to RVT.
When we do this we only need a single quad to render each landscape component subsection.
This reduces vertex shader cost which can sometimes dominate RVT rendering.
And it can remove the need to set difficult to understand landscape RVT LOD settings.
One downside is that bilinear texture map interpolation is different to triangle barycentric interpolation, so there is a subtle difference in extreme cases, but nothing visually bad. The difference will matter for VHM rendering though.

[CL 22968373 by jeremy moore in ue5-main branch]
2022-11-03 17:59:41 -04:00
henrik karlsson
fa90b399a4 Added includes for future change. This changelist only contains added #include and a couple of empty placeholder files
Tested compiling fortnite, unrealeditor, lyra, qagame with non-unity/pch

#preflight 63635997876630122adeab9f
#rb none

[CL 22958990 by henrik karlsson in ue5-main branch]
2022-11-03 14:18:47 -04:00
don boogert
e170a3179e Landscape : Dirty Landscape Actor packages on Water & Patch updates.
#rb jonathan.bird
#preflight 6362cdd2af536047f4f90f5c
#jira UE-165146
#jira UE-165147

[CL 22938003 by don boogert in ue5-main branch]
2022-11-02 23:08:23 -04:00
don boogert
52c1cb38a2 Landscape : Fixes for water usage from WorldPartition Commandlets.
* Guard against slate from being called when not initialized.
* Show message box if HLOD build commandlet process fails.

#rb jonathan.bard
#rb richard.malo
#preflight 6362c5c1522c8f7ab3504854

[CL 22937962 by don boogert in ue5-main branch]
2022-11-02 23:07:33 -04:00
chris tchou
6a80a1072b Fix for rare crash caused by calling UTexture2D::IsDefaultTexture() from a render thread
CI Test: https://horde.devtools.epicgames.com/job/635f5f25a27fb703befc351c

#rb jonathan.bard
#jira UE-162425
#preflight 635c6469e27df24a3f05c3f8

[CL 22917923 by chris tchou in ue5-main branch]
2022-11-02 11:45:01 -04:00
jeremy moore
6783f5ccf2 Add option to sample landscape height per pixel when rendering to RVT.
This is only the landscape setting. The code that applies the change will be submitted in a second pass to allow for shader recompilation warmup.

[CL 22890958 by jeremy moore in ue5-main branch]
2022-11-01 16:31:22 -04:00
chris tchou
7016d85cbc Fix for crashes involving Landscape paint undo/redo (second try)
Also ran CI to verify: https://horde.devtools.epicgames.com/job/635a2d420d3a231123b1c6ef

#rb jonathan.bard
#jira UE-136705, UE-160979, UE-165113, UE-141171
#preflight 635a1d8c8d56375d45d49921

[CL 22875448 by chris tchou in ue5-main branch]
2022-10-31 20:02:05 -04:00
brandon dawson
0a692cce88 Fix several crashes in the editor by removing FLandscapeComponentSceneProxy's direct usages of a UMaterialInterface on the render thread.
[REVIEW] [at]jonathan.bard
#preflight 635fd560e27df24a3f9ec52b

[CL 22875404 by brandon dawson in ue5-main branch]
2022-10-31 20:00:25 -04:00
graeme thornton
e7986ac620 [Backout] - CL22808749
[FYI] Steve.Robb
Original CL Desc
-----------------------------------------------------------------
TMap and TSet can now be declared as members with forward-declared key and value parameters.
KeyFuncs::KeyInitType and KeyFuncs::ElementInitType typedefs are no longer used and user-defined KeyFuncs do not need to provide them.  Deprecated placeholders for these typedefs exist though they may not be defined exactly as they were before.  A new KeyType typedef needs to be provided by custom KeyFuncs which don't already inherit from BaseKeyFuncs or TDefaultMapKeyFuncs.
KeyConstPointerType, KeyInitType, ValueInitType and ElementInitType typedefs have been deprecated across TMap, TSet and TSortedMap.  Regular C++ parameter-passing semantics should be used instead (const T& Ref or T Value, depending on T).
Added missing FSetElementId::operator!=().

[FYI] steve.robb
#rb james.hopkin
[FYI] henrik.karlsson
#preflight 635a56c15d49a96f7b31938f

[CL 22850782 by graeme thornton in ue5-main branch]
2022-10-29 02:59:59 -04:00