How do you regenerate the Landscape Collision, as its not matching the terrain

Hello, I Created my Open world Landscape through importing of Height-maps for the terrain, it uses the World Partition Component for automatically streaming the tiles.

The Problem is that when I had modified the landscape to improve the shape, detail, it has left the collision offset, as when I test play the scene, my character will suddenly climb up invisible ramps and hit invisible walls, How do I rest these colliders to match my modified Landscape. Is there a simple way to re-bake the Collision on my Landscape, and anytime I make up extensive modifications, that I could just re-bake to match up the collision?

I have made a few searches on the forums on similar issues that other people had experienced however the fixes I hear about, include ideas such as duplicating the terrain then deleting the old one for it to recreate the colliders matching the second terrain. I think another one was to copy the terrain to a new fresh scene.

However as this is not a single landscape and is an open world using World Partition, I am wondering what would be the best method to re-bake the colliders for all of the tiles, like as it had been when I first imported the terrain but to match the improvements of the terrain.

I have been all over the settings trying to figure what could be done to correct this issue, even looked into the Bake menu, but I am not sure what and if any of those Commands would correct the Landscape Terrain Colliders.

So how would I be able to correct this and synchronize those colliders with the Terrain?
And hopefully without having to re-apply the Vegetation etc.

Please let me know what there is that I could do and if there is an easy setting or function to correct this issue. As I am using the UE 5, most of those other articles related to UE4 so I have no idea on if this may have a easy fix by now, that I may not be aware of.

1 Like

I have also been getting this Warning when I switch to any of the other view windows in the editor when in Landscape mode it will show this warning “Landscape Physical Material Needs to be Rebuild (424 Objects)”
And after researching on this I saw someone had suggested to load up all cells in World Partition, and then on the build menu, select “Build all Levels” which also wanted to save everything first. But when I tried, and its log went through, It crashed Unreal eventually, Once I returned and tested, the problem above was still there, unchanged.

As I view in the “Player Collision”, its still unresolved with colliders where they should not be.
What else could I try to resolve this issue?

2 Likes

I have the exact same issue using UE5.1.1
Landscape in World Partition, using Nanite Landscape

2 Likes

I have had the same issue for a few months now. I had brief luck exporting the landscape as heightmap, and then reimporting it to create a new landscape, but the mismatch between visual terrain and the collision returned. And, you lose your paint.

For me, it shows the terrain in the editor where the collision actually is. But, when I run the game, it displays some older version of the landscape, while the collisions are still where they are in the editor. This results in landscape grass objects floating above the terrain.

Anyone have a fix for this?

1 Like

You can export and re-import that as well.

Try deleting (after checking what to exactly, dont blame me for loss of data) your saved folder stuff so that the engine is forced to re-generate all the files for the project to run.

I sort of wish they’d finally add a built in “clean solution” button like all major editors have, so one wouldnt have to go manually deleting folders and such…

If that doesn’t fix it, then there is some other issue going on that’s causing the missmatch.

If using Nanite - which is still around Alpha so you shpuldnt be using it except for testing - the missmatch is fairly normal apparently.

Fixed most of the issue by
1: Go to landscape->sculpt->edit layers → setting alpha to an arbitrary negative number, an then back to 1
2: either use forcelod 0, or set the landscape’s max LOD to 0

I still have floating landscape grass though so I’m sure there’s some lod setting in the RVT

Depends on how its floating.

A few parts of a few meshes could be normal.

A bunch of grass meshes suddenly being nowhere near the landscape is not - and it is usually a symptom of having moved the landscape from its original position.

Try and force your grass map to recalculate (paint sone grass) to see if it resolves.

If it does not, then you need to go back to 0 and avoid moving the landscape in the first place.
They removed the funcrions that were used to reset the value so you are sol thanks to Epic…

I know this Is A bit late but I found a solution that worked fine for me Im a bit new to unreal myself and was sculpting my landscape I made with Gaea. but from what I did all you need to is go to the landscape editor mode, select manage go to the second to last Icon and hit the one that says “Resize” dont change any of the settings and just hit apply hopes this helps anyone else out there :call_me_hand:

Guess this thread had degenerated already.

The answer to the question in the titile is:
Sculpt anything else on that landscape component and the collision will get updated.
You can grab the retopologize tool and run jt across the whole landscape with minimal damage and force an update, for instance.

1 Like

I am in 5.4.2 and Retopo tool says it doesn’t support layers :confused:

That’s good to know.

You can try a smooth brush set to 0%.
Even just clicking should cause the component to reset the collision…

That’s what I tried when I saw retopo brush isn’t going to work. Still, no dice.
Worth noting that I turned down LOD to 3, so visually it’s less complex than with LOD set to 1 (or 0, whatever was the original value). I also set collision mip to 3 and the next one (simple collision?) also to 3. It made collisions more inline with the visual representation of the landscape, but still somewhat off (player either ends up inside landscape or hovering over it).

Could very well be that wither the engine you are on is bugged, or that the specific terrain fails to generate correctly due to some obscure reason/dependancy or misconfiguration.

Make sure the scale of the landacape is 100x100 x/y.

Make sure the # of components makes sense and is divisible by 2.

Last thing to try would be to:
Export the heightmap and layer data for the landscape.
Then
Create a new level in which you create a new landscape, directly off the exported files.

Assuming the freshly created one has OK collision, then save it, and just replace the landscape in the original level with it.

If the exported files produce the same incorrect collision results, then the issue is far more likely to be whatver engine version you are on and whatver was bugged by the dev team.

