Print at Apr 22, 2026, 12:18:52 AM
Posts: 91   Pages: 10   [ Previous Page | 1 2 3 4 5 6 7 8 9 10 | Next Page ]
View all posts in this thread on one page
Posted by Xlance at Mar 30, 2026, 11:45:19 PM
Re: Terrain Generator plug-in
Hello All
This major update version 1.2.2 brings powerful new procedural generation, image-mapping capabilities, and refined sculpting tools to give you ultimate control over your 3D terrains.

Advanced Height Map Support

Import Height Maps :You can now instantly generate complex landscapes by importing standard height map images (BMP, TIF, and TIFF formats supported).

Precise Altitude Control: When importing a height map, a new prompt allows you to define the exact real-world minimum (black pixels) and maximum (white pixels) heights in centimeters.

Export Your Terrains: You can now export your customized Sweet Home 3D terrain back out as a high-resolution BMP height map for use in other software.

Procedural Generation Tools

Random Height Maps: Instantly generate organic, natural-looking hills and valleys with a single click using the new "Random Height Map" button.

Tileable Terrains: Building massive environments? Use the "Tileable Random Height Map" feature to create seamless terrain blocks that perfectly connect edge-to-edge.

New Sculpting & Shaping Utilities

Square Modification Mode: Alongside the existing radial and row tools, you can now check the "Square modification" box to sculpt and elevate terrain in rigid, square block formations.

Smooth Tool: Instantly soften jagged peaks and rough transitions with the dedicated "Smooth" button.

Invert Tool: Flip your terrain upside down! The new "Invert" button instantly turns mountains into craters and valleys into hills.

"Edges = 0" Feature: A highly requested feature! Toggle the "Edges = 0" checkbox to automatically sink and smooth the outer boundaries of your terrain, preventing ugly mesh outlines and Z-fighting in your 3D views.

Enhanced Usability & Control

Customizable Grid Divisions: You are no longer locked to the default mesh resolution. Use the new "Grid Divisions" spinner to scale your terrain's detail anywhere from a low-poly 4x4 up to a highly detailed 2048x2048 grid.

Smart Memory: The plugin now remembers your favorite settings between sessions! It will automatically recall your last-used height map directory, grid division settings, and preferred height values.

https://www.mediafire.com/file/js26p21tzl5a60v/TerrainGenerator-1.2.2.sh3p/file
----------------------------------------

Windows 64bit | Intel i7 | 8GB Ram | SH3D 7.5 + Plugins

Posted by Keet at Mar 31, 2026, 9:40:15 AM
Re: Terrain Generator plug-in
Just at the right time: I'm still working on the terrain surrounding my ShoppingMall. I create a new one every once in a while but it's never what I really envision.

I LOVE the square modification option! A single point elevation always creates sharp spikes, even with a larges radius. This new option creates a flatter elevation over the selected radius. Combined with smoothing it's much easier to create large waves that look more natural.

Over time I will probably use most of the new functions. Thank you!

(You forgot to update the version number, the current already was at 1.2.2.)
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects

Posted by Xlance at Mar 31, 2026, 11:54:06 AM
Re: Terrain Generator plug-in
@Keet
Version corrected
https://www.mediafire.com/file/olmfxvr1ufjwuwt/TerrainGenerator-1.4.2.sh3p/file


You can also use it in combination with the upgraded Regular room plugin
to create accurate / artistic height maps :-)

https://sourceforge.net/p/sweethome3d/plug-ins/48/
----------------------------------------

Windows 64bit | Intel i7 | 8GB Ram | SH3D 7.5 + Plugins

Posted by Keet at Mar 31, 2026, 5:32:13 PM
Re: Terrain Generator plug-in
Bug: terrainGridSize is written with the wrong value.

Background (Using the previous version 1.2.2)
I have a terrain that spans over 232500 square meter with 970000+ elevation points and the original gridsize 50. This is spread over 25 rooms, some with very few room-points, and curved rooms with many room-points.
Initially I increase the elevation of all rooms using a very large radius to force generation of the elevation points in the Home.xml file. I use a little C# code to rewrite all elevation values to 50. This creates a flat terrain with a height of 50. The terrains are placed on a level -50 making the top of the terrain flat with the 0 level. This allows little dips in the terrain below 0 which is otherwise not possible. Of course all terrains are generated as if on level 0 so after each generation I have to move the generated terrains to the -50 level.

Testing with version 1.4.2
I changed the gridsize to 25 to see if a smaller gridsize would result in the same look but with a smaller file size and less elevation points. All terrainGridSizes got different values, none 25. There was no way to reset this, only with manual edits to fix the gridsize values but the damage was done. It resulted in weird surfaces with random spikes and dips back to 0, even with all elevation points set to 50. It ruined my project so I had to retrieve a backup file to try again.

Wishlist option: Set an initial elevation level for all elevation points. That way it is easier for users to create ponds, lakes, and rivers. It's what I do with my C# code but having the option in the TerrainGenerator is obviously much easier.

Now a brain breaker: multiple different rooms in a project. Different rooms are generated with different grid sizes. Then multiple of those rooms are selected to generate a new terrain. What happens with the gridsizes?
(By-the-way, that was not what I did in my project to cause the wrong grid sizes.)
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects

