A couple of screenshots for the mod jam.

RawrRawr REGISTERED, Tester Posts: 508 Seed
I had some outer body experiences to begin with.

moving quickly along into learning about simplex noise

after some trail and error, I managed to produce something resembling terrain

Honing the skill and generating with other biomes

I think this spike was my fault ;)


Hope I'm not posting too early or anything. Anyone else have some screenshots or videos to share?
Programmer, designer, artist.

Comments

  • CharlockCharlock REGISTERED, Tester Posts: 293 Seed
    I've got a few to post. Wasn't sure on timing (not that I've been real secretive or anything). :wink:

    I'll try to get a couple up tonight, maybe.
    "I’ve been drunk for about a week now, and I thought it might sober me up to sit in a library."
  • NekochuNekochu REGISTERED, ADMINISTRATORS, Developers Posts: 244 Developer
    Interesting, I would like to hear more about your adventures in terrain editing!
    Twitter: @X_Nekochu_X
    Tumblr: xnekochux
  • RawrRawr REGISTERED, Tester Posts: 508 Seed
    The screenshots aren't in chronological order.

    I needed the different parts of the TUG folder pointed out to me. I would like to thank @johnycilohokla for the help he gave towards my learning of terrain gen.

    I found NativeClasses.lua, saw the functions and immediately had a good idea of most of them BUT terrain gen starts with the simplex and I had no idea about what to relate scale and octave to so off I went reading things on the internet.

    Turns out it's relatively simple as it's more or less Perlin noise with a few tweaks however it still took me a little while. My "aha" moment came up when I found a diagram displaying an number of octaves as their scale got bigger / more noisy. I was initially confused by it saying frequency instead of scale so the confirmation by johnny in the change of terminology was needed.

    There was a lot of reading that in the end wasn't as valuable as I thought. For example, the papers I read on the mathematics behind simplex were interesting but as yet unnecessary. Thinking of myself as an end user for the moment, all I needed to get started was an idea of what scale and octaves meant and to look over a simple example of pushing terrain up using noise.

    The visuals as seen in the 2rd screenshot actually came up after the 3rd. A mostly put together biome wasn't the best place for looking at different simplex noises so I made a tester.

    One of my first generators used Flat World and Desert biomes. There was a stark difference between the biome constants so I saw quite rigidly where the biome 'regions' were. I still don't understand biomes. Sometimes I find a hexagon shape which I think may be a base shape but biomes connect up in some strange ways so I can't tell exactly whats going on. I measured two hexagon biomes of size 1 and 2 and I'd approximate their area be 200n by 200n voxels, where n is the biome size. Another quick bit of info is that chunks in TUG are (32, 32, 32) though I haven't managed to find out how that translates/divides into pieces of biomes. Perhaps I need a different idea about how biomes are shaped.

    I made 3 biomes and in the 4th screenshot, the trees in the middle are the start of biome I like the most. It was also the one where I came up against the limits of my computers speed. I had it populated with quite a number of maple trees as I wanted a very dense forest... a short while later I used tall billboards instead to create a similar sense of density. I'm also a fan of dangerous terrain so there's many spiked lotus amongst the tall grass he he he

    There are a couple of things I'm wondering with regards to noise and generation. Firstly, is it possible to generate different 'types' of simplex noise i.e. thin lines. Secondly, how would I implement something like a river running through multiple biomes? That partly leads on from generating different types of noise but also plays into the "how are biomes shaped/blended/combined?".

    Mind you I had a very simplistic approach to most of my generation so there'll probably be plenty of tricks to learn to achieve parts of a river. And there are a couple of functions I tested out that created some very interesting looking terrain but that haven't found their way into the mod so far.

    I'm not sure about object population. Populating the entire biome with one group of objects made sense with a flat(ish) biome but I felt uncomfortable with it in my mountainy biome because spawning the wrong object at the top wouldn't have fit well with how I wanted it to look.

    There was also a tendency for random rotations, which again makes sense for populating trees in a forest, but one of the things I wanted to do was add in a rare spawn of a cluster of ruins. Too random(er) rotations and there could've been stones clipping other stones. I also noticed in some of my clusters only some of the objects spawned... that was probably because of the density of the forest, but if the cluster spawned, not having the whole thing was not what I wanted.

    Also of note is the limit of player movement. Within the localplayer.lua code, I hard coded the speed to enormous values in order to generate/view more of a particular noise. Turns out, values past 100 or so don't increase the speed. I suppose it'd be better for me to create a pseudo-viewer tool than to generate too much in-game terrain. Thats an idea for another time though.

    I remember a long time ago there was a screen shot of someone who'd made some floating islands. I look forward to everything that comes out of redeveloping the engine.
    Programmer, designer, artist.
  • NekochuNekochu REGISTERED, ADMINISTRATORS, Developers Posts: 244 Developer
    I would have to say working with the terrain editing is probably one of our most challenging systems at the moment. You have hit upon a lot of the features that we want to improve and add to. Let me try to answer some of the problems you've faced and then I'm going to share some tutorials we have (which may be a little out of date) for the system.

    First off, trying to do the river bed or anything that is a a cut into the terrain is currently not possible in this iteration of the terrain generation. We are hoping to devise a system for this that will work for both above surface channels as well as our caves. Any of the dips or valleys seen with the current terrain is merely frequency that is set to cause a trough in the height map.

    So as you will find in the tutorials, there are a lot of modules for frequency that can be used to pull off some amazing terrain tricks. What I like to do for creating interesting valleys is to use a step module, the type that create the stair step frequency effect. We have a variation in that frequency that softens the noise to make the stair steps not so rigid. This in effect gives you mountain ranges that are more naturally carved over the blocky steppes that you find in the bamboo biome. You can then run an invert module on the results to flip the result of the frequency to produce more downward pushes of the terrain, giving you jagged spikes downward.

    For your object spawning issues, currently any objects spawned have a random orientation added to them and there is not currently a way to override that. When you are using clusters however, you can adjust things like their orientation and offset. Also you will see clusters that break and do not deliver every item in the cluster if they generate on the edge of a cell. Since each cell is created independently of one another, there is no guarantee when the objects are placed that they will overlap into another cell. Finally, the system does not currently have any concept of uniqueness with object generation. You can control the chance and frequency of an object or cluster spawn but there is currently no way to allow for a unique one time spawn of any item. We're looking at a solution to this but it will not be something that is based on biome or terrain generation. It would most likely be something based around unique items like the player spawn or center of the world.

    Finally a little shout out to one of our designers that pulled off some amazing tricks with the terrain engine. OneManParty came up with the concept of using layered noises to create mountain ranges and deserts with unique textures and object generation, like putting snow on tops of mountains but not down the side! As you're digging through the biome files, look at the multiple simplexes layered on top of one another as well as the use of sub biomes in the desert and mountain biomes to learns some of his tricks! I've added his tutorial on mountains to the list of files attached to this thread as well.
    Twitter: @X_Nekochu_X
    Tumblr: xnekochux
  • RawrRawr REGISTERED, Tester Posts: 508 Seed
    Hmmm...
    hey @johnycilohokla and @Nekochu

    Do either or you mind if I do a remix of both of your tutorials?
    Nekochu, I chuckled when I saw include("Scripts/Core/Common.lua")
    Johny, there's a lot more detail/explanations here that I could build upon/add to yours.
    Programmer, designer, artist.
  • johnycilohoklajohnycilohokla REGISTERED, Developers Posts: 283 Developer
    I don't mind, the tutorial I have isn't completed/released.
    I haven't worked much with biomes/generators, so I doubt I will be able to make a full tutorial covering everything.
    Feel free to base it off my tutorial if you want to.
    My Blog
    jc.png
      yt.png  t.png  
  • NekochuNekochu REGISTERED, ADMINISTRATORS, Developers Posts: 244 Developer
    Feel free to add to or make adjustments as you see fit. Yeah the docs I included are slightly outdated but it is the most comprehensive collection of information for the terrain engine right now. It could use an update!
    Twitter: @X_Nekochu_X
    Tumblr: xnekochux
Sign In or Register to comment.