I probably should have looked around at other people's map generators before off and writing my own, but I don't have enough attention span for that, so I just ahead and did it. Here's the homepage:
Out of the box it's admittedly not that interesting because the example terrain is kind of dull. What (I hope!) is unique and fun about this tool is that you can write your own terrain generation functions (using a functional programming language called TOGoS Noise Language - it's got add and multiply and min and max and perlin noise and ridging and transformation functions and stuff).
Also! I have managed to write a FUSE filesystem that calls into the map generator to generate new chunks on-the-fly, so you can explore a (nearly) infinite world made up of your custom terrain.
There's plenty of rough spots. For instance, there's only 2 types of trees it knows how to generate, and they're both slightly ugly. Also, the FUSE filesystem (it's a separate project and isn't required just to generate chunks) lacks a 'delete file' function (Minecraft never deletes files so I could get away with that! It should be pretty simple to add once I get around to it, though).
If anyone's interested in this project please let me know what you think and what problems you run into (these there will be plenty of, I'm sure) or missing features you'd like so I can prioritize any future work. Otherwise I will move on to other non-Minecraft projects!
just came back to this to try it out, and I'm finding that you have no way to make blobs out of a function? that is unless I'm missing something. from the looks of it, the noise functions can only be transformed to minecraft materials via layer() which takes a max and a min, but can't just take a boolean (should I have a block here?) which is what I would want.
I'd like to be able to do this:
perlinthresh = perlin > 0.5;
layer(materials.dirt, perlinthresh)
Rollback Post to RevisionRollBack
Link Removed
Stupidity on the rise with a 40% chance of shitstorms.
just came back to this to try it out, and I'm finding that you have no way to make blobs out of a function? that is unless I'm missing something. from the looks of it, the noise functions can only be transformed to minecraft materials via layer() which takes a max and a min, but can't just take a boolean (should I have a block here?) which is what I would want.
I'd like to be able to do this:
perlinthresh = perlin > 0.5;
layer(materials.dirt, perlinthresh)
If the floor is higher than the ceiling then the material won't appear at that x,z coordinate. You can also 'cut through' previously specified layers by making a materials.air layer. It is only using the x,z coordinates as function inputs - the height is not taken into account.
If you're looking for a function to make 3D noise I could add that (it would be another type of thing you could add to layered-terrain, mall it solid() maybe). It would be much more computationally intensive though (have to calculate 128 times as many points for each x,z on the map) and it would be a bit of work to make such things appear in the overhead preview...
You may be able to get the same effect with several 2D layers, though, where the floor is sometimes higher than the ceiling.
If the floor is higher than the ceiling then the material won't appear at that x,z coordinate. You can also 'cut through' previously specified layers by making a materials.air layer. It is only using the x,z coordinates as function inputs - the height is not taken into account.
If you're looking for a function to make 3D noise I could add that (it would be another type of thing you could add to layered-terrain, mall it solid() maybe). It would be much more computationally intensive though (have to calculate 128 times as many points for each x,z on the map) and it would be a bit of work to make such things appear in the overhead preview...
You may be able to get the same effect with several 2D layers, though, where the floor is sometimes higher than the ceiling.
the other thing is that I don't really understand your mappings. what range does perlin output? 0.0f-1.0f? or 0-127? etc. also, your description of fractal is confusing. I do have to admit that I don't really understand exactly how these noise algorithms work, though I do remember hearing somewhere that they interpolate between points in a generated point cloud? or maybe on a grid? but I could just be spewing nonsense.
anyway, very cool idea, could be documented a bit better. as far as I can tell your implementation is fairly good, I might even go as far as to make an in-game client so that your fuse filesystem is unneeded for single-player if I can figure out how to use your language :smile.gif:
Rollback Post to RevisionRollBack
Link Removed
Stupidity on the rise with a 40% chance of shitstorms.
the other thing is that I don't really understand your mappings. what range does perlin output? 0.0f-1.0f? or 0-127? etc.
The perlin() function outputs from -1 to 1. The inputs need to be 'stretched out' (e.g. divided by at least 4, so 2,1 on the map is mapped to perlin[0.5,0,0.25]) to be very interesting, since it returns 0 at integer coordinates.
Quote from lahwran »
also, your description of fractal is confusing. I do have to admit that I don't really understand exactly how these noise algorithms work, though I do remember hearing somewhere that they interpolate between points in a generated point cloud? or maybe on a grid? but I could just be spewing nonsense.
Mmh, that's vague enough that it could be correct. :smile.gif: Actually I never quite grasped how perlin noise worked, I just copied Ken Perlin's algorithm. The fractal function simply adds up multiple outputs from the same function at different scales, but in my example scripts I sometimes use it with iterations=1 to simply scale base function.
Quote from lahwran »
anyway, very cool idea, could be documented a bit better. as far as I can tell your implementation is fairly good, I might even go as far as to make an in-game client so that your fuse filesystem is unneeded for single-player if I can figure out how to use your language :smile.gif:
Well! I would *love* to see an in-game client mod! The FUSE system is really a huge pain to use; actually I think I was more interested in doing that to make a general purpose FUSE filesystem that I could use for other projects.
After 'finishing' TMCMG itself I spent about a day trying to make some interesting terrain. It was a lot harder and not as much fun as I expected! Also I kept crashing Minecraft with my generated maps, I think because there were too many leaf blocks in some parts... One thing I've been considering is caching intermediate function results, so that if you have something like
It will only have to evaluate somecomplicatedexpression once for each set of inputs. This could make complex terrain *way* more efficient. Another optimization would be to have a faster alternative to the perlin noise function that uses linear interpolation against a pre-generated block of samples.
If you can think of other ways to make the program more useful I'm all ears. I'll see if I can work a bit on the documentation later today. :smile.gif:
P.S. know any way to get this moved to the map generators sub-forum? I tried PMing the master admin but it doesn't seem like PMs were working (nothing in my outbox or sent items).
[*:2m3qr9lv]a clamp( min, max, basis ) function (would work similarly to ridge( min, max, basis ) and make writing (somewhat confusing) constructs like max(1,min(2,value)) unnecessary).
[*:2m3qr9lv]>, <, >=, and <= operators (would return 1 for true, 0 for false, should reduce the need for multiplication and clamping tricks)
[*:2m3qr9lv]a rand( min, max ) function that would return a pseudo-random number between min and max based on the input coordinates
http://en.wikipedia.org/wiki/Gradient_noise
there is why it's 0 at integer values.
"Gradient noise is a type of noise commonly used as a procedural texture primitive in computer graphics. It is conceptually different, and often confused with value noise. This method consists of a creation of a lattice of random gradients, which are then interpolated to obtain values in between the lattices. An artifact of some implementations of this noise is that the returned value at the lattice points is 0."
you could try http://en.wikipedia.org/wiki/Simplex_noise to fix that, seems to have been created exactly because of the problems, including the 0 at integers, with classic perlin.
edit: I don't believe in the subforums. :tongue.gif:
Rollback Post to RevisionRollBack
Link Removed
Stupidity on the rise with a 40% chance of shitstorms.
For you, I have added a Simplex noise function. It looks kind of like what you get when you add 2 layers of Perlin noise, but you have to multiply the output a bit to get a similar amplitudeyness. It's in the latest jar: http://www.nuke24.net/projects/TMCMG/TM ... .12.29.jar
I'd love to see other people's scripts for generation. I'm pretty lost with the noise functions, I've been just messing around with the example script and slowly learning how to improve terrain generation. That or if some more tutorials on how the functions work would be nice.
If someone who's using this successfully good give me some pointers. I'd love to work with others on making great scripts for different biomes or preferences. I just need to get a hang of this.
Well If someone who's using this successfully good give me some pointers. I'd love to work with others on making great scripts for different biomes or preferences. I just need to get a hang of this.
A lot of different layers are related by sharing most of the height functions but then offsetting it by some small amount. This lets me make sandy beaches that for the most part follow the edges of continents and have coal deposits that are close to the surface. To make the code clearer I probably should've named those shared parts instead of including them inline. -_o
Also note that there's currently no way to deposit a layer of snow and ice... I should probably add a postprocessor for that. And it doesn't have any knowledge of the in-game biomes, either, so sometimes you'll see really dried out trees. I wonder if lahwran knows a way to get at/duplicate the climate functions...
Also note that there's currently no way to deposit a layer of snow and ice... I should probably add a postprocessor for that. And it doesn't have any knowledge of the in-game biomes, either, so sometimes you'll see really dried out trees. I wonder if lahwran knows a way to get at/duplicate the climate functions...
I've added the 'winterizer' post-processor. It turns ground into snow and ice wherever the coldness function (the only parameter to winterizer) returns > 0. There's an example of its usage in the latest example.tnl.
That is neat! I'm a include that in the example scripts folder...with some adjustments (like a lame old ocean).
In other news, chunks are now by default created without the TerrainPopulated flag set, which (being unset) causes Minecraft to add ores, trees, and waterfalls and calculate lightingas part of loading. You can have the flag be set (and prevent Minecraft from doing these things itself) by including 'flag-populated' in your layered-terrain definition.
That is neat! I'm a include that in the example scripts folder...with some adjustments (like a lame old ocean).
In other news, chunks are now by default created without the TerrainPopulated flag set, which (being unset) causes Minecraft to add ores, trees, and waterfalls and calculate lightingas part of loading. You can have the flag be set (and prevent Minecraft from doing these things itself) by including 'flag-populated' in your layered-terrain definition.
You the man. Lighting looks a lot better, and now the problem of adding ores is solved. But I have a little problem, Minecraft stutters bad when loading chunks from my floating islands map. Any idea why?
Minecraft stutters bad when loading chunks from my floating islands map. Any idea why?
I noticed a lot of gravel falling around me when I first entered the map and Minecraft was chugging along all slow.
The stuttering problem seemed much less pronounced on a more conventional map, presumably because there's not so much sky for gravel to fall into.
So what to do about all this? Well, the best solution would be to do a better job calculating lighting so that we can set TerrainPopulated and Minecraft wouldn't feel the need to redo lighting itself the first time you break a block bordering a shadow. It would be tricky to include such a feature into TMCMG though as it would require lighting in one chunk to be affected by adjacent chunks (I've been trying really hard to avoid having to deal with such things; I had a dream last year in which Notch was explaining the details of the lighting algorithm to me but I don't remember the details).
For more conventional maps (not floating islands), you can get away with setting TerrainPopulated and the current TMCMG lighting algorithm since there aren't many large shadows being casted from opaque objects.
For maps like floating islands...for now I guess there's a harsh tradeoff between putting up with stuttering on chunk loading and having crappy shadows that make the game chug a bit when you first cut into them (and having to program your own ore veins, etc).
/me waves
I probably should have looked around at other people's map generators before off and writing my own, but I don't have enough attention span for that, so I just ahead and did it. Here's the homepage:
http://www.nuke24.net/projects/TMCMG/
Out of the box it's admittedly not that interesting because the example terrain is kind of dull. What (I hope!) is unique and fun about this tool is that you can write your own terrain generation functions (using a functional programming language called TOGoS Noise Language - it's got add and multiply and min and max and perlin noise and ridging and transformation functions and stuff).
Also! I have managed to write a FUSE filesystem that calls into the map generator to generate new chunks on-the-fly, so you can explore a (nearly) infinite world made up of your custom terrain.
There's plenty of rough spots. For instance, there's only 2 types of trees it knows how to generate, and they're both slightly ugly. Also, the FUSE filesystem (it's a separate project and isn't required just to generate chunks) lacks a 'delete file' function (Minecraft never deletes files so I could get away with that! It should be pretty simple to add once I get around to it, though).
If anyone's interested in this project please let me know what you think and what problems you run into (these there will be plenty of, I'm sure) or missing features you'd like so I can prioritize any future work. Otherwise I will move on to other non-Minecraft projects!
and did I say - sweeet?
Stupidity on the rise with a 40% chance of shitstorms.
I'd like to be able to do this:
perlinthresh = perlin > 0.5;
layer(materials.dirt, perlinthresh)
Stupidity on the rise with a 40% chance of shitstorms.
If the floor is higher than the ceiling then the material won't appear at that x,z coordinate. You can also 'cut through' previously specified layers by making a materials.air layer. It is only using the x,z coordinates as function inputs - the height is not taken into account.
If you're looking for a function to make 3D noise I could add that (it would be another type of thing you could add to layered-terrain, mall it solid() maybe). It would be much more computationally intensive though (have to calculate 128 times as many points for each x,z on the map) and it would be a bit of work to make such things appear in the overhead preview...
You may be able to get the same effect with several 2D layers, though, where the floor is sometimes higher than the ceiling.
the other thing is that I don't really understand your mappings. what range does perlin output? 0.0f-1.0f? or 0-127? etc. also, your description of fractal is confusing. I do have to admit that I don't really understand exactly how these noise algorithms work, though I do remember hearing somewhere that they interpolate between points in a generated point cloud? or maybe on a grid? but I could just be spewing nonsense.
anyway, very cool idea, could be documented a bit better. as far as I can tell your implementation is fairly good, I might even go as far as to make an in-game client so that your fuse filesystem is unneeded for single-player if I can figure out how to use your language :smile.gif:
Stupidity on the rise with a 40% chance of shitstorms.
The perlin() function outputs from -1 to 1. The inputs need to be 'stretched out' (e.g. divided by at least 4, so 2,1 on the map is mapped to perlin[0.5,0,0.25]) to be very interesting, since it returns 0 at integer coordinates.
Mmh, that's vague enough that it could be correct. :smile.gif: Actually I never quite grasped how perlin noise worked, I just copied Ken Perlin's algorithm. The fractal function simply adds up multiple outputs from the same function at different scales, but in my example scripts I sometimes use it with iterations=1 to simply scale base function.
Well! I would *love* to see an in-game client mod! The FUSE system is really a huge pain to use; actually I think I was more interested in doing that to make a general purpose FUSE filesystem that I could use for other projects.
After 'finishing' TMCMG itself I spent about a day trying to make some interesting terrain. It was a lot harder and not as much fun as I expected! Also I kept crashing Minecraft with my generated maps, I think because there were too many leaf blocks in some parts... One thing I've been considering is caching intermediate function results, so that if you have something like
It will only have to evaluate somecomplicatedexpression once for each set of inputs. This could make complex terrain *way* more efficient. Another optimization would be to have a faster alternative to the perlin noise function that uses linear interpolation against a pre-generated block of samples.
If you can think of other ways to make the program more useful I'm all ears. I'll see if I can work a bit on the documentation later today. :smile.gif:
P.S. know any way to get this moved to the map generators sub-forum? I tried PMing the master admin but it doesn't seem like PMs were working (nothing in my outbox or sent items).
[*:2m3qr9lv]a clamp( min, max, basis ) function (would work similarly to ridge( min, max, basis ) and make writing (somewhat confusing) constructs like max(1,min(2,value)) unnecessary).
[*:2m3qr9lv]>, <, >=, and <= operators (would return 1 for true, 0 for false, should reduce the need for multiplication and clamping tricks)
[*:2m3qr9lv]a rand( min, max ) function that would return a pseudo-random number between min and max based on the input coordinates
there is why it's 0 at integer values.
"Gradient noise is a type of noise commonly used as a procedural texture primitive in computer graphics. It is conceptually different, and often confused with value noise. This method consists of a creation of a lattice of random gradients, which are then interpolated to obtain values in between the lattices. An artifact of some implementations of this noise is that the returned value at the lattice points is 0."
you could try http://en.wikipedia.org/wiki/Simplex_noise to fix that, seems to have been created exactly because of the problems, including the 0 at integers, with classic perlin.
edit: I don't believe in the subforums. :tongue.gif:
Stupidity on the rise with a 40% chance of shitstorms.
For you, I have added a Simplex noise function. It looks kind of like what you get when you add 2 layers of Perlin noise, but you have to multiply the output a bit to get a similar amplitudeyness. It's in the latest jar: http://www.nuke24.net/projects/TMCMG/TM ... .12.29.jar
If someone who's using this successfully good give me some pointers. I'd love to work with others on making great scripts for different biomes or preferences. I just need to get a hang of this.
This is the best I've got, so far:
A lot of different layers are related by sharing most of the height functions but then offsetting it by some small amount. This lets me make sandy beaches that for the most part follow the edges of continents and have coal deposits that are close to the surface. To make the code clearer I probably should've named those shared parts instead of including them inline. -_o
Also note that there's currently no way to deposit a layer of snow and ice... I should probably add a postprocessor for that. And it doesn't have any knowledge of the in-game biomes, either, so sometimes you'll see really dried out trees. I wonder if lahwran knows a way to get at/duplicate the climate functions...
I've added the 'winterizer' post-processor. It turns ground into snow and ice wherever the coldness function (the only parameter to winterizer) returns > 0. There's an example of its usage in the latest example.tnl.
Latest jar: http://www.nuke24.net/projects/TMCMG/TM ... .12.30.jar
Floating islands!
Cool! No bedrock though ... dangerous.
Stupidity on the rise with a 40% chance of shitstorms.
That is neat! I'm a include that in the example scripts folder...with some adjustments (like a lame old ocean).
In other news, chunks are now by default created without the TerrainPopulated flag set, which (being unset) causes Minecraft to add ores, trees, and waterfalls and calculate lightingas part of loading. You can have the flag be set (and prevent Minecraft from doing these things itself) by including 'flag-populated' in your layered-terrain definition.
You the man. Lighting looks a lot better, and now the problem of adding ores is solved. But I have a little problem, Minecraft stutters bad when loading chunks from my floating islands map. Any idea why?
I noticed a lot of gravel falling around me when I first entered the map and Minecraft was chugging along all slow.
The stuttering problem seemed much less pronounced on a more conventional map, presumably because there's not so much sky for gravel to fall into.
So what to do about all this? Well, the best solution would be to do a better job calculating lighting so that we can set TerrainPopulated and Minecraft wouldn't feel the need to redo lighting itself the first time you break a block bordering a shadow. It would be tricky to include such a feature into TMCMG though as it would require lighting in one chunk to be affected by adjacent chunks (I've been trying really hard to avoid having to deal with such things; I had a dream last year in which Notch was explaining the details of the lighting algorithm to me but I don't remember the details).
For more conventional maps (not floating islands), you can get away with setting TerrainPopulated and the current TMCMG lighting algorithm since there aren't many large shadows being casted from opaque objects.
For maps like floating islands...for now I guess there's a harsh tradeoff between putting up with stuttering on chunk loading and having crappy shadows that make the game chug a bit when you first cut into them (and having to program your own ore veins, etc).
Compile error: invalid operator '{\fonttbl\f0\fmodern\fcharset0' (forget a semicolon?)