Space Engineers

Space Engineers

276 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
274.029 MB
12 Apr, 2023 @ 4:05pm
29 Dec, 2024 @ 5:32am
7 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://steamproxy.com/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:
80 Comments
michi84o  [author] 31 Mar, 2024 @ 9:03pm 
Released a new version. Now with seamless climate zones and biomes:
https://steamproxy.com/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.
Electric Vanilla 4 Jul, 2023 @ 8:29am 
some of those lakes are actually accurate to what a real life counterpart is, they are just in a dry period, like how some of the water seeped into the ground rather than pooled on the surface, especially if its a rocky surface with a lot of rocks

but the ones at the seams, you got perfectly correct, chef's kiss, splendid
Titan Nya 23 Jun, 2023 @ 10:55am 
Well... changing the order made it work... until I gone back toward my starter base and saw a boulder... So copy pasted your mod into my mod fix folder mod and overwrote the no boulder PlanetGeneratorDefinitions.sbc and so far it seems to have worked. no idea why changing the order only make one work as logically it should be either one (1rst in the load order or last in the load order (probably the later)) but keens mod logic is probably not the best... no idea though! anyway gonna unsub to not double it in the futur, edited my txt file to remember and come back here in the futur to check for update if I think to check...
Titan Nya 22 Jun, 2023 @ 1:32pm 
Wait... It's just the order that will need to change as your PlanetGeneratorDefinitions.sbc is the vanilla one except the tutorial planet (maybe delete from here if not needed?)
Titan Nya 22 Jun, 2023 @ 1:15pm 
Going around to recycle a ship and came across a seam so a quick search into the mod folder and I found what the NoBoulder mod (https://steamproxy.com/sharedfiles/filedetails/?id=2791424205) change PlanetGeneratorDefinitions.sbc also so... yeah gonna copy this file and made the noboulder change into your for my local modfix... Pretty quick fix on my side :p (That's the extend of modding I can do, copy paste other people change and/or comment some to disable a check or smth)

Anyway great mod and upvoted the ticket