Space Engineers

Space Engineers

282 ratings
Seams Fixed (Map Tile Edge + Misaligned Lake Fix)
6
2
3
2
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod category: Planet
Tags: NoScripts
File Size
Posted
Updated
273.957 MB
12 Apr, 2023 @ 4:05pm
13 Sep @ 6:20am
8 Change Notes ( view )

Subscribe to download
Seams Fixed (Map Tile Edge + Misaligned Lake Fix)

Description
TL;DR

This mod fixes the edge alignment of the height maps of all planets and moons except Pertam to avoid glitches.
It also fixes misaligned lakes on Earthlike and Alien.

If you want the planet files fixed officially please upvote this ticket:
https://support.keenswh.com/spaceengineers/pc/topic/28675-please-consider-fixing-the-planet-height-maps
Update: We reached the required 50 votes within the 3 month limit. Thanks to anyone who voted. Feel free to vote it up even more.

What files were changed?

The mod replaces the height map png files in the Data\PlanetDataFiles\ folders. The names of the files are up.png, down.png, left.png and so on. I changed the edge pixels of these files so they align up properly in-game.
The mod also replaces the up_mat.png in the EarthLike and Alien subfolder. This file fixes the alignment issue with the lakes.
To avoid the Triton black sky bug this mod also includes the required texture files for Triton.

Why was this change necessary?

Just look at the comparison pictures and video footage I provided. The devs somehow screwed up to align the edges of the 6 map tiles properly. The game expects adjacent pixels of two map tiles to have equal values, so that they overlap by one pixel. Otherwise there will be a noticeable jump in the terrain. Maybe some of their artists don't know about this.

Why not Pertam?

They cheated! Nearly all the terrain near the edges of Pertam is mirrored. That's one way to make sure the glitch doesn't happen. The other edges that weren't mirrored don't have the glitch. Good job Keen!

Mod Compatibility

This mod is not compatible with other mods that change the planet data files in the Data\PlanetDataFiles directory. These are for example mods that change the ore distribution. After analysis I found that the game always loads the material maps from the same folder as the height maps. The responsible class is "Sandbox.Engine.Voxels.Planet.MyPlanetTextureMapProvider". Only one mod context can be assigned to this class at a time and it is used to determine the location of the height and material maps. As far as I know there is no way around this.

Mods confirmed to work with this mod:
- Smooth Voxels
- Better Stone

Mods confirmed to NOT work with this mod:
- Industrial Overhaul (changes ore map)

This mod already includes the files of my Lake Fix Mod:
https://gtm.steamproxy.vip/workshop/filedetails/?id=2905788214
Do not load that mod with this one.

Installation

Add this mod as usual and put it first in the mod list so other mods can load after it. In the game and the official server manager this means the mod should appear on top of the list.

To check if the mod was applied please visit these coordinates and look around:
GPS:Wall near glitched lake:-41673.11:41666.3:-18950.74:#FFF17575:
It's the location on Earth I show in the video and the first before/after images.

If you never play online or multiplayer and want the terrain files fixed without having to install this mod every time, you could do the following. I don't recommend it though:
Create a new game with the mod so it gets downloaded. Find your Steam installation folder. For this example I'm going to assume "C:\Steam". Copy the content of folder "C:\Steam\steamapps\workshop\content\244850\2961563719\Data" to "C:\Steam\steamapps\common\SpaceEngineers\Content\Data" and override the files. Just be aware you cannot play online with modified game files.

How did I fix the terrain files?

Math! I took the 5 edge pixels of each side of two adjacent tiles, 10 in total. From these I ignored the 2 edge pixels in the middle. Using the remaining 8 pixels I calculated the 4th degree polynomial regression of these points. Then I reconstructed the ignored points by using the output of the regression. The remaining pixels were also slightly adjusted to blend with the regression curve and the original terrain.

The used code is on my github: https://github.com/michi84o/SpaceEngineersTools/blob/master/PlanetCreator/PlanetCreator/EdgeFixer.cs

