Jump to content

Many questions on Sandworm and Landscape


photo

Recommended Posts

Posted (edited)

Hello,

Today is about terrain generation.

I have been following sandworm and terrain tutorials lately, to understand what's going on under the hood. My goal was to understand the process, in the hope of finding ways to make it optimal or to be able to edit existing landscapes. So for starter I made two layers of my least favorite city, a large square at low resolution, and a more detailed shape (in the middle) with higher resolution (at zoom 15).

 

image.thumb.png.47238b5919b3ed509f4bf558d3766dc3.png

This generates what I would expect. I haven't yet found ways to get elevation for this place, but no matter.

image.png.bc5401bb419737b965fe2bcc815b4e61.png

First problem. I dared to use the button "Reimport Data", after modifying the name of the layer. Not sure, what I was expecting, but not this:

image.png.c4133b329509ce04403b8230ce31a1af.png

Couldn't retrieve back my albedo texture. Why does Reimport data break the link with the texture ? Is the texture considered to be manual modification ?

And now a barrage of questions, that might have been answered somewhere else:

  1. Once a terrain layer map is generated, there is no way to change anything in the Sandworm project without losing manual modifications ?
  2. Is there any way to export a terrain layer map into textures ? 
  3. In Sandworm, is there any way to create of grid of terrain tiles instead of one big square to adapt to the shape we're drawing ?
  4. Is there any way to subdivide a terrain layer map into multiple subtiles ?
  5. Are the names of the generated assets important in any way ? Is is safe to rename them ? No hardcoded link, no reliance on naming conventions ?
  6. I followed the step 3 of Sandworm tutorial and tried to generate both traffic lights and fences at the same time. However, it seems only the first node is used for all points:

Let's give an example. Look at these rails, created based on an Open Street map vector with the fence node, from the template.

image.png.eeb6f952c7ab19d6703dbc078a512c0a.png

Here is the sandworm points:

image.png.b88b6f9dd18edde7a1da3bb9c22992ce.png

Now, Rails point to the fence node. TrafficLights use the same exact data, but is generated on traffic lights. If i enable only these traffic lights:

image.png.16f4f971b9a8caedb71e2793606491ff.png

Everything's fine, for now. But let's enable both of them.
image.png.8a653e486a3cecbc0c450c74100560b6.png

My fence has been replaced with the tower. I suppose it's a bug ? I realize that in the tutorial you replace the created fences point with the light object. Was it to hide the bug ?

To be honest, I'm a little disappointed. I really wished I could use the Points to to some PCG :(

Of course I suppose I could code some plugin to do some of these operations, but I wanted to know if we had available tools to do any of these things.

To give you the context, we try to have very high resolution elevation map, but on an area which, if not tiled, covers 32 square kilometers. Which creates enormous landscape files.

 

Edited by K.Wagrez
Posted

Hello Kevin,

Thank you for the detailed description and for sharing your experiments — this is very helpful and we really appreciate the time you put into exploring Sandworm in depth.

About Reimport Data

The Reimport Data button is intended for a very specific workflow. It is designed to update a Landscape Layer Map that was created by directly referencing source files via the Parameters → Data Filing → From Tileset mode. In that case, it simply reloads changes made to the original source files in a third-party application or restores the layer map to its original state.

However, when Sandworm generates a landscape it internally works with cached data. This cached data is derived from the same source files but it is reprojected according to the projection settings defined during the configuration stage. As a result, the generated Landscape Layer Map is treated as a manual asset. When Reimport Data is used in this scenario it breaks the connection and effectively overwrites the generated data which explains why the albedo texture could not be restored.

We agree that this behavior is not obvious from the UI. Most likely, the Reimport Data button should be disabled or clearly indicated as unsafe for generated layers since using it in this context will always invalidate the generated data without any recovery options.

Now, let’s go through your other questions one by one.

1) Yes, that’s correct. If you want to preserve manual edits you should create a separate Landscape Layer Map manually from the UNIGINE Editor UI and blend it with the generated layers. This approach allows you to regenerate the Sandworm project later without losing your manual modifications.

2) At the moment, this is not possible. All terrain data is stored in the proprietary .lmap format. That said, this is a very reasonable request and we agree it would be a useful feature.

3 & 4) Currently, Sandworm does not support splitting generated terrain into tiles or generating a grid of terrain tiles based on the drawn shape. Sandworm processes terrain data “as is” and merges source tiles together when they have the same or very similar resolution.

