Natural slabs for smooth hills / valleys

prestidigitator
Member
 
Posts: 632
Joined: Thu Feb 21, 2013 23:54

by prestidigitator » Wed Mar 20, 2013 19:49

prestidigitator wrote:Another thing that MIGHT help with smoother looking terrain: the current noise functions Minetest uses are not Perlin Noise, but a similar value-based pseudo-random noise generation function.

I'm actually working on changing the noise algorithms in the game itself so that you can switch between the current noise algorithm and others (with Improved Perlin Noise and Simplex Noise implemented). Shortly I'll have some visual comparisons up to show how this will give the option of somewhat smoother terrain (in the sense of what nodes get put where, so it's not a replacement for this thread's idea; they could just complement each other nicely).

Thread: Unofficial engine development → New Noise Algorithms
Last edited by prestidigitator on Wed Mar 20, 2013 19:51, edited 1 time in total.
 

User avatar
MirceaKitsune
Member
 
Posts: 809
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

by MirceaKitsune » Thu Apr 04, 2013 13:53

Bump. Still curious if anyone's interested in writing a mapgen mod to do this. It's surely possible with the current script API, but I don't know the current Lua mapgen code so I can't do much myself there. Would be nice to see even simple slab generation for dirt sand and stone.
 

User avatar
Traxie21
Member
 
Posts: 753
Joined: Mon Dec 31, 2012 10:48

by Traxie21 » Thu Apr 04, 2013 14:07

Tried, failed epically.
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Thu Apr 04, 2013 14:41

If this is ever brought into the main game, it will have to be made certain that it won't cause CPU and RAM to increase too much.
 

User avatar
MirceaKitsune
Member
 
Posts: 809
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

by MirceaKitsune » Thu Apr 04, 2013 18:00

Traxie21 wrote:Tried, failed epically.


Hmm. From what I imagine, there would mainly be two steps to get a basic implementation of this. First one would be to define slabs for dirt and sand, and make sure they work and render correctly when crafted and placed manually. Second step would then be to then add the nodes to the mapgen. I think one could look at the code for randomly spawning flowers and grass to see how that works, and use a similar pattern for slabs. For starters at least... the final script would need to arrange slabs in a correct pattern, not just spawn them randomly like flowers. And at least group them somehow, like ores tend to come in batches (to achieve different step levels gradually on hills).

Inocudom wrote:If this is ever brought into the main game, it will have to be made certain that it won't cause CPU and RAM to increase too much.