Fixing custom planets from mods

If you want to fix other planet files, you can download a compiled version of the code here:
Only works with files of 2048x2048 pixels!
https://github.com/michi84o/SpaceEngineersTools/releases/tag/v1.0
Unpack the SpaceEngineersTools_v1.0.zip and start "HeightMapEdgeFixer.exe" in the Planet Tools folder. Select one of the height map files in the target folder and the files will be rewritten with the fix applied.

Misaligned lake fix
4 Lakes in the northern parts of Earthlike and Alien were misaligned. This mod fixes the material map. There are 3 additional lakes that seem to be misplaced because the area is not flat and therefore they don't spawn properly. These 3 are not changed by this mod. If you want to check out these lakes yourself, the GPS coordinates for the lakes are:

GPS:Glitch Lake Bottom Left:35070.06:47237.83:-19203.93:#FF75C9F1:
GPS:Glitch Lake Left Middle:40819.51:45767.68:-3585.16:#FF75C9F1:
GPS:Glitch Lake Middle Right:-37409.74:47180.62:11498.52:#FF75C9F1:
GPS:Glitch Lake Right Bottom 1:-41624.53:41625.29:-16999.07:#FF75C9F1:
GPS:Glitch Lake Right Bottom 2:-31830.91:41751.28:-31546.33:#FF75C9F1:
GPS:Glitch Lake Top Left:32358.57:42274.08:30280.47:#FF75C9F1:
GPS:Glitch Lake Top Right:-34184.43:40847.61:31221.33:#FF75C9F1:
84 Comments
michi84o  [author] 25 Sep @ 1:39pm 
Strange.
In this mod the PlanetGeneratorDefinitions.sbc is identical to the original after the Apex update. I only left out Pertam because I didn't change anything on that planet.
The material map PNG files seem to be identical to the old files before the update and this mod only replaces the up_mat.png (north pole region) on Earth and Alien to fix the lake positions. The rest is just a replacement of the height maps.
Orixus The Paladin 13 Sep @ 4:38pm 
Given that Apex Survival changes the mapping of the planets, this mod might need to be revised. I can't seem to find the forage spawns with this on for the Alien Planet that are part of the terrain mapping.
michi84o  [author] 14 Feb @ 3:09am 
Log errors about missing files are a known SE bug. Even if I include those files the messages still pop up. Game will load the "missing" files from the original installation folder.
jarhead 12 Feb @ 4:18pm 
missing resources (set to null)
michi84o  [author] 31 Mar, 2024 @ 9:03pm 
Released a new version. Now with seamless climate zones and biomes:
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3208450613
Made it a separate mod because it is less compatible to other mods than this one.
Azulberry 23 Jul, 2023 @ 11:25am 
This is very good, however the seam you spawn at in creative on star system is still kinda there. It's still massively better that without the mod but there is still a wall right where you spawn
michi84o  [author] 8 Jul, 2023 @ 5:30am 
Update:
If people want water they shall get it. Re-added the 3 removed lakes.
michi84o  [author] 7 Jul, 2023 @ 2:54pm 
This is for all vanilla planets and affects all game modes.
All SE planets are defined by some png images and a definition sbc. The errors I fixed can be found in the png files. So it affects all star systems that use the vanilla planets.

If you want to encounter the issue immediately just start a new custom game, choose Star System and use creative mode. The only spawn option will be Space Suit. If you spawn it will put you directly at a location where 3 of the edges meet:
GPS:Zero Spawn:-36698.25:-36704.28:-36699.82:#FF75C9F1:
Zombie 7 Jul, 2023 @ 5:19am 
hmmm...I have never seen that issue before. Is this for a specific map/scenario?
michi84o  [author] 5 Jul, 2023 @ 2:44pm 
For the top left lake I agree. That one looks like an old lake bed where the ground shifted over time. I'll probably add it back with the next update.
The two other ones are on really rough terrain but I can look into it.