Print at Feb 12, 2026, 10:28:37 PM

Posted by z56oo at Feb 1, 2026, 12:23:15 PM
Generate terrain from a room in batch mode / Hijacking the “Generate 3D terrain from rooms…” plug-in
I recently had a problem creating a land on a project that included several buildings of different heights.

-Using the geo-object library to create this terrain was too laborious.
-The use of the "generate 3D terrain" plug-in was not suitable as is (too large, too complex, unmanageable)

I managed to get around it by using a workaround of the "Generate 3D terrain from rooms ... " plugin, which I explain below
(Giving elevations directly to the points of the room without using the grid or the interactive side of the plugin).

First (very classically)
-Create fictitious walls to enclose your living spaces if necessary (shelters, covered areas, etc.)
-Create a large rectangle with walls to delimit your land
-Connect this rectangle to your buildings with a very thin (1mm) imaginary wall to create a room for your land.
-Create the room on the lot and give it a name to find it more easily in the home.xml file (see below).
-Clean this room of any unnecessary points.

Afterwards
Place your part on a level with elevation 0 and position it so that it does not intersect either the X-axis (y=0) or the Y-axis (x=0).
This is important to prevent the plugin from creating additional elevation 0 points at the intersections of your room with the axes.

Above is the piece (TerrainX) showing the outline of the two walls connecting the buildings to the outer frame.
Note the minimum grid size required to ensure no intersections with the grid of the 'Generate 3D Terrain' plugin (in this example above, >= 8200 cm).

Since the terrain has several levels, the main lines of force indicating changes in slope must be established. These lines are also created using 1mm walls extending from the buildings and potentially approaching very close to the outer edge of the structure, but without touching it. (The reverse can also be done.) (I obviously choose lines of force for my connecting walls.)
Note that the 1mm walls gap will be invisible in the final 3D

Here's what it looks like in my case

I put small red markers on the ends of the free walls (not touching)

Finally
-Save your project (do not launch the plugin on the part yet)
-Open the Home.xml file
-Find your room (in my example TerrainX)
-Your room's points are given by tags of the type
<point x='5971.301' y= '2480.8115'/>
and in the order corresponding to a starting point from the top right corner of your rectangle, beginning to rotate clockwise

The figure above may look frightening, but in fact it is logically very simple.

-For each point in the room, we will enter an elevation in the form of a tag
<property name='terrainElevationAt(5971.30,2480.81)' value= ' 227.000'/>

-To make things easier, I copied the points from Home.xml into a spreadsheet, added an "elevation" column which I populated with the desired value for each point (in fact, very often it is the elevation of the level where I wanted my terrain to be; in this example, for the 105 points of the room, I only had 5 free values to set) , and generated the text for the "elevation" tag in another column.

-Sort your elevation tags by ascending X then ascending Y (this seems important for the plugin to function) . Delete elevation tags with 0 value
-When you're finished, simply add the following tag after the elevation tags, defining the grid size (I needed a minimum of 8200 cm, so I put 9000).
<property name='terrainGridSize' value= ' 9000.0 ' />

-Copy everything into Home.xml just below the <room… tag and above the tags defining the room points
-Recompress the contents of the Home.xml folder. Open it in SH3D.
-Launch the “Generate 3D Terrain” plugin on your room, check and admire (to make adjustments if necessary: uncheck Multiple Points) and click OK: There you go, you have your 3D terrain with the desired elevations directly relative to the buildings… with minimal effort

Here are some screenshots of the result








Hoping that this tip will be useful to some projects with similar needs
Olivier

PS: Don't forget to store your virtual walls and the room elsewhere (or make them invisible).
PS: Of course, you can't directly create holes or bumps on your land around your buildings this way, but that's not the point (You can always add another room and generate a piece of land to do so).