|
Sweet Home 3D Forum » List all forums » » Forum: New versions » » » Thread: Terrain Generator plug-in » » » » Post: Re: Terrain Generator plug-in |
Print at Jan 21, 2026, 8:12:10 AM |
| Posted by Keet at Nov 2, 2025, 8:18:43 AM |
|
Re: Terrain Generator plug-in That's quite a complex set of elevations to manage. First a little lesson on how terrains are stored. Terrain elevations are stored in the Home.xml file in your .sh3d project file (The .sh3d file is a zip file). The generator adds a line for each point of the terrain grid in the section for the room it belongs to. It looks something like this: <room id='room-685d80aa-8e39-45e6-a27b-9c45518c6380' level='level-ad73e953-a01a-4048-9863-2966fdbd9e8e' areaVisible='true' ceilingVisible='false' ceilingFlat='true'>It is not uncommon that the number of lines for a terrain grows to tens of thousands of lines which makes the file size of your project a lot bigger, really a lot bigger. Since you only need the room object(s) to generate the terrain object(s) it is common sense to use a copy of your project just for generating the terrain objects. You can then copy the generated terrain object to your original project without having the burden of the huge room object stored in the project file. You can always use the copied project if you want to change the terrain. When you select a room that already has terrain points the generator will read them and display the terrain. This makes is easy to edit an existing terrain. It's just that those thousands of lines are never used again, only by the terrain generator. The copy project also allows you to use additional objects for reference as you will see next. The real problem is that the terrain generator shows both the room and the house on the same level. (Discussed before here .)As you found out that makes it difficult to relate the terrain elevations to the elevation of the house. What I do in such cases is to copy only the outside walls of the house to the copy 'terrain project'. Assume the shown terrain in the generator to start at the bottom, no matter what elevation that is. Calculate the height from the bottom of the lowest level to the bottom of your house level, in your case 700 if I read it correct. Set the height of the walls to that number. Select the walls and export them to 'walls.obj'. Import the walls.obj and set its height to the original height of your house walls and elevate it to the top of the existing walls (place it on top of those walls). This construction will show the house outline in the terrain generator by displaying the walls to the bottom of the house and the "house" itself as the walls.obj model on top of it. Of course you can only use the elevated model but the walls give you an extra reference. Since you now have a reference to the elevation and outline of your house it's much easier to create the terrain. And of course you can use multiple object for reference. Just elevate them to the correct position in relation to the room. You can use multiple rooms for your terrain and of course they will all show on the same level. When you select multiple rooms and start the Terrain Generator it will show all selected rooms and you can edit them at the same time. This is useful for several reasons: smaller rooms are faster to handle in the generator and you can have separate textures for the terrain parts. The connecting rooms will elevate at the same time to ensure a prefect flow from one to the other. Although the generator will generate a single object for all selected rooms the data is stored per room. That allows you to delete the combined terrain object, select a single room and use that to generate a terrain only for that room. Repeat for all rooms and you have a terrain objects that you can give its own texture. Now with multiple rooms you can do some really neat things! First read this post . It's an easy way to create rivers or paths since you can set a different texture for each room. it allows you to create a path or river that goes along with the flow of the terrain. Since then I found that there's an easier way to create a room-between-rooms: make sure the walls are enclosed and don't click inside the walls to create a room but click ON the wall. It will create a room using the outside outline of the walls instead of inside the walls. That will nicely fit against the room(s) you create on the outside of the walls. If the terrain always starts at Level 0, I'd have to begin with the deepest point as Level 0, which would be a massive undertaking given the already constructed house and its internal levels. There is a hack to easily edit the elevations of all levels but you will have to edit the Home.xml file in the .sh3d project file. When you open the Home.xml file with an editor it shows the levels like this: <level id='level-e5153832-2b86-4ea2-ac28-f83d3e6a4b9a' name='Level 0' elevation='0.0' floorThickness='20.0' height='300.0' elevationIndex='5' visible='false' viewable='false'/>As you can see the elevation is listed as "elevation='0.0'" in each level line. It's much easier to edit the elevation numbers this way if you have a lot of levels. Of course make sure you have a backup copy of your project before you try this! ---------------------------------------- Dodecagon.nl 1300+ 3D models, manuals, and projects |
|
|
Current timezone is GMT Jan 21, 2026, 8:12:11 AM |