Page 1 of 2

[Mod] Path, bridge, tunnel network [0.3.1] [pathv6alt]

Posted: Fri Sep 05, 2014 02:09
by paramat
Image


Download https://github.com/paramat/pathv6alt/archive/master.zip
Code https://github.com/paramat/pathv6alt

For Minetest 0.4.12 and later
Depends default stairs
Licenses: Code LGPLv2.1, textures CC BY-SA 3.0

Use with mapgen v6. Creates a worldwide network of paths, bridges and occasional tunnels.
Compatible with custom mapgen v6 noise parameters, you will need to enter your custom noise parameters 'terrain base' 'terrain higher' 'height select' 'mud' into the mod code.
By default will generate paths up to y = 127, raise parameter YMAXMINP for a higher limit, you will need to tune HSAMP to avoid paths becoming too steep.

Mgv6 noise parameters are used to calculate a path surface that smoothly conforms to the land without getting too steep to climb. Where the path leaves the ground it becomes a wooden bridge with random columns that reach to stone below.
There is an (enabled by default) option of using stair nodes to create walkable (no jumping) and drivable paths.
There are 4 path networks with 'spreads' of 1024, 2048, 4096 and 8192, the two larger spread paths are 5 nodes wide.

Mgv6 has 'base terrain' and 'higher terrain', and a third noise 'height select' controls the blend/mix between those two terrains. A fourth noise 'steepness' controls how fast the height select switches between base and higher, creating slopes and cliffs.
In this mod mgv6 mapgen is recreated in lua, the surface of the paths is essentially mgv6 as it would be if all slopes were gentle slopes instead of cliffs, i have set a fixed and low 'steepness'.


Image


Image


Image


^ I've been stuck at this traffic light for hours

Re: [Mod] Path, bridge, tunnel network [0.1.0] [pathv6]

Posted: Fri Sep 05, 2014 02:30
by Sokomine
Oh, that looks very intresting! It's difficult enough to build such roads manually. To do so automaticly is even better!

I'd love to have such roads between the villages :-)

Perhaps the supports for the bridges could be turned into fence posts. Those usually look slightly better than wooden planks.

Re: [Mod] Path, bridge, tunnel network [0.1.0] [pathv6]

Posted: Fri Sep 05, 2014 03:19
by Kilarin
Wow! That looks fascinating!

Re: [Mod] Path, bridge, tunnel network [0.1.0] [pathv6]

Posted: Fri Sep 05, 2014 03:19
by paramat
Yes making this work with mg_villages is something i'm considering, i think there is a way to have villages spawn at or near path crossroads. I tried fence posts but they make air columns underwater, a full node looks best, i'll probably make a new node and texture.

Re: [Mod] Path, bridge, tunnel network [0.1.0] [pathv6]

Posted: Fri Sep 05, 2014 03:54
by Sokomine
paramat wrote: Yes making this work with mg_villages is something i'm considering, i think there is a way to have villages spawn at or near path crossroads.
That would be great!
paramat wrote: I tried fence posts but they make air columns underwater, a full node looks best, i'll probably make a new node and texture.
That's pretty easy: If it's under water (or below height of 0), just place a cobblestone instead of the fence post. Fence posts tend to get complicated whenever slabs are involved, but that ought to be no problem here.

Re: [Mod] Path, bridge, tunnel network [0.1.0] [pathv6]

Posted: Fri Sep 05, 2014 05:29
by paramat
A simple and fast mod, keeping the server lag low makes a vehicle more controllable, so this can be a realtime road generator for a vehicle mod.

Re: [Mod] Path, bridge, tunnel network [0.1.0] [pathv6]

Posted: Fri Sep 05, 2014 18:37
by Krock
+1000 I love those tunnels

Re: [Mod] Path, bridge, tunnel network [0.1.0] [pathv6]

Posted: Fri Sep 05, 2014 18:47
by ExeterDad
Wow! I can't wait to get home and try it out!

Re: [Mod] Path, bridge, tunnel network [0.1.1] [pathv6]

Posted: Sat Sep 06, 2014 02:56
by ExeterDad
Heh, heh!! I really like this! Really gives players a excuse to explore.
Anyway to make paths walkable? Like slabs and stairs?
I was amazed how little code in the init.lua it took to make all this. You are a wizard for sure :P

Re: [Mod] Path, bridge, tunnel network [0.1.1] [pathv6]