5) The names of generated assets are not important. Once the data is processed it is no longer linked to the original source files or to Sandworm itself. There are no hardcoded dependencies or naming conventions, so you can safely rename the assets as needed.

6) Thank you for describing this case in detail — this does sound like something that needs to be verified. Could you please share the exact tutorial link and, if possible, the timestamp of the step you are referring to? Also, which SDK version are you currently using? We’ll forward this information to our QA team to double-check the behavior.

Regarding your final note about large terrains:

23 hours ago, K.Wagrez said:

To give you the context, we try to have very high resolution elevation map, but on an area which, if not tiled, covers 32 square kilometers. Which creates enormous landscape files.

By “enormous” do you mean the file size the number of files or both? If you can share approximate numbers, that would help a lot.

Also, could you clarify why splitting the area into tiles is necessary in your case? Internally, the Landscape Terrain system already works with tiled data. It decomposes terrain that is too large to fit entirely into GPU memory into smaller rectangular tiles and streams them asynchronously. This allows only the necessary data to be rendered at full detail regardless of camera position or even the number of cameras. In practice, a single Landscape Terrain object can handle areas up to 10,000 × 10,000 km. Additionally, .lmap assets can be compressed significantly — often by several times and in some cases with compression ratios exceeding 100:1.

Thanks!

Posted

Thanks for your very detailed answer @bmyagkov !

So for 6), I was looking at this tutorial
UNIGINE Georeferenced Terrain Generation Using Sandworm, Part 3/6: Objects and Infrastructure

timestamp is 9:36. I'm using Unigine 2.19.1.2. 

For large terrains:

Well, it's not as enormous as you might expect (4 gigabytes, for one layer map). It might be overkill, but I have a situation where clearly we didn't need a 32x32 kilometers for the area we were targeting, so I was looking for ways to explode this in multiple sub-areas. I was waiting for your answers before tinkering with compression, because I was treading on thin ice in manipulating our layers.

By the way, can there be problems when generating new layers on an existing landscape object with a new sandworm project ?

I've tried generating new layers for a terrain we already created, and I found a weird difference in scale (for the same locations). I was sure the terrain had been generated by Sandworm, is there any way to control the scale of the generated content from sandworm ? Could that be a difference of projection ?

 

Posted
44 minutes ago, K.Wagrez said:

Well, it's not as enormous as you might expect (4 gigabytes, for one layer map). It might be overkill, but I have a situation where clearly we didn't need a 32x32 kilometers for the area we were targeting

Thanks for the additional details — that helps clarify the situation a lot.

Could you elaborate a bit on what exactly is causing the problem for you here? From a runtime perspective, Landscape Terrain only loads into memory the data that is currently visible on screen, so even very large terrains do not result in excessive memory usage.

If the main concern is disk size, compression should address this quite effectively. Because of that, slicing a terrain into smaller chunks usually does not provide much practical benefit and can even complicate the workflow.

That said, if your goal is to generate only a specific portion of a larger area, you can limit the processed region using the Export Area tab by explicitly defining the boundaries of the area you actually need.

It’s also important to mention two closely related concepts here: Projection and Origin.

  • Projection defines the geometric distortions introduced by the selected map projection.
  • Origin defines the reference point used during reprojection.

By default, Origin is calculated automatically. In this mode, Sandworm selects a geographic reference point based on the input data sources and reprojects all generated data relative to that point.

If you intend to generate an area in multiple smaller chunks, the Origin must always be set explicitly and consistently. To do this, disable “Calculate Origin Automatically” and manually specify the same origin value for all generations.

If separate areas are generated using different Origin values, the resulting data will be reprojected relative to different reference points. In that case, combining these areas later can lead to apparent mismatches in scale or position — which is likely the difference you observed.

Also, please make sure that the same projection is used consistently when generating layers for the same landscape. Mixing different projections will inevitably lead to visible inconsistencies, even for identical locations.

So yes, what you are seeing can absolutely be related to projection and origin settings rather than an actual issue with terrain scale itself.

1 hour ago, K.Wagrez said:

By the way, can there be problems when generating new layers on an existing landscape object with a new sandworm project ?

We generally recommend using separate worlds for generating new terrain sections, even if the same .sworm project file is used. If you try to generate multiple projects in the same world, any existing data in that world will be overwritten by the new generation, which can lead to loss of previous layers.

Using separate worlds ensures that each generation is independent, while still allowing you to use the same Sandworm project file across them. This approach helps preserve your existing work and avoid accidental data loss.

Thanks!

  • Thanks 1
×
×
  • Create New...