Description

ATM, ULandscapeHeighfieldCollisionComponent's scene proxy is created all the time, although it's only used for displaying collisions when Collisions mode is on. The scene proxies pre-allocate a very large vertex buffer to do so, which is by and large redundant data with the ULandscapeHeighfieldCollisionComponent's data and is only needed for debug display.
For very large landscape, it can be both a performance and a memory problem issue since we regenerate the scene proxies any time a CVar changes.
We need to :

  1. Not allocate scene proxies (or their internal vertex buffers, depending on what's the simplest) when Collisions mode is off
  2. Regenerate that data when Collisions is turned on
  3. Add a EHeightfieldSource::None case to EHeightfieldSource, that would purposefully not show the heighfield (this will allow users to deliberately hide the landscape collisions for performance and/or readability issue) (but keep the default value set EHeighfieldSource::Simple so that by default, landscape collision is displayed)

[Link Removed]case where this was reported 

Steps to Reproduce

Load a map with a large landscape

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-169387 in the post.

1
Login to Vote

Fixed
ComponentUE - LD & Modeling - Terrain - Landscape
Affects Versions5.1
Target Fix5.1.1
Fix Commit23342421
Main Commit23359761
CreatedNov 7, 2022
ResolvedNov 30, 2022
UpdatedFeb 4, 2023
View Jira Issue