Not something that should normally decrease performance, unless something is very wrong in the engine. Only thing it could slow down would be the time it takes to generate a new chunk by a few milliseconds (the user wouldn't even notice). Rendering slabs should normally not be any slower than rendering full blocks, so no performance impact there.
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

by Sokomine » Thu Apr 04, 2013 20:13

Doing it in lua ni on_generate might be slow. Adding slabs for dirt and sand would be trivial (though slab-sand won't fall). The problem is that in register_on_generated, the lua part has no idea of height and has to manually search for ground level. There are also too many rather steep hills and not enough areas where gentle hills could be created. That might have changed with the new mapgen. I've still to explore a loarger world done with the new mapgen.
A list of my mods can be found here.
 

prestidigitator
Member
 
Posts: 632
Joined: Thu Feb 21, 2013 23:54

by prestidigitator » Thu Apr 04, 2013 22:11

MirceaKitsune wrote:
Traxie21 wrote:Tried, failed epically.


Hmm. From what I imagine, there would mainly be two steps to get a basic implementation of this. First one would be to define slabs for dirt and sand, and make sure they work and render correctly when crafted and placed manually. Second step would then be to then add the nodes to the mapgen. I think one could look at the code for randomly spawning flowers and grass to see how that works, and use a similar pattern for slabs. For starters at least... the final script would need to arrange slabs in a correct pattern, not just spawn them randomly like flowers. And at least group them somehow, like ores tend to come in batches (to achieve different step levels gradually on hills).

Inocudom wrote:If this is ever brought into the main game, it will have to be made certain that it won't cause CPU and RAM to increase too much.


Not something that should normally decrease performance, unless something is very wrong in the engine. Only thing it could slow down would be the time it takes to generate a new chunk by a few milliseconds (the user wouldn't even notice). Rendering slabs should normally not be any slower than rendering full blocks, so no performance impact there.


If you haven't seen this yet, check it out: http://forum.minetest.net/viewtopic.php?pid=80568#p80568

One of the enhancements I was planning was gradient function that would allow slope (amount and direction) to be calculated for any noise algorithm (including composite noise, of course). This would have made it easy to determine whether to use a full block, a stair block, or a slab in any particular location on the surface. It's true this would not have impacted performance much. Counting just the number of noise calls (adding up octaves) necessary to produce the features you see in that terrain I generated (no trees, beaches, biomes, or caves), Mapgen v6 uses 23 2D noise octaves for just those features, while the new Mapgen I created uses 11. The call to determine surface slope would add another 5, which is still only 16 total 2D noise octaves.

Maybe I'll continue the work in a fork, but I'm not sure how long or how often I could maintain one. The immediate negative reception of my code tells me it'll be unlikely any change I ever make will make it into the official repos. It's unfortunate, because there are a lot of features people have mentioned that would be fun to work on.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Thu Apr 04, 2013 22:23

So then work on those other features and keep your custom mapgen/noise code in a separate branch where the two won't interfere with one another.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
MirceaKitsune
Member
 
Posts: 809
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

by MirceaKitsune » Fri Apr 05, 2013 11:10

Nice stuff prestidigitator. A new noise algorithm for the mapgen would be related to this change if it is to be done right, since the code would need to know how to use slabs as part of generating hills properly and smoothly. There might be simpler ways to do it too though... we could begin from copying the spawning code of grass and flowers for starters.
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

by paramat » Sat Apr 06, 2013 06:42

I possibly have an idea how to do this, i will create a simple realm generating mod to demonstrate.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

User avatar
MirceaKitsune
Member
 
Posts: 809
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

by MirceaKitsune » Sat Apr 06, 2013 10:56

paramat wrote:Download halfslabworld010 http://www.mediafire.com/?o2k0n4cs706smt7
Depends default
License WTFPL

Fly to y = 4000 and see what happens.
Only problem is node boxes have no smooth lighting so appear different.
Generation is only very slightly slower than full node terrain and i've intergrated dirt under the surface and stone starting 2+ nodes lower at a different noise thereshold.


Thank you paramat for looking into this. Just tried your mod and it's really nice and exactly what I had in mind :D First time I can walk up smooth natural terrain without having to jump, and hills really look more realistic now. There's only two things I think it needs however:

- Slabs to be generated at ground level (as well as on the indev floatlands) and together with the minetest_game mapgen, not as separate floating islands. I wonder if the other devs would agree with making this part of the default mapgen, even if turned off by default... that would be an awesome thing.

- The way I envision this, dirt slabs should act as normal dirt blocks; When placed they are just dirt, and grass grows on them separately. When it does, the sides of the slab use the grass-dirt transition texture blocks normally do.

I hope the idea will go further, and be usable as part of minetest_game to some extent. Here's an image showing the generated hills with default textures:

Image
Last edited by MirceaKitsune on Sat Apr 06, 2013 10:56, edited 1 time in total.
 

User avatar
Calinou
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou

by Calinou » Sat Apr 06, 2013 11:39

Use "sunlight_propagates = true" for nodeboxes. No, really, else your textures are going to be darkened. I'm surprised this isn't the default for plantlike/glasslike/allfaces/nodebox drawtypes.
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Sat Apr 06, 2013 13:17

This is absolutely brilliant and needs to be made part of the engine. (configurable on/off of course)
Last edited by Neuromancer on Sat Apr 06, 2013 13:18, edited 1 time in total.
 

User avatar
Likwid H-Craft
Member
 
Posts: 1113
Joined: Sun Jan 06, 2013 14:20

by Likwid H-Craft » Sat Apr 06, 2013 14:09

Neuromancer wrote:This is absolutely brilliant and needs to be made part of the engine. (configurable on/off of course)

Yeah same here :) since I don't like it happen all the time.
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)
 

User avatar
MirceaKitsune
Member
 
Posts: 809
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

by MirceaKitsune » Sat Apr 06, 2013 18:12

Neuromancer wrote:This is absolutely brilliant and needs to be made part of the engine. (configurable on/off of course)


On / off switch is a good idea... even off by default is fine. But yes, I agree with it being part of the engine.
 

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Sat Apr 06, 2013 20:49

If you can think it, you can make it.
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

by paramat » Sat Apr 06, 2013 21:35

I think my lua mod is of limited use because placing a node on a slab makes it float off the ground. Perhaps half slab terrain would be okay for the gentle undulations of deserts since they are fairly empty of vegetation. Also, underwater has problems since you can't have a half slab of water on another half slab.
Last edited by paramat on Mon Apr 08, 2013 14:01, edited 1 time in total.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

by paramat » Mon Apr 08, 2013 14:03

Calinou wrote:Use "sunlight_propagates = true" for nodeboxes. No, really, else your textures are going to be darkened.

My mistake, this is now working for me, thank you. Slabs do not have smooth lighting but are now very similar in appearence.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

ashenk69
Member
 
Posts: 230
Joined: Tue Jul 03, 2012 00:08

by ashenk69 » Mon Apr 08, 2013 15:32

paramat wrote:I think my lua mod is of limited use because placing a node on a slab makes it float off the ground. Perhaps half slab terrain would be okay for the gentle undulations of deserts since they are fairly empty of vegetation. Also, underwater has problems since you can't have a half slab of water on another half slab.


What if you were to make half slabs buildable to? This would allow placing on the ground. You could also make them drop full dirt blocks instead of themselves. This would allow the player to still dig it up like regular dirt.
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Mon Apr 08, 2013 15:56

Should be made toggleable with minetest.conf. Still a brilliant Idea! I always want minetest to be unique in some way, in other words, something special that sets it apart from minecraft.
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

User avatar
MirceaKitsune
Member
 
Posts: 809
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

by MirceaKitsune » Tue Apr 09, 2013 08:45

paramat wrote:
ashenk69 wrote:What if you were to make half slabs buildable to? This would allow placing on the ground.

Aha good idea thanks.

As you can see here it's looking a lot better with "sunlight_propagates = true" for the nodeboxes. I rewrote my test mod for bigger hills but also thinned the landscape down to just a few nodes which rise and fall with the hills, to reduce generation time. I'll provide a link to the updated mod soon so you can experience this for yourself. I may develop this mod a little as a smooth realm just for fun.


Loving the progress on this :D Though I still think it should be done in a way to allow slabs on ground level terrain too (and with dirt slabs that have grass growing on them like blocks). That might need a C++ mapgen implementation though, now that I know more about the mapgen.
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

by paramat » Tue Apr 09, 2013 08:51

Image


Interesting that Ringworld has only 20-40m of land depth before hitting unbreakable scrith, similar to just a single surface chunk in Minetest. I can leave out generating the foamed scrith because players will never penetrate the scrith to see it haha.
Last edited by paramat on Fri Jun 14, 2013 07:47, edited 1 time in total.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

by Sokomine » Tue Apr 09, 2013 15:42

Players may construct UFOs and fly to the other side just to complain that there is no meteor shielding on the other side :)
A list of my mods can be found here.
 

