Client-side Environment Item (e.g. tree) LOD issue

Benjamin Peddell shared this bug 50 days ago
Reported

Environment items (trees, boulders, and bushes) do not seem to be getting properly generated in the Space Engineers client for higher LODs.

On both Dedicated and non-dedicated servers, this exhibits itself in invisible trees after crossing two LodLevel 2 edges (generally about 1-2km in a cardinal direction if near the equator), where reconnecting makes those trees visible.

In single-player, it exhibits itself in a marked reduction in tree density after crossing two LodLevel 2 edges until saving and reloading the game. If you have gone into that apparently lower density area, if you are unlucky you might find your grid impaled by a tree on reload.

Given the following GPS coordinates in the Sandbox -> Solar System startup:

  • GPS:Start:-44387.7465297617:15994.9497219518:-38791.0212380771:#FF75C9F1:
  • GPS:Checkpoint:-44968.6532412627:16392.3996712483:-37963.6171881865:#FF75C9F1:
  • GPS:Go Here:-45026.4492578495:16417.2637329288:-37885.3872443952:#FF75C9F1:

Steps:

  • Spawn a buggy at "Start", facing towards "Go Here"
  • Save and reload (or if on a dedicated or non-dedicated server, reconnect)
  • Drive towards "Go Here", making sure to go through "Checkpoint". If in single-player, stop at "Checkpoint"
  • If on server, attempt to get to "Go Here". Unless you are lucky, you will run into a couple of invisible trees.
  • Save and reload (or if on server, reconnect)
  • You will find a couple of trees where previously there appeared to be a gap.

96738f4227801f252704b30cf2c41a82

4f202a661793cc9bd1d7b100e2638372

Replies (4)

photo
2

It appears that this was introduced in 1.196


Looking at the environment sector where the above invisible trees are in:

  • When loaded at LodLevel 2, items 0 through 19 are generated
  • When loaded at LodLevel 1, items 0 through 38 are generated
  • When loaded at LodLevel 0, items 0 through 57 are generated
  • When switching from LodLevel 2 to LodLevel 1, items 20 through 30 are generated (this should be items 20 through 38)
  • When switching from LodLevel 1 to LodLevel 0 when the sector has 31 items, items 39 through 49 are generated and put in slots 31 through 41
  • When switching from LodLevel 1 to LodLevel 0 when the sector has 39 items, items 39 through 48 are generated (this should be items 39 through 57)

photo
1

Correction: the single-player side of this has been present since 1.190, but with the server optimizations in 1.196 the discrepancy was exposed in the form of invisible trees.

photo
1

Hello,


Thank you for the detailed report of the issue, it definitely helped understanding and reproducing it. I reported it into our system and it will be forwarded to our dev team for investigation.


We will change the status of this topic and inform you about its progress here as soon as we have new information.


Kind Regards

Keen Software House: QA Department

photo
2

The IL patch in this client-side plugin fixes this:

https://github.com/klightspeed/FixMissingTreesPlugin/blob/05fc465b59b5e6fe8038617813cbfcb8b379d737/FixMissingTreesPlugin/Patch_MyProceduralLogicalSector_ScanItems.cs


Basically:

-            array[num4 - targetLod] = num3 + m_totalSpawned;
+            array[num4 - targetLod] = num3;

Leave a Comment
 
Attach a file