So I wrote a mapgen.
Post your Screenshots of Terrain!
- debiankaios
- Member
- Posts: 910
- Joined: Thu Dec 03, 2020 12:48
- IRC: debiankaios
- In-game: debiankaios Nowe
- Location: germany
- Contact:
Re: Post your Screenshots of Terrain!
Omg, what's the name of this mapgen and can you publish it, please
📖 Deutsches Modding Book 👽 My Mod 🔌 TechAge Extension (WIP)
2147483 is the new world border.
⛏ Proxima Survival(WIP) ⚔️ Minigames A.E.S(WIP)
🌐 My Website
2147483 is the new world border.
⛏ Proxima Survival(WIP) ⚔️ Minigames A.E.S(WIP)
🌐 My Website
Re: Post your Screenshots of Terrain!
That does look nice!
Lead dev of Exile, git repo: https://codeberg.org/Mantar/Exile
Re: Post your Screenshots of Terrain!
Got the rings loaded into Exile, but while it's neat, that mapgen does some unusual things that are maybe not suited. I'll have to split the rings out to use them properly.
The nodes for the rings are kind of placeholders, but the core being a glowing faint blue color is about right.
Still, thanks to Skamiz for the code. Look at this awesome thing!
The nodes for the rings are kind of placeholders, but the core being a glowing faint blue color is about right.
Still, thanks to Skamiz for the code. Look at this awesome thing!
- Attachments
-
- Ring.jpg (430.66 KiB) Viewed 24033 times
Lead dev of Exile, git repo: https://codeberg.org/Mantar/Exile
- freshreplicant
- Member
- Posts: 228
- Joined: Sun Aug 09, 2020 10:37
- In-game: freshreplicant
Re: Post your Screenshots of Terrain!
That is awesome, in the most literal sense of the word.Mantar wrote: ↑Sun Mar 27, 2022 02:16Got the rings loaded into Exile, but while it's neat, that mapgen does some unusual things that are maybe not suited. I'll have to split the rings out to use them properly.
The nodes for the rings are kind of placeholders, but the core being a glowing faint blue color is about right.
Still, thanks to Skamiz for the code. Look at this awesome thing!
- Skamiz Kazzarch
- Member
- Posts: 618
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
Re: Post your Screenshots of Terrain!
So happy to see this.
Splitting out the rings should be fairly straightforward. The main caveat is that they need to either be placed close to the center of a chunk, or you need to modify the mapgen to work across chunk boundaries.
You may also notice that I run minetest.fix_light(minp, maxp) if a ring was generated, this is because (as I learned only just now), vm:calc_lighting doesn't return correct results if the light source node doesn't have paramtype = "light", in the node definition.
Other than that maybe try to vary the size and thickness of the rings, so they don't all look similar?
- Skamiz Kazzarch
- Member
- Posts: 618
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
Re: Post your Screenshots of Terrain!
Aaand I ended up doing it myself.
Even randomized the placement location as much as possible while staying within chunk boundaries.
Here is the code. No terrain, only rings.
Code: Select all
--[[
Copyright (c) 2022 Skamiz
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
--]]
local c_plating = minetest.get_content_id("df_stones:obsidian")
local c_core = minetest.get_content_id("cicrev:corite")
minetest.set_mapgen_setting("water_level", "0", true)
--noise parameters
-- cracks in the shells of the great rings
np_3d_ring = {
offset = 0,
scale = 1,
spread = {x = 8, y = 8, z = 8},
seed = 0,
octaves = 1,
persist = 1,
lacunarity = 1.0,
-- flags = "absvalue",
}
local side_lenght = 80
local chunk_size = {x = 80, y = 80, z = 80}
local chunk_area = VoxelArea:new{MinEdge={x = 1, y = 1, z = 1}, MaxEdge=chunk_size}
local nobj_3d_r = noise_handler.get_noise_object(np_3d_ring, chunk_size)
local data = {}
minetest.register_on_generated(function(minp, maxp, chunkseed)
if maxp.y < 0 or minp.y > 0 then return end
math.randomseed(chunkseed)
-- if math.random() <= 1/25 then return end
local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
local area = VoxelArea:new({MinEdge=emin, MaxEdge=emax})
vm:get_data(data)
local nvals_3d_r = nobj_3d_r:get_3d_map_flat(minp)
-- major radius
local R = math.random(10, 30)
-- mineor 'radius'
local r = math.random(1, 3)
-- y is decreased to bias rings towards not laying flat on the ground
local rdir = vector.new(math.random() - 0.5, (math.random() - 0.5)/2, math.random() - 0.5):normalize()
local rpos = {}
-- rpos.x = math.floor((minp.x + maxp.x) / 2)
-- rpos.z = math.floor((minp.z + maxp.z) / 2)
-- rpos.y = math.floor((minp.y + maxp.y) / 2)
rpos.x = math.random(minp.x + R + r + 1, maxp.x - (R + r + 1))
rpos.y = math.random(minp.y + R + r + 1, maxp.y - (R + r + 1))
rpos.z = math.random(minp.z + R + r + 1, maxp.z - (R + r + 1))
for z = minp.z, maxp.z do
for y = minp.y, maxp.y do
for x = minp.x, maxp.x do
local vi = area:index(x, y, z)
-- ring core
local dist = math.pow(rpos.x - x, 2) + math.pow(rpos.z - z, 2) + math.pow(rpos.y - y, 2)
-- first check if node is certain distance from the middle position
if dist > math.pow(R - r, 2) and dist < math.pow(R + r, 2) and
-- then check how close it is to the plane specified by the rings orientation
math.abs((x-rpos.x) * rdir.x + (y-rpos.y) * rdir.y + (z-rpos.z) * rdir.z) <= r then
data[vi] = c_core
end
-- ring plating
local nv_3d_r = nvals_3d_r[(z - minp.z) * 80 * 80 + (y - minp.y) * 80 + (x - minp.x) + 1]
if data[vi] ~= c_core and nv_3d_r < 0.3 and
dist > math.pow((R - r) - 1, 2) and dist < math.pow((R + r) + 1, 2) and
math.abs((x-rpos.x) * rdir.x + (y-rpos.y) * rdir.y + (z-rpos.z) * rdir.z) <= r + 1 then
data[vi] = c_plating
end
end
end
end
vm:set_data(data)
minetest.generate_decorations(vm)
-- minetest.generate_ores(vm)
vm:update_liquids()
vm:set_lighting({day = 0, night = 0})
vm:calc_lighting()
vm:write_to_map()
end)
- Skamiz Kazzarch
- Member
- Posts: 618
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
Re: Post your Screenshots of Terrain!
Got them to try to adjust to the surface if the used mapgen provides a height map.
Code: Select all
--[[
Copyright (c) 2022 Skamiz
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
--]]
local c_plating = minetest.get_content_id("default:obsidian")
local c_core = minetest.get_content_id("default:mese")
minetest.set_mapgen_setting("water_level", "0", true)
--noise parameters
-- cracks in the shells of the great rings
np_3d_ring = {
offset = 0,
scale = 1,
spread = {x = 8, y = 8, z = 8},
seed = 0,
octaves = 1,
persist = 1,
lacunarity = 1.0,
-- flags = "absvalue",
}
local side_lenght = 80
local chunk_size = {x = 80, y = 80, z = 80}
local chunk_area = VoxelArea:new{MinEdge={x = 1, y = 1, z = 1}, MaxEdge=chunk_size}
local nobj_3d_r = noise_handler.get_noise_object(np_3d_ring, chunk_size)
local data = {}
minetest.register_on_generated(function(minp, maxp, chunkseed)
if maxp.y < 0 or minp.y > 0 then return end
math.randomseed(chunkseed)
-- if math.random() <= 1/25 then return end
local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
local height_data = minetest.get_mapgen_object("heightmap")
local area = VoxelArea:new({MinEdge=emin, MaxEdge=emax})
vm:get_data(data)
local nvals_3d_r = nobj_3d_r:get_3d_map_flat(minp)
-- major radius
local R = math.random(10, 30)
-- mineor 'radius'
local r = math.random(1, 3)
-- y is decreased to bias rings towards not laying flat on the ground
local rdir = vector.new(math.random() - 0.5, (math.random() - 0.5)/2, math.random() - 0.5):normalize()
local rpos = {}
rpos.x = math.random(minp.x + R + r + 1, maxp.x - (R + r + 1))
rpos.y = math.random(minp.y + R + r + 1, maxp.y - (R + r + 1))
rpos.z = math.random(minp.z + R + r + 1, maxp.z - (R + r + 1))
-- if a heightmap is aviable try to stick to the surface
if height_data then
rpos.y = height_data[(rpos.z - minp.z) * 80 + (rpos.x - minp.x) + 1]
rpos.y = math.min(math.max(rpos.y, minp.y + R + r + 1), maxp.y - (R + r + 1))
end
for z = minp.z, maxp.z do
for y = minp.y, maxp.y do
for x = minp.x, maxp.x do
local vi = area:index(x, y, z)
-- ring core
local dist = math.pow(rpos.x - x, 2) + math.pow(rpos.z - z, 2) + math.pow(rpos.y - y, 2)
-- first check if node is certain distance from the middle position
if dist > math.pow(R - r, 2) and dist < math.pow(R + r, 2) and
-- then check how close it is to the plane specified by the rings orientation
math.abs((x-rpos.x) * rdir.x + (y-rpos.y) * rdir.y + (z-rpos.z) * rdir.z) <= r then
data[vi] = c_core
end
-- ring plating
local nv_3d_r = nvals_3d_r[(z - minp.z) * 80 * 80 + (y - minp.y) * 80 + (x - minp.x) + 1]
local nv_2d = height_data[(z - minp.z) * 80 + (x - minp.x) + 1]
if data[vi] ~= c_core and nv_3d_r < 0.3 and
dist > math.pow((R - r) - 1, 2) and dist < math.pow((R + r) + 1, 2) and
math.abs((x-rpos.x) * rdir.x + (y-rpos.y) * rdir.y + (z-rpos.z) * rdir.z) <= r + 1 then
data[vi] = c_plating
end
end
end
end
vm:set_data(data)
minetest.generate_decorations(vm)
-- minetest.generate_ores(vm)
vm:update_liquids()
vm:set_lighting({day = 0, night = 0})
vm:calc_lighting()
vm:write_to_map()
end)
- Skamiz Kazzarch
- Member
- Posts: 618
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
- Skamiz Kazzarch
- Member
- Posts: 618
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
Re: Post your Screenshots of Terrain!
This is going to be just a single island mapgen.
- Skamiz Kazzarch
- Member
- Posts: 618
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
- Skamiz Kazzarch
- Member
- Posts: 618
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
- Skamiz Kazzarch
- Member
- Posts: 618
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
Re: Post your Screenshots of Terrain!
Tried out a different approach for the pillars. This is much closer to what I had in mind when I started.
- Skamiz Kazzarch
- Member
- Posts: 618
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
-
- Member
- Posts: 1118
- Joined: Mon Dec 29, 2014 08:07
- Location: USA
Re: Post your Screenshots of Terrain!
Long river lazily flowing through the jungle.
Also with caves and geomoria.
Planets. Scaled down to 0.01 world size. Based on 3D Voronoi.
-
- Member
- Posts: 1118
- Joined: Mon Dec 29, 2014 08:07
- Location: USA
Re: Post your Screenshots of Terrain!
Now with river tributaries.
- StarNinjas
- Member
- Posts: 411
- Joined: Wed Mar 14, 2018 00:32
- GitHub: starninjas
- IRC: StarNinjas
- In-game: J1
- Location: Terrarca
- Contact:
Re: Post your Screenshots of Terrain!
Wow, you guys always amaze me with this stuff!!
Don't go to bed tonight, without knowing what would happen if you died. https://thegospelfilm.org/
- Skamiz Kazzarch
- Member
- Posts: 618
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
- Skamiz Kazzarch
- Member
- Posts: 618
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
- Wuzzy
- Member
- Posts: 4803
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Re: Post your Screenshots of Terrain!
In Minetest Game 5.6.0, a dungeon chest generated floating in water:
(Mapgen = v7, coords and seed in screenshot)
(Mapgen = v7, coords and seed in screenshot)
- Skamiz Kazzarch
- Member
- Posts: 618
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
- Skamiz Kazzarch
- Member
- Posts: 618
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
- Skamiz Kazzarch
- Member
- Posts: 618
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
Re: Post your Screenshots of Terrain!
That's it for this one. I think I might write a mod for creating mapgens on the fly next.
- the_raven_262
- Member
- Posts: 343
- Joined: Mon Sep 22, 2014 09:30
- GitHub: theraven262
- IRC: [Discord unfortunately] corvus262
Re: Post your Screenshots of Terrain!
Some shots from an as-of-yet unreleased server game. This is all done without a lua mapgen, just the usual decorations (I dislike lua mapgens for their lack of speed). But you can see here that the carpathian 3D noise caverns produce more than an adequate setting (one just needs to light them up a bit).
All of the new textures are mine (I did the mapgen stuff and most of the art for the server). I have taken some liberties when expanding the lore behind mese, as you can see. This is just the tip of the iceberg though and I really hope that the server gets up some time this year.
All of the new textures are mine (I did the mapgen stuff and most of the art for the server). I have taken some liberties when expanding the lore behind mese, as you can see. This is just the tip of the iceberg though and I really hope that the server gets up some time this year.
Re: Post your Screenshots of Terrain!
Made the Enemy Mod more like it was in old Days
Who is online
Users browsing this forum: Bing [Bot] and 30 guests