France
Joined: Nov 7, 2005
Post Count: 9430
Status:
Offline
Re: Terrain Generator plug-in
Thanks for your feedback
Smoothing afterwards might be quite complicated to program to get nice results. Maybe one day…
And reordering the way things are drawn in the plan is a big development, and I’m not sure I want to change the current simple logic. You can also draw a room for your terrain which doesn’t include the walls or the house of the walls.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
Netherlands
Joined: Apr 8, 2022
Post Count: 1442
Status:
Offline
Re: Terrain Generator plug-in
First of all: the new Terrain Generator is a huge improvement, great work!
And reordering the way things are drawn in the plan is a big development, and I’m not sure I want to change the current simple logic. You can also draw a room for your terrain which doesn’t include the walls or the house of the walls.
I have a path through my terrain that swings all around so I use walls to create those. Manually drawing them would be a nightmare. That a room can exist without walls is a good thing for terrain building: after creating the paths with 0.1 thick walls and creating the rooms (including the 'path room') I remove the walls and create the terrain using all rooms. The result is that I have a path with a different texture that nicely follows the terrain elevation up and down, looks great! If walls were a requirement for a room to exist that would not be possible. A test showed that a 350cm high wall hides under a 90cm high table I never realized it worked that way but it does explain why walls don't show through the terrain. It's based on elevation but doesn't take the height of the object into account for display in 2D. As a workaround I'm thinking about a way to create a top view image of the terrain and set that as the texture of the room after hiding the terrain object. It ruins the 3D view but it is a way to see the terrain contours in the 2D view while designing without hiding the walls. Or maybe an extra level 1cm higher while designing and when finished lower it to the same level. I'll have to experiment with that.
---------------------------------------- Dodecagon.nl 1300+ 3D models, manuals, and projects
Italy
Joined: Nov 17, 2021
Post Count: 474
Status:
Offline
Re: Terrain Generator plug-in
@keet
Negative values are impossible since the terrain is generated from a room which is by default at elevation 0 on a level. Just like walls can't have a negative elevation.
Just for clarity: I didn't mean negative elevation, but negative increment (i.e. decrement) when using such new feature "incremental mode". This would be intended to lower down points which already have a positive elevation; they would never go below zero anyway.
Greece
Joined: May 31, 2022
Post Count: 1
Status:
Offline
Re: Terrain Generator plug-in
Hello, thank you for your efforts.
Should i report here issues? I'm receiving a NPE error when clicking the "Generate 3D teraain from rooms..." (i launched SH3D from console to see them):
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at com.eteks.sweethome3d.plugin.terraingenerator.RoomsTerrainGeneratorPlugin$5.getNextValue(Unknown Source) at java.desktop/javax.swing.plaf.basic.BasicSpinnerUI.updateEnabledState(BasicSpinnerUI.java:510) at java.desktop/javax.swing.plaf.basic.BasicSpinnerUI.updateEnabledState(BasicSpinnerUI.java:494) at java.desktop/javax.swing.plaf.basic.BasicSpinnerUI$Handler.stateChanged(BasicSpinnerUI.java:1084) at java.desktop/javax.swing.JSpinner.fireStateChanged(JSpinner.java:461) at java.desktop/javax.swing.JSpinner$ModelListener.stateChanged(JSpinner.java:388) at java.desktop/javax.swing.AbstractSpinnerModel.fireStateChanged(AbstractSpinnerModel.java:120) at com.eteks.sweethome3d.swing.NullableSpinner$NullableSpinnerNumberModel.setValue(Unknown Source) at com.eteks.sweethome3d.swing.NullableSpinner$NullableSpinnerLengthModel.setLength(Unknown Source) at com.eteks.sweethome3d.plugin.terraingenerator.RoomsTerrainGeneratorPlugin.createComponents(Unknown Source) at com.eteks.sweethome3d.plugin.terraingenerator.RoomsTerrainGeneratorPlugin.generateTerrain(Unknown Source) at com.eteks.sweethome3d.plugin.terraingenerator.RoomsTerrainGeneratorPlugin.access$100(Unknown Source) at com.eteks.sweethome3d.plugin.terraingenerator.RoomsTerrainGeneratorPlugin$1.execute(Unknown Source) at com.eteks.sweethome3d.swing.HomePane$ActionAdapter.actionPerformed(Unknown Source) at com.eteks.sweethome3d.swing.ResourceAction$AbstractDecoratedAction.actionPerformed(Unknown Source) at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967) at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308) at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405) at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262) at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:369) at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1020) at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1064) at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297) at java.desktop/java.awt.Component.processMouseEvent(Component.java:6635) at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342) at java.desktop/java.awt.Component.processEvent(Component.java:6400) at java.desktop/java.awt.Container.processEvent(Container.java:2263) at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5011) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843) at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918) at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547) at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307) at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
OS: Linux, Debian SID
SH3D: v6.6.2
TerainGenerator: v1.2
java: OpenJDK version 11.0.15 - 64bit - 0.2 / 7.8 GB provided by Debian
France
Joined: Oct 20, 2017
Post Count: 320
Status:
Offline
Re: Terrain Generator plug-in
Merci beaucoup Puybaret pour cette nouvelle version du générateur de terrain. Il apporte pas mal de nouvelles fonctions avec notamment la possibilité de faire des retours arrières sans revenir à 0. Et celle de créer des points multiples.
Néanmoins, je pense qu'il faut beaucoup le pratiquer avant de bien le maitriser.
Basically, a generated terrain is on object created using a room. The terrain elevations are stored with the room data. As long as you don't delete that room you can go back to that room, select it, start the terrain generator, and make further changes to the terrain. If you want to keep the room with the terrain elevations safe but not visible use a separate level for the room which you can make invisible. Once the terrain is generated you can move the generated terrain to a different level using cut-and-paste. You can set a texture using the rooms floor or set a texture after the object is generated. Experimenting will show which gives you the best results.
A handy trick is to use multiple adjacent rooms with different textures. Select multiple rooms before starting the terrain generator and all will be included for elevating. You can use very thin walls to create a room with curves so you are not stuck with square rooms.
Try this trick to create a path that slopes with the rest of the terrain: Use thin walls to craw the path. Give the rooms on both sides a grass texture and the path itself a pavement. Now select both the grass and the pavement rooms and start the terrain generator. Where you lift the terrain touching the path it will elevate along with the grass slopes on the sides.
---------------------------------------- Dodecagon.nl 1300+ 3D models, manuals, and projects