Posted by Xlance at Mar 31, 2026, 7:32:08 PM
Re: Terrain Generator plug-in
@Keet
So sorry i can't understand the issue !
Do you have files to share so I can test, that is if I know what to test ;-)

If you import a height map and set min -100 e.g. and max 100, it works
----------------------------------------

Windows 64bit | Intel i7 | 8GB Ram | SH3D 7.5 + Plugins

Posted by Keet at Mar 31, 2026, 8:36:14 PM
Re: Terrain Generator plug-in
Draw a simple room.
Start TerrainGenerator and set the gridsize to 25.
Elevate a few areas and generate the terrain object.

As long as you don't change the gridsize you can re-open the terrain and change it to generate a new terrain. That's good.
Checking the Home.xml file revealed that the gridsize was stored as 776 where I expected 25.

Now start the TerrainGenerator again with the same room and change the gridsize to 50. You get a lot of weird spikes and the gridsize value in the Home.xml file changed to 338.
Re-testing this I found that if you reset the gridsize back to the 25 I started with, then the terrain is restored to its correct form. But I wanted it regenerated with a gridsize of 50...

So I did some hacking: I manually edited the Home.xml file and set the gridsize to 25. The value that was set in the TerrainGenerator. Opening the project file is no problem. Starting the TerrainGenerator seemed to hang but eventually it came up with the correct terrain. And the gridsize value was again set to 776 smile

What is it with the weird gridsize value in the Home.xml file? I would expect that reopening the room in the TerrainGenerator would do something weird with such a strange value but it had some difficulty with the correct value 25.

Obviously something doesn't work as it is supposed to do. Thoughts:
After you changed the gridsize lock it to that room, don't allow it to be changed again,
or the better option, recalculate the room for the new gridsize. That is some difficult math because it adds or removes a lot of points. Obviously this can give weird results if you switch the gridsize from (for example) 15 to 99 or 88 to 17.
Recalculation might be necessary if rooms with different gridsizes are selected. You would probably need to recalculate all rooms to the largest gridsize of the selected rooms.

The easiest solution is to set a gridsize for the whole project, not for individual rooms, and once a terrain is generated don't allow it to be changed. Any change would require all elevation points to be removed and to start over. A gridsize for the whole project ensures that combined rooms all use the same gridsize. Most users will leave it at 50 anyway.

by-the-way: I didn't use the height-map options. For my current project I must see the home wire frame to create the terrain. But I'm going to give it a try to see how it works over my 25 rooms.

In short: changing the gridsize after the first generation breaks your terrain.
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects

Posted by Xlance at Mar 31, 2026, 11:38:44 PM
Re: Terrain Generator plug-in
@Keet
Replace your file with this! Does this solve it ?

https://www.mediafire.com/file/olmfxvr1ufjwuwt/TerrainGenerator-1.4.2.sh3p/file
----------------------------------------

Windows 64bit | Intel i7 | 8GB Ram | SH3D 7.5 + Plugins

Posted by Keet at Apr 1, 2026, 7:25:31 AM
Re: Terrain Generator plug-in
First of all: Thank you for the fast response. I misread "Grid divisions" for "Grid size". That doesn't change what happened but it clears up my understanding of the number that was written in the Home.xml file.

I created a terrain with grid size 30 and a second room with grid size 50. Selecting them both and using the TerrainGenerator causes one of the rooms to display the weird spikes. What I already detected is that combining rooms with a different grid size causes problems.

Make the grid division number read-only because it's just a calculation with the grid size and room size. It's not a number that you should use to change the grid, that's what the grid size is for. What is important is that with multiple rooms they all have the same grid size. Creating both rooms with the same grid size and then combine them for a single terrain is now correct.

Problem solved. But you should find a way to alert users that multiple rooms require the same grid size in order to combine them.
- Check on startup if multiple selected rooms have the same grid size. If not give a warning message that the rooms must have the same grid size for a correct combined terrain.
Or
- Automatically change the grid size for all selected rooms to the grid size of the room with the smallest grid size (most detailed).

Now I have to find a nice height-map to see if that can be used for my ShoppingMall terrain
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects

Posted by Xlance at Apr 1, 2026, 5:10:47 PM
Re: Terrain Generator plug-in
@Keet
Check on startup if multiple selected rooms have the same grid size. If not give a warning message that the rooms must have the same grid size for a correct combined terrain.

https://www.mediafire.com/file/82e03sfsea22lhn/TerrainGenerator-1.4.4.sh3p/file

smile
----------------------------------------

Windows 64bit | Intel i7 | 8GB Ram | SH3D 7.5 + Plugins

Posted by Keet at Apr 1, 2026, 5:56:08 PM
Re: Terrain Generator plug-in
Now it works surprisingly well. Changing a combination of two rooms that were created with different grid sizes works great. Of course you can faintly see a seam where the two rooms touch but that's inevitable with different grid sizes. To avoid the seam you have to change the grid sizes to be equal before you start elevating.
Very well done!
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects

Posts: 91   Pages: 10   [ Previous Page | 1 2 3 4 5 6 7 8 9 10 | Next Page ]