Topic: Terrain Layer Generation

Hi there,
I am trying to generate terrain layers and it is very buggy. I understand that this ferature is in beta. I will do my best to describe what is happening.

I am generating a park in Toronto, Canada called High Park as a test. I am generating a square area containing the park into 4x4 (16) terrains. I am attempting to set up a few layers in the 'Textures' section of the generation window (Figure 1). Upon pressing Start, it will create the terrains and apply the heightmaps. Upon attempting to texture the terrains, an Index Out Of Range error is returned and the texturing process halted (Figure 2).

I then tried different ways to "force" RWT to generate the layers. Despite RWT saying that "Important: you can specify materials only for new terrains..." (not sure what this means?), each terrain can be selected and "Regenerate Textures" selected from the "Real World Terrain Item" component attached to the terrains. From here, a base layer and some Layer rules can be applied to each terrain one-by-one.

Generally, adding a base layer and creating layers for applying rules for Building, Water, and Waterway map data worked ok when regenerating the texture of each terrain one-by-one (except for an artifact in the top right corner, Figure 3).

Aside from the map data layers mentioned above, which map data rules apply to which terrain is very inconsistent. Road data never generated a layer, only returning the index-out-of-range error seen in Figure 2. Certain landuse types also returned this error, including the type "Park" which is the type for >90% of the park area.

The landuse type "Wood" is present in most of the park so I tried to generate this as well. It generates a terrain layer for only one terrain of the 16 (Figure 4, darker brown area), despite the data existing for other terrain areas (screenshot of Mapbox data in Figure 5, for reference).

It would be really helpful for my future production if this worked a bit better, but I expect this to take a bit of time. I hope this bug report helps. I am using the park to develop a demo in the meantime, so some manual painting of terrain texture layers is ok for now.

Thanks!!

Post's attachments

Attachment icon RWT Terrain Layers.zip 1.51 mb, 105 downloads since 2021-01-26 

Re: Terrain Layer Generation

Hello.

Thank you very much for such a detailed description of the problem.
I need some time to test and fix this.
I will get back to you with a solution to the problem within 1-2 days.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Terrain Layer Generation

Thank you!
Let me know if you need any other information.

Re: Terrain Layer Generation

I dug into the problem, and I want to tell you about the results.

About index-out-of-range in Figure 2:
The problem was that the tile had some kind of undeclared class in Landuse.
I tried to generate your area but didn't see this problem.
In any case, the problem has been fixed, and in the next version it will work correctly.
If you want to get the fix faster, email me (support@infinity-code.com) and I will send you the modified script.

About roads:
In the current version of RWT, only objects that have Geometry Type - Polygon are generated.
Roads mostly have Geometry Type - Line String and RWT just skips them.
I will try to add generation of line objects in the next version, and in theory it shouldn't be difficult.
But I foresee a problem with the width of the roads. This value is not present in the tile and will need to use the width based on the road type.

About materials for new terrains:
When I was developing this feature, Unity Terrain Engine had a strange bug that if TerrainLayers were specified when initially generating terrains, them was displayed correctly.
If I change the number of TerrainLayers during regeneration, then the new TerrainLayers were displayed correctly in the inspector, but not on the terrains.
Right now, this seems to work correctly, but I'll leave this message because at least I don't know which version of Unity Editor each user is using.

About artifact in the top right corner, Figure 3:
It looks as if one of the tiles was not downloaded for some reason (for example, a network or server error).

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Terrain Layer Generation

Thanks for looking into it!

I will send you an email for the script.

Thanks as well for the other insights. The road texturing is optional for me at the moment as I'll be using EasyRoads3D to put roads down next anyway. I can instead use ER3D's features to modify the terrain textures under/around the roads as necessary.

I'm using 2020.1.11f1 at the moment, for reference.

I will let you know if anything else comes up.

Cheers!