Posted: Sat Sep 06, 2014 08:42
by paramat
Here's an alternative version of this mod that has fixed width paths formed by a 3x3 node 'brush' https://github.com/paramat/pathv6alt
Less organic, more level, much cleaner design, and central supports under bridges. This branch mod may be able to do stair paths, thats my next task. I'll make stairs optional if i can.

Re: [Mod] Path, bridge, tunnel network [0.1.1] [pathv6]

Posted: Sat Sep 06, 2014 14:07
by srifqi
+1024

Another way to explore the world!

Re: [Mod] Path, bridge, tunnel network [0.1.1] [pathv6]

Posted: Sun Sep 07, 2014 02:49
by ExeterDad
paramat wrote:Here's an alternative version of this mod that has fixed width paths formed by a 3x3 node 'brush' https://github.com/paramat/pathv6alt
Less organic, more level, much cleaner design, and central supports under bridges. This branch mod may be able to do stair paths, thats my next task. I'll make stairs optional if i can.
Having fun with this! I like the clean paths and bridges.
Image
Couldn't resist laying some rail into the closer tunnel. Which set off a lightbulb... since the brush is 3x3, couldn't the center ones contain a rail on generation? Would be fun to hop on a cart and go until... well a very long ways.

Re: [Mod] Path, bridge, tunnel network [0.1.1] [pathv6]

Posted: Sun Sep 07, 2014 04:42
by paramat
Good idea i'll try that.

pathv6alt v0.2.0 has optional walkable paths, enabled by default, currently all wooden.

Re: [Mod] Path, bridge, tunnel network [0.2.0] [pathv6alt]

Posted: Sun Sep 07, 2014 15:44
by Sokomine
paramat wrote: pathv6alt v0.2.0 has optional walkable paths, enabled by default, currently all wooden.
Very good! Nice to see the progress this makes. Would it be possible to change it so that the paths are embedded into their sourroundings? So that the middle of the path is not much higher than the borders? The bridge looks a bit frightening now!

Re: [Mod] Path, bridge, tunnel network [0.2.0] [pathv6alt]

Posted: Sun Sep 07, 2014 23:30
by paramat
Yes i agree, the way the path is so often a few nodes above the terrain is a problem, and difficult to solve. There are some variables that can shift the whole path system up or down a few nodes or change the vertical range, these could be tuned to make the paths lower and tunnels more common, but then you would have many places where the path runs in a trench which is even more impractical than the skywalks.
Mgv6 has 'base terrain' and 'higher terrain', and a third noise 'height select' controls the blend/mix between those two terrains. A fourth noise 'steepness' controls how fast the height select switches between base and higher, creating slopes and cliffs.
In this mod mgv6 mapgen is recreated in lua, the surface of the paths is essentially mgv6 as it would be if all slopes were gentle slopes instead of cliffs: i have set a fixed and low 'steepness', doing this to make paths to climbable is resulting in paths not following the terrain so closely. I'll try to tune the parameters for a better fit to the terrain.
The beautiful 'carved' look and surface patterns of the bridges were unexpected and are unavoidable due to the use of nodeboxes. It would be possible for the path to be 5 or 7 nodes wide to be less scary or act as a drivable 2-way road.

Re: [Mod] Path, bridge, tunnel network [0.2.0] [pathv6alt]

Posted: Mon Sep 08, 2014 02:29
by jojoa1997
Wow this mod is amazing paramat. Good job!

Re: [Mod] Path, bridge, tunnel network [0.2.0] [pathv6alt]

Posted: Mon Sep 08, 2014 03:27
by ExeterDad
Sokomine wrote:So that the middle of the path is not much higher than the borders? The bridge looks a bit frightening now!
Agreed the surface of the bridge "looks" high in the middle and a bit rocky. But the entire top surface is walkable with little issue. There are many corner stairs not only in the path, but along the edges so it looks rough. But I can sprint the bridges without too much difficulty provided I can steer at that speed. :P

This version (0.2.0) isn't nearly as clean looking, but is certainly very walkable now. So far a very promising mod. In fact pretty darn epic in my book.

Re: [Mod] Path, bridge, tunnel network [0.2.0] [pathv6alt]

