How to make a complex relief correctly

#1
I am suffering from a problem. For example, when I make an asteroid layer, I have parts of the terrain that are not docked. How can this be prevented ? Here is an example:
Без названия146_20220721190950.png
 

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Team Kolibri
Modder
TEAM HAWK
Atlas
Deja Vu
Under Pressure
Forum Legend
#2
Oh, you're trying to do your own terrain? Interesting.

There are several things to be careful about to avoid your problem.

The first thing to be aware of is that when the game generates the terrain, it maps the terrain you defined, and when it reaches the last point, it starts over with the first point. That way it repeats your terrain pattern until the planet is fully mapped. For this reason, there must be a continuity between the start and the end of your pattern, the same as if it was circular.

For example, if you have a look at the Perlin terrain file, you'll notice this at the beginning and at the end:
Screenshot_20220721-190125_QuickEdit+.jpg

...
Screenshot_20220721-190159_QuickEdit+.jpg


The first and the last point are exactly the same, precisely because of this.

Then the second point to be careful to is that to ensure continuity, the terrain pattern must be mapped an integer number of times around the planet. What you have to look at for this is the second parameter of the terrain formula in the planet file, here for Earth for the example:
Screenshot_20220721-190306_QuickEdit+.jpg


This parameter (19030.8016... for the first one for example) is the length over which will be mapped one occurrence of your pattern. It's took equal to the planet perimeter divided by an integer.

In the case of Earth, the perimeter is:
P = 2×π×radius = 1979203.37... meters

If you check, you have:
19030.8016... = P / 104
2452.544... = P / 807
1319.468... = P / 1500

It means that the Perlin terrain is mapped 104, 807, and 1500 times over the planet in each case. If you follow the same principle you should have no problem.
 
#3
Oh, you're trying to do your own terrain? Interesting.

There are several things to be careful about to avoid your problem.

The first thing to be aware of is that when the game generates the terrain, it maps the terrain you defined, and when it reaches the last point, it starts over with the first point. That way it repeats your terrain pattern until the planet is fully mapped. For this reason, there must be a continuity between the start and the end of your pattern, the same as if it was circular.

For example, if you have a look at the Perlin terrain file, you'll notice this at the beginning and at the end:
View attachment 87157
...
View attachment 87155

The first and the last point are exactly the same, precisely because of this.

Затем, второй момент, на который следует обратить внимание, заключается в том, что для обеспечения непрерывности шаблон местности должен быть нанесен на карту целое число раз вокруг планеты. Для этого вам нужно обратить внимание на второй параметр формулы ландшафта в файле планеты, здесь, например, для Земли:
View attachment 87156

Этот параметр (например, 19030.8016... для первого) представляет собой длину, на которую будет отображено одно вхождение вашего шаблона. Он был равен периметру планеты, деленному на целое число.

В случае Земли периметр равен:
P = 2×π×радиус = 1979203,37... метра

Если вы проверите, у вас есть:
19030,8016... = Р/104
2452,544... = Р/807
1319,468... = Р/1500

Это означает, что местонахождение Перлина исхода на карте 104, 807 и 1500 раз по всей планете в каждом случае. Если вы будете следовать тому же принципу, у вас не должно быть проблем.
thank you