Page 1 of 1

[Mod] Mgv7 road / bridge / tunnel generator [0.1.5] [pathv7]

Posted: Mon Aug 29, 2016 03:05
by paramat
Image

For Minetest 0.4.13 and later
Depends default
Licenses: Code LGPLv2.1, textures CC BY-SA 3.0
Download ZIP, extract and rename to 'pathv7' https://github.com/paramat/pathv7/archive/master.zip
Browse code https://github.com/paramat/pathv7

Use with mapgen v7 only. This is the mgv7 version of my mod 'pathv6alt' but also simplified and improved.
Creates a worldwide network of walkable / drivable wooden roads, bridges and lighted tunnels.
There are 4 2D noise networks, each with a different scale, crossroads are found at network intersections.
All slopes are half-node steps so no jumping required, most car mods can cope with the slopes.
Mgv7 terrain noises are used to make the road height roughly follow the terrain, it does the best it can considering it needs to rise at cliff terrain, inevitably it will sometimes rise or sink for seemingly no good reason.
Currently limited to a maximum height of y = 42 due to unsolved mapchunk border issues.

Image

Re: [Mod] Mgv7 road / bridge / tunnel generator [0.1.3] [pat

Posted: Mon Aug 29, 2016 03:08
by TheReaperKing
Sooooo awesomeeee Seems like this needs to be comboed with cityscape :)

Re: [Mod] Mgv7 road / bridge / tunnel generator [0.1.3] [pat

Posted: Mon Aug 29, 2016 13:22
by azekill_DIABLO
awesome!

Re: [Mod] Mgv7 road / bridge / tunnel generator [0.1.3] [pat

Posted: Mon Aug 29, 2016 14:38
by KCoombes
Very nice!

Re: [Mod] Mgv7 road / bridge / tunnel generator [0.1.3] [pat

Posted: Mon Aug 29, 2016 22:53
by u34
+1 awesome mod!

Re: [Mod] Mgv7 road / bridge / tunnel generator [0.1.3] [pat

Posted: Tue Aug 30, 2016 06:19
by paramat
Here's something new for use in mgv7 https://github.com/paramat/roadv7

Re: [Mod] Mgv7 road / bridge / tunnel generator [0.1.5] [pat

Posted: Sun Dec 18, 2016 02:44
by paramat
Version 1.5 has all 3 memory use optimisations i detailed elsewhere, so should hopefully be suitable for those using LuaJIT and not cause OOM errors (out of memory).

Re: [Mod] Mgv7 road / bridge / tunnel generator [0.1.5] [pat

Posted: Sun Dec 25, 2016 05:49
by FreeLikeGNU
these look really cool. Theres a kind of post apocalyptic vibe when seeing structures like this through the overgrowth. Like some advanced bronze age civilization had vanished from here.

Re: [Mod] Mgv7 road / bridge / tunnel generator [0.1.5] [pat

Posted: Thu Dec 29, 2016 07:54
by ManElevation
that's pretty cool

Re: [Mod] Mgv7 road / bridge / tunnel generator [0.1.5] [pathv7]

Posted: Sat Jul 17, 2021 04:27
by Emojiminetest
I Have an updated version that replaced some old calls: https://content.minetest.net/packages/E ... st/pathv7/

Re: [Mod] Mgv7 road / bridge / tunnel generator [0.1.5] [pathv7]

Posted: Sat Jul 17, 2021 11:28
by Merak
Emojiminetest wrote:
Sat Jul 17, 2021 04:27
I Have an updated version that replaced some old calls:
I tried it and see no effect, except for 'bridge wood' in the inventory. I was using MG7 in a newly created world.

Could we get a fly-through video of what we should be seeing?

Re: [Mod] Mgv7 road / bridge / tunnel generator [0.1.5] [pathv7]

Posted: Tue Sep 14, 2021 10:39
by Emojiminetest
Merak wrote:
Sat Jul 17, 2021 11:28
Emojiminetest wrote:
Sat Jul 17, 2021 04:27
I Have an updated version that replaced some old calls:
I tried it and see no effect, except for 'bridge wood' in the inventory. I was using MG7 in a newly created world.

Could we get a fly-through video of what we should be seeing?
Actually, you will see no difference between the two pathv7 versions. My version replaces some depresated engine calls, that is having no difference visually.

Re: [Mod] Mgv7 road / bridge / tunnel generator [0.1.5] [pathv7]

Posted: Tue Mar 22, 2022 15:52
by 0siribix
Could someone please show how to use this at a different height? I;ve been tinkering and I can't seem to generate anywhere other than 0 ground level. For example, I want to use this on another layer like AiTechEye's Dimensions

Re: [Mod] Mgv7 road / bridge / tunnel generator [0.1.5] [pathv7]

Posted: Wed Mar 23, 2022 18:15
by Blockhead
0siribix wrote:
Tue Mar 22, 2022 15:52
Could someone please show how to use this at a different height? I;ve been tinkering and I can't seem to generate anywhere other than 0 ground level. For example, I want to use this on another layer like AiTechEye's Dimensions
Well this got me in way over my head. After expanding the y range check and preventing multidimensions from overriding pathv7 with air nodes, the generation is still very patchy and seems to cut off at random. It's very tightly tied to the surface level of mapgen v7 and possibly nearby areas, but doesn't seem to work way up high (y around 10500, the sandstone dimension by default in multidimensions).

The Lua code comments seem to claim only 2D noises are used but they have y spread parameters, they just have a really high magnitude of 600. I can only hazard a guess that above that height they start to mess up. A transform from local (dimensional) space to earth-coordinate-space (i.e. by subtracting from the y value) might help?

I explored up from y=0 up to y=10500 and found that as I went up there was an expanding area that was missing nodes as each path generated on top of each other. There's got to be some issue with the mapgen code which means it doesn't work at high y-levels, despite theoretically being height-agnostic. The chunks also took longer the generate. Also, it's kind of boring that it's the same set of paths for the same x & z coordinates in each dimension. pathv7 definitely needs some big changes to support that though.

Good test seed: 4627737571162856324 (bonus points to anyone who can tell me what that seed is from), has a path right near the 0,0 point.

Video demo: https://youtu.be/1tB45H4wxa8

Re: [Mod] Mgv7 road / bridge / tunnel generator [0.1.5] [pathv7]

Posted: Wed Mar 23, 2022 19:50
by 0siribix
Well you got further than I did. I have a world where I moved ground level up to 30500. I tried the following changes but nothing generates that high

Code: Select all

+local y_offset = 30500
 
 -- Mapgen v7 noises
 
 -- 2D noise for base terrain
 
 local np_base = {
-       offset = 4,
+       offset = y_offset + 4,
        scale = 70,
        spread = {x = 600, y = 600, z = 600},
        seed = 82341,

----------------------------------------------

 -- On generated function
 
 minetest.register_on_generated(function(minp, maxp, seed)
-       if minp.y > 0 or maxp.y < 0 then
+       if minp.y > y_offset or maxp.y < y_offset then
                return
        end

----------------------------------------------

                                local tblend = 0.5 + HSAMP * (select - 0.5)
                                tblend = math.min(math.max(tblend, 0), 1)
                                local tlevel = math.floor(base * tblend + alt * (1 - tblend))
-                               local pathy = math.min(math.max(tlevel, 7), 42)
+                               local pathy = math.min(math.max(tlevel, y_offset + 7), y_offset + 42)
 

----------------------------------------------

Maybe there's an issue with the offset since it isn't a chunk border?