User avatar
Likwid H-Craft
Member
 
Posts: 1113
Joined: Sun Jan 06, 2013 14:20

by Likwid H-Craft » Tue Apr 09, 2013 15:43

Yeah to bad can't make water and lava as slabs I tryed and, it didn't work unless you need add something to make work.

Anyways do you have any, Idea how the, ores will look like in slabs?
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)
 

User avatar
MirceaKitsune
Member
 
Posts: 809
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

by MirceaKitsune » Tue Apr 09, 2013 17:31

Likwid H-Craft wrote:Yeah to bad can't make water and lava as slabs I tryed and, it didn't work unless you need add something to make work.

Anyways do you have any, Idea how the, ores will look like in slabs?


Finite liquids might now work as that
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

by paramat » Thu Apr 18, 2013 13:59

Progress ... added caves, sand and snow slabs, beaches, dunes, snow biomes with a slab thick layer of snow, rocky terrain at high altitude that is voxel based, added water with voxel based underwater terrain ... caves are also voxel based, it's good to have the variety ... all transitions are smooth and varied by perlin noise.

This has become a 'smooth realm generator' of unlimited size, so far have tried realms of 5 and 7 chunks depth. I'll release this in another thread.
Last edited by paramat on Wed Jul 17, 2013 02:28, edited 1 time in total.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

User avatar
MirceaKitsune
Member
 
Posts: 809
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

by MirceaKitsune » Thu Apr 18, 2013 17:44

paramat wrote:Progress ... added caves, sand and snow slabs, beaches, dunes, snow biomes with a slab thick layer of snow, rocky terrain at high altitude that is voxel based, added water with voxel based underwater terrain ... caves are also voxel based, it's good to have the variety ... all transitions are smooth and varied by perlin noise.

This has become a 'smooth realm generator' of unlimited size, so far have tried realms of 5 and 7 chunks depth. I'll release this in another thread.


Very very nice! Congrats on the great work, this is really awesome. I assume it's still not at ground level though... wondering if I can talk to any of the devs to add this to a mapgen.
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

by paramat » Fri Apr 19, 2013 02:23

Thanks, yes correct not at ground level, that would be much more difficult.
Because the 'unbreakable slith' bottom of this realm rises with the terrain the depth of solid nodes is roughly constant, keeping generation time to under a minute per chunk, also it becomes possible to have mountains of almost unlimited height. Since this is so similar to Niven's Ringworld i will probaly develop this as a larger scale Ringworld type realm with 1km walls on either side.
Vegetation next ...
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

by paramat » Sun Apr 21, 2013 02:45

I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

User avatar
MirceaKitsune
Member
 
Posts: 809
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

by MirceaKitsune » Sat Jul 13, 2013 20:11

A new feature called "leveled nodeboxes" was added in GIT today. It seems to be something similar to finite liquid, but it levels any node based on a "consumption" level or something like that.

It would be very useful for the idea of smooth terrain, and top dirt nodes could be set to different levels. The mapgen would of course need new code to do this properly, but I'm thinking it's a possibility. What do you think?

https://github.com/proller/minetest/commit/2024a6c92d5710c8684c4dd0b48e8b93c5a49285
 

PreviousNext

Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 9 guests

cron