Posted: Tue Sep 09, 2014 02:36
by Sokomine
ExeterDad wrote: is certainly very walkable now. So far a very promising mod. In fact pretty darn epic in my book.
Certainly! I wouldn't have thought it possible. Paramat does excellent work with mapgens. I would be a further plus if the final bit could also work out. :-)

Re: [Mod] Path, bridge, tunnel network [0.2.0] [pathv6alt]

Posted: Tue Sep 09, 2014 19:11
by twoelk
Ah these paths surely invite to be walked.

I wonder if the paths could be made to find and connect certain destinations, like villages or pyramides.
It would probably have to wait until at least two possible destinations have been generated and then revisit the generated map to add a new path connecting the two. Hmm this could include a "travelling salesman" solution of a new kind including information on preferred terrain to build the path on or through.
I guess we really could use some sort of crystal ball by now that gives a pregenerated view of the landscape to come so that secondary structures can take the yet ungenerated into account. This would also aid rivers and the such.

Something more simple that might be of interest for building new maps might be a road system that is attached to spawns. This could make a regular pattern around a single spawn such as the central cross and ringroad system on VanessaE's creative server or add some grid based system at a given location (there had been something like that before but it would great to have it connected with this). Or the most interresting and challenging would be a server map with multiple spawns connected by a road system.

Re: [Mod] Path, bridge, tunnel network [0.2.0] [pathv6alt]

Posted: Wed Sep 10, 2014 01:43
by paramat
These paths and the ones in 'path', 'noisegrid' and 'riverdev' mapgen mods are all defined by 2D noise, they follow the curves where the absolute value of noise is zero. The only way to align with other structures is for those other structures to be located by the same 2D noise pattern. So in those 3 mapgen mods the paths courses' are dominant and landscape is placed around them: mountains are placed either side of a path to make it look like the path was formed intentionally in a valley.

Sokomine, so having paths link villages is not a problem, i will edit mg_villages to use 2 path noises to locate the villages, this way they will only appear at junctions of those 2 paths. Since your villages are usually lower than the paths they might get chopped up in the air on the village edge, perhaps some clever path blending could be manged somehow to bring them in at the correct height. But of course they won't align with the villages own roads.

Re: [Mod] Path, bridge, tunnel network [0.2.0] [pathv6alt]

Posted: Wed Sep 10, 2014 02:04
by Sokomine
paramat wrote: Sokomine, so having paths link villages is not a problem, i will edit mg_villages to use 2 path noises to locate the villages, this way they will only appear at junctions of those 2 paths. Since your villages are usually lower than the paths they might get chopped up in the air on the village edge, perhaps some clever path blending could be manged somehow to bring them in at the correct height. But of course they won't align with the villages own roads.
I'm afraid we'll have to do some path blending in order for it to look convincing. It might also be possible to place a village somewhere and to connect it to the nearest path by a straight line.

Re: [Mod] Path, bridge, tunnel network [0.2.4] [pathv6alt]

Posted: Fri Sep 12, 2014 00:33
by paramat
0.2.4
I tried reducing the persistence of height select instead of octaves, this seems to make the paths follow the terrain more closely. I also removed a '+1' y offset from the mapgen code so that dirt paths are more often embedded or eroded into the ground.
There are now 4 path networks with noise 'spreads' of 1024, 2048, 4096 and 8192 nodes, the two larger networks are the new 5-wide paths. 5 wide bridges have a pattern of quadruple columns reaching to stone below.

New screenshots in first post.

Re: [Mod] Path, bridge, tunnel network [0.2.4] [pathv6alt]

Posted: Fri Sep 12, 2014 12:19
by Casimir
I put the mapgensettings I use into it, but it seems that made the mod reach its limits.
Image

Re: [Mod] Path, bridge, tunnel network [0.2.4] [pathv6alt]

Posted: Fri Sep 12, 2014 13:39
by aldobr
Can you compress the path heights in order to make it more flat ?

Like only allow height changes that are above a certain threshold...

Re: [Mod] Path, bridge, tunnel network [0.2.4] [pathv6alt]

Posted: Fri Sep 12, 2014 23:22
by paramat
Casimir, thanks i had not thought of mgv6 with custom noise parameters, i'll try to make it compatible with your game and higher terrains.

EDIT
aldobr, parameter HSOFF controls the bias towards base or higher terrain, setting this to -2 means low paths and lots of tunnels, setting to 2 results in high paths that are mostly skywalks.
Reducing HSAMP will compress the vertical range around the average of base and higher.