Considering the changes and Nanite, its very possible that they introduced bugs… or that you have it set to process in nanite and its not working as intended.

This is what I am up against:

image

Well, thats a bit different.

Its not really supposed to work with anything but LOD0 in terms of precision.

If you have performance issues, the way to solve it is to use meshes instead of the landscape.

If you want lod whatver just because it looks better, then you could potentially output 0 to 1 based on Z of WPO in the material, and screencapture2d it in orthographic view to get the right heightmap to use…

Or, you can setup a smaller landscape with smaller/less compoents…

Basically I need for Landscape to be low resolution, so to speak, at LOD0. I am not sure how i can do this from heightmap - it always seems to get generated at full resolution.

Meshes are great, but at 100 km^2 it needs to be modular and that creates another set of unsolvable challenges. In fact, that’s what i already have, but because of those issues with meshes i am looking into Landscape.

No, thats the wrong idea.

First of all. You are using an engine version that does not support large world, so forget about 100km.
You’d be lucky to reach 8km - and still probably get sub 30fps with that (landscape wise).

Second of all, the way to achieve it is by using meshes, not the landacape.

You have to section meshes off correctly.
Dynamically, and intelligently.

Using meshes also provides more control over looks, since you can merge meshes into one another instead of having seams/breaks along the road.

The second obvious improvement is that your meshes will be exact and analytical.
You won’t be bound by the number of tris, or have to maintain a static grid of tris for LOD0 any longer.
That’s particularly beneficial in desert areas (which seems to be your case).
A flat plane has 2 tris, regadless of size.
A landscape has 2tris to evey meter.

you likely aren’t tris locked, gpu wise, but it still somewhat matters. Less tris on the base = more objects with more detail you can add.

On sectioning meshes off here are some options.

  • A. Go with a total number of tris per mesh regadless of size. Pick a number, say 5k tris, and section things off in a whay that makes sense so that every piece has a consitent count.
  • B. Go with sizing. Each piece covers X square meters. This is similar to the components within the landscape, but I wouldn’t go over say 500m^2 per component.
  • C. Go with what makes most sense occlusion wise. A circular area would be split into pizza slices. For instance.

Once you have the base, youll likely find that you are drowning in drawcalls when you render the whole landacape.
This is normal.
You need to create HLOD replacements that aggregate the landscape.

An alternative to the HLOD is to mesh merge at runtime based on character position.
Its fast enough that it works fine. Its however far more complex than just baking presets.

Another less effective option could be to toss all the terrains static meshes into an HISMC.
This will provide a cost reduction to the shader because of instancing, but it will preclude Hlods, acor merge, and runtime merge.

However, works ok for water with far more tris than what a landscape would call for, so in a pinch it could perform OK on a landscape too (if you ignore the fact its got bo nanite).

Also, because you are on an engine version where Nanite is a thing…
Chanches are you may not need to aggregate the meahes into HLODs at all. In theory (and remeber its a bad product in an alpha stage) Nanite should handle that for you when you set the terrain meshes to be part of it.

Downsides of meshes you have to work around:
No grass node.
No in editor sculpt.
No inneditor layer paint.

Best tool to use for developing is probably going to be houdini.
I bet that by now it even offers scripts or AI powered terrain segmentation…

Las thing to note.
You do need to make your own UCX colliders for the landscape to work as a mesh.
do not use complex as simple.
If you want to know why, look up what Ark Meshing is to see what happens when your developers are a bunch of shortcut taking idiots (who can’t be bothered to fix any bug in however many years of updates) :wink:.

Thanks for lengthy reply :slight_smile:

I already have mesh terrain working without any crazy analytical tricks. It’s 100 km^2 (10 km x 10 km) with complex collisions. It works great, except there are seams between terrain tiles: #124475 - Custom vertex normals do not get exported into FBX correctly - blender - Blender Projects Not sure if it’s Blender’s issue or UE issue. That’s why I decided to try Landscape.
In fact, I finally got Landscape of the same size working even better than meshes. Looks lesser detailed, but still good enough. Performance is better than with meshes too.
In the Editor, collisions look fine. However, on the device, they are wrong for some reason :frowning:

LOD0 in Editor:


In-game (on the device):

As you can see, yellow reticle either hovers over visual landscape or sinks in it, even though collisions match visual in the Editor.

With just about any system, you have 0 guarantee that an objext fuether than your camera will be at lod0.
Thats likely the problem in a nutshell.

You either have to adjust LODs size on screen so that a worse case scenario (you sit right at the middle of a component and look across into another one or at the corner where another 3 meet - the corner one of which will oikely be the smallest size on screen) is still LOD0 and loose out on performance - which works in any case - or you have to ditch the LODs entierly.

With landacape, if you insist, you can maybe try to manually bump up the componet to lod 0 based on a sweep from the actor.
Make a cone that matches the camera fov, set the distance of it to the max of your gameplay element.
Then, detect the landacape components in a sweep collision using that cone.
Force every component in that cone to LOD0.
Should work, but likely you need to do it in c++ for deeper access to the landacape in order to override the LOD.

Idially you do this in a camera matching sweep so that the player doesn’t see the lods pop.

The further out you need somerhing in a desert area to be lod/collision accurate, the better the model has to be.
You can’t cover it up with bushes or hide it out in any way, so maybe even no LODs at all could be a thing…

Hi, in case anyone reads this, selecting Resize without changing anything and then pressing Apply simply causes the terrain to no longer be nanite and then the collision is accurate. When you rebuild data, the issue comes back. I will continue to look for other solutions.