• 0

    posted a message on Noise help needed (OpenSimplex, or Simplex, or Perlin)

    Sure thing.


    For the first thing, there is no mathematical way that I know of to assign points in 2D or 3D space to hues (which are points on the circumference of a circle) in such a way that no matter what the color of the point in space you decide to look at, traveling in one direction from that point is equally likely to take you clockwise on the color wheel or counterclockwise. (i.e. all colors are treated equally), while at the same time avoiding those "pinch points" where all the colors meet up, that look like the center of a color wheel.


    For the second thing, noise outputs values in a range of -1 to 1, that vary smoothly over the 2D or 3D or whatever-D space. You can say -1 is zero degrees and 1 is 360 degrees on a circle, then pick your hues that way (i.e. value of 0 would be 180 degrees), but then if you look at how the different colors show up, the greens (which would be near zero, the central tendency of the noise) will be arranged in different patterns than the reds (which show up near 0 and 360, the extremes of the noise). The greens will look like rivers and the reds will look like blobs.


    Hope this helps

    Posted in: Computer Science and Technology
  • 0

    posted a message on Noise help needed (OpenSimplex, or Simplex, or Perlin)

    If what you are looking for is a smooth mapping of 3D space to points on a circle (i.e. radians for a hue) using noise where each point on the circle is treated equally as far as whether nearby points in the noise will rotate the value clockwise on the circle versus counterclockwise, I do not think that is possible without some of those sharp turns (the points) you see in LCloud's first image:



    You can do the other technique where -1 becomes 0 degrees and 1 becomes 360 degrees, but then that doesn't treat each color equally, and you can't have a blue->magenta->red transition,

    Posted in: Computer Science and Technology
  • 2

    posted a message on Realistic Terrain Generation (RTG) — Realistic Biomes, Huge Mountains, Custom Trees, Truly Flat Terrain, Breathtaking Landscapes
    Quote from Zeno410»

    I've never looked at the minecraft noise code but it does do some height smoothing between biomes. That might not get along with RTG, though, because it's got its own height smoothing. I'd really love to have a temp/rainfall gradient system that works with RTG.



    The spline would be to keep the biomes' elevation definition the same even as the temperature/precipitation/elevation placements of a biome inside the 3D voronoi diagram (that is sampled by the temp/precip/elev noises) are moved around by the Voronoi relaxation algorithm that is necessary in order to prevent cases like this from happening: (notice how the orange biome is way under-represented)


    EDIT: But again, this spline may not be necessary, if we simply do not allow the voronoi relaxation algorithm to change the Z coordinate of anything. In doing so, we lose the benefit of the biome elevation definition distribution being able to define the world elevation distribution, but we gain the benefit of avoiding oceans that are few and far between when you have a lot of land biomes and few ocean biomes (if you have biomes-o-plenty installed, for example)


    EDIT2: New idea: perform the voronoi relaxation algorithm on values above zero in elevation, and values below zero in elevation, independently. Then allow a second configuration to adjust ocean size.


    For biome smoothing to work, I'm doing the following:
    - Use the function I talked about earlier that makes the distribution of the continuous noise output approximately uniform in [-1, 1]. This should also reduce variance in the rate of change of noise values across biome boundaries.
    - At each coordinate to determine the biome, sample temp/precip/elev noise values and query the nearest neighbor in the voronoi diagram using those noise values as a point coordinate. That is the main biome at that world coordinate.
    - Take the distance of your sampling (temp, precip, elev) coordinates to the main biome point, add a small constant to it, and then query all biome points defined within that radius of your (temp, precip, elev) sampling point. Those are all the biomes that will have some effect at this world coordinate.
    - Smoothly interpolate the biomes based on that information.

    Posted in: Minecraft Mods
  • 1

    posted a message on Realistic Terrain Generation (RTG) — Realistic Biomes, Huge Mountains, Custom Trees, Truly Flat Terrain, Breathtaking Landscapes
    Quote from Zeno410»
    If you can serve up that biome layout as a GenLayer (it's not hard) you could run that layout with RTG *right now*.

    If you're trying for a temp/precip gradient map, you could try using the gradients to define biomes at the biome or sub-biome level and run the rest of the generation with the vanilla genlayers, or possibly the mild alterations in CC. That would solve the "too small" issue.


    To resolve the "too small" issue I am implementing something like Lloyd's algorithm. (EDIT: or Laplacian Smoothing)

    To incorporate height into the mix, I will use 3D voronoi diagrams with height as the Z direction, using the same function that maps noise values from an approximately-truncated-normal distribution to an approximately-uniform distribution that I am using in order to translate same-sized cells in the voronoi diagrams to same-sized biomes on average.


    To solve the issue where Lloyd's algorithm (or similar) would change the heights the biomes appear at, I am evaluating whether it would be best to not allow the algorithm to alter the Z location of the voronoi point definitions, or to write a C1-continuous spline on the delaunay tetrahedralization to interpolate the heights and produce a final heightmap value (this would result in the distribution of biome height definitions actually affecting the distributions of heights in the world, which I believe MC does and which I believe is desired).


    But yeah, I'll definitely look at GenLayer.

    Posted in: Minecraft Mods
  • 2

    posted a message on Realistic Terrain Generation (RTG) — Realistic Biomes, Huge Mountains, Custom Trees, Truly Flat Terrain, Breathtaking Landscapes


    Screenshot of the new biome distribution system I am working on for both this and the Genesis mod. Uses Voronoi diagrams and two noise instances representing temperature and precipitation. Am working on a method to avoid cases where biome definitions being close together makes the biomes show up too small, and am working out the best way to incorporate height into the mix so beach biomes can be defined through the system.

    Posted in: Minecraft Mods
  • 1

    posted a message on Realistic Terrain Generation (RTG) — Realistic Biomes, Huge Mountains, Custom Trees, Truly Flat Terrain, Breathtaking Landscapes
    Quote from JAM_BOX»

    simplex vs perlin, the benefit comes from simplex being a lighter algorithm.



    The algorithm in this case is OpenSimplex (very similiar in 2D but a bit different in 3D). The concern is less about performance and more about appearance. Perlin is an older algorithm that tends to exhibit visually-significant directional artifacts. This can be seen in-game as mountains, valleys, and islands all lining up north/south and east/west. Of particular importance to a project like this is visual isotropy: for it not to be easy to pick out an underlying grid structure by looking at the alignment of features. In fact in most projects, I'd say it takes very specific cases to warrant the use of Perlin over some of the newer more-artifact-free noise functions, and there aren't any of such specific cases here.

    On a note about performance though, it turns out Simplex and OpenSimplex can be optimized in a way that Perlin cannot: bulk-area evaluations. Because the contributions from each lattice point are combined using addition to achieve the final result, one can generate a list of every lattice point that will contribute to the area within a chunk, and process each lattice point individually rather than re-computing the geometry for every point that needs a noise evaluation. Should performance be an issue, this optimization is something that can be implemented.

    Also keep in mind that OpenSimplex is already present inside this mod. Before Ted disappeared forever, he merged a pull-request containing, among other changes by another contributer, a replacement PerlinNoise.java that generates OpenSimplex noise instead of Perlin noise. He never built it and posted it, but it was in the github repo by the time it was forked for this project, so everything you're seeing in the version being worked on right now (besides caves and the handful of stuff being generated using cellular noise) is OpenSimplex.

    Posted in: Minecraft Mods
  • 2

    posted a message on Realistic Terrain Generation (RTG) — Realistic Biomes, Huge Mountains, Custom Trees, Truly Flat Terrain, Breathtaking Landscapes
    Quote from MainFlava»

    I will try and contact him cause if he also has in depth knowledge about how to create the terrain with it he will most definitely not be frustrated anymore ;)

    So I found this thread by google-searching "OpenSimplex" to see who all's been talking about it lately :P

    But yeah I'd definitely be up for contributing to this! I've got a lot of terrain generation tricks I've come up with that I haven't been able to apply to anything because the voxel game I've been working on isn't up to that point yet.

    Some of the things I think it'd be cool to see included in this in some form or another, that I could contribute to, are:
    • Terrain with overhangs generated using 3D noise
    • Multi-octave ridged mountains (possibly combined with the above technique)
    • A cave system overhaul with tunnels leading to stalactite and stalagmite-laden chasms (unless we want to support other cave mods)
    • Alter the three-layer cliff biome so that rather than three distinct heights, the three layers slope around connect (Still need to figure out the math for this, but I think I'm close)
    Posted in: Minecraft Mods
  • 0

    posted a message on Teds World Gen Mods - Realistic World Gen Alpha 1.3.2
    Quote from VladtheMad»

    Is it typical for RWG to list everything as plains biome?


    I think that only happens when you have RWG on the server, and not on the client.

    Posted in: Minecraft Mods
  • 3

    posted a message on Teds World Gen Mods - Realistic World Gen Alpha 1.3.2

    I'm liking the new biomes!


    Also Ted, I took a look into something I mentioned earlier about carving the surface block patterns out of 3D noise rather than 2D noise. I haven't gotten to the point where I'm able to compile any of the classes that reference Minecraft's components, so I haven't been able to test this myself, but for example in SurfaceDesertMountain.java if you take the line


    float p = perlin.noise2(i / 8f, j / 8f) * 0.5f;


    delete it, and put a similar line before "p" is actually used: (inside the depth==0 bracket)


    float p = perlin.noise3(i / 8f, j / 8f, k / 8f) * 0.5f;

    if(c > min && c > sCliff - ((k - sHeight) / sStrength) + p)


    then you should be able to resolve the stretching of surface block patterns on steep mountain slopes, because you'll be carving the surface out of 3D noise -- and the original purpose of coherent noise was, after all, to texture the 2D surfaces of arbitrary 3D objects by plugging in the 3D coordinates.


    You could go even further by re-evaluating the block for all depths in the depth<6 bracket, but that depends whether or not you want to have the extra noise evaluations.


    EDIT: Posted an issue on the repo for this.


    By the way, any word about replacing the noise algorithm with OpenSimplex as per my pull request? Again, I think Perlin is a poor choice for a project such as this, due to the square artifacts.

    Posted in: Minecraft Mods
  • 0

    posted a message on Teds World Gen Mods - Realistic World Gen Alpha 1.3.2
    Quote from DeMordrey»

    @ted80
    Hoping for the rare chance you are stil reading in this thread, do you consider putting ravines into your world gen? While they may not be the most realistic thing in every biome I stil feel they make a nice change now and then be it as deathtrap, as easy way to get ores, as a way to locate mineshaft or a way to setup a hard to reach home.

    Perhaps, instead of ravines, just parts where the caves get really big? You can do that with multiple instances of noise easily:

    value_caves = noise1(x / NORMAL_CAVE_SIZE, y / NORMAL_CAVE_SIZE, z / NORMAL_CAVE_SIZE)^2 + noise2(x / NORMAL_CAVE_SIZE, y / NORMAL_CAVE_SIZE, z / NORMAL_CAVE_SIZE)^2
    value_cave_r2 = f(noise3(x / BIG_CAVE_FREQUENCY, y / BIG_CAVE_FREQUENCY, z / BIG_CAVE_FREQUENCY))

    if (value_caves < value_cave_r2) hollow out block;

    where f(x) maps [-1,1] to two sizes that indicate the width of the tunnels at the two extremes.

    There's also a neater trick that requires 6D noise. It involves doing the sin/cos clifford torus trick to get tileable 3D noise, but making repetition length larger than the world size, and using an extra instance of noise to vary the radius.

    EDIT: Fixed example code.
    EDIT2: fixed f(x) description to match updated code
    Posted in: Minecraft Mods
  • 0

    posted a message on Teds World Gen Mods - Realistic World Gen Alpha 1.3.2
    @Ted: BTW I went ahead and sent in that second pull request I mentioned, using a faster 2D function where applicable, and also replacing the 3D function with an optimized version.

    Also, when generating snow patches on mountains and dirt/sand patches on the ground, have you considered using the 3D function and plugging the height in for the third coordinate? I think that will create a more even-looking appearance, especially on steep edges.
    Posted in: Minecraft Mods
  • 0

    posted a message on Teds World Gen Mods - Realistic World Gen Alpha 1.3.2
    Quote from megasys»


    Seed: 2144847141136614729
    MC: forge-1.7.10-10.13.2.1291

    Google Maps viewer:
    Unmodified version: link
    OpenSimplex noise version: link

    These map visualizations are actually very helpful!

    Also to be honest I hadn't made a point to try out both versions using the same seed. It's interesting to find out that both the rivers and the biome placement are determined using the cellular noise rather than the Perlin/OpenSimplex (which would be why they look like they're in approximately the same place in both versions, and why the rivers intersect the way they do, and why some of the biome transitions are the way they are).
    Posted in: Minecraft Mods
  • 5

    posted a message on Teds World Gen Mods - Realistic World Gen Alpha 1.3.2
    Ted, have you gotten a chance to review the idea/code for replacing Perlin noise with OpenSimplex noise yet? I think the use of a more isotropic (directional-artifact-free) noise such as OpenSimplex instead of Perlin is important for something like this. The reduced directional tendency of terrain features provided by OpenSimplex noise does a lot for the "realism" aspect. I would say that there is little reason to use Perlin noise in most projects nowadays, given that numerous alternatives that exist that produce better results. The only thing Perlin noise has going for it is its iconic name, but that iconic name doesn't inherently make Perlin noise a relevant choice for its purposes. To make it clear, I really like the mod, but it feels like it's missing something due to its use of a highly artifact-prone noise function as the basis for almost all of its content.

    For the time being, here's a copy of the RWG with the change incorporated:

    Download RWG Alpha 1.3.01.S (OpenSimplex Noise test version) for minecraft 1.7.10

    Ted, If you would rather I not host/distribute this, just let me know and I'll go ahead and take the link down, but I would really appreciate at least some sort of comment on this proposed change, as I've been trying to discuss it with you for a while now.

    To the community: if some of you guys could test this to see how well you like it versus the unmodified version, that would be awesome.






    Posted in: Minecraft Mods
  • 3

    posted a message on Teds World Gen Mods - Realistic World Gen Alpha 1.3.2
    Ted80,

    While I'm not trying to rush you on anything (of course), I would really appreciate it if you could give some sort of statement or response regarding my proposition (and github pull request) to replace Perlin noise with OpenSimplex noise, if you get the time for that.

    Aside from the fact that it would be reassuring to know that you've gotten a chance to take a look at the idea/code, it would also help me help you if, maybe, you were to say something like "It looks good but it lags when generating this part of the world, so it needs to be optimized", or "it causes this pattern in this biome that doesn't work well and needs to be tweaked", or "I'm actually going to need to reference such-and-such previously-unused method call that you didn't include".

    But again, keep in mind I'm not trying to rush you on anything. I'm certain you've got lots of obligations that aren't this, I just think it's important to hear what you have to say on this.

    -K
    Posted in: Minecraft Mods
  • 0

    posted a message on Teds World Gen Mods - Realistic World Gen Alpha 1.3.2
    Just sent a much-belated pull request to replace Perlin Noise with OpenSimplex (for BWG RWG at least).
    Posted in: Minecraft Mods
  • To post a comment, please .