More Noise generators for Terrain generation

Esereja

Active Member
Contributor
I was looking trough source of TS source and looking for something I could develop onward. I got idea that we have only one noise generator (Perlin) which tough it generates really nice mountains can't do every thing.

I was wondering what algorithm's could be useful. Like that example on http://blog.movingblocks.net/fractalterrain/ of menger sponge looks really cool. And we could use generators like such to make structures.
what comes to terrain generation would noise generators like plasma, brownian, worley, simplex(lighter than perlin), Curl-Noise(really nice for lava and fluids and dried thingies) , to give us some nice variation on terrains.

(and id love to see somewhere this kind of distorted areas http://www.gavanw.com/uploads/9/5/4/0/9540564/4595959_orig.png )

oh I could do some coding now and then.(studying it in university and java is more than familiar)
 

Skaldarnar

Development Lead
Contributor
Art
World
SpecOps
Hello Esereja :)

You should have a look at the world generation thread, where you can find detailed information on the current plans to enhance world generation. The approach discussed there deals with tectonic plates and their simulation.

There are a lot of tasks that await a "curator" (actually someone who is willing to work on it), so you should skim over project state and project overview to find some intersting topics for you. ;)

If you are going with terrain generation, Nym Traveel is the one you should contact. For other fields, the curators and contact persons are stated in the mentioned threads.

If you find something you would like to work on, just check out the git repo, do your coding and make a pull request, I think Cervator would be glad to welcome a new developer to the project :)
 

Esereja

Active Member
Contributor
Thanks for reply, and i did read links(they were intresting)

Still i think we need more noise generators for achieving beter realism. and complex fractals would leave cool looking "ancestrall/what ever" buildings on nature.

Oh, I did some moding on perlin generator and made new class out of it and used it to generate base terain. Result down under(doesn't show much).
result: much smoother and curvier world, in my opinion much more naturalistic.
I am just saying more noise generators more choises(and some one willing to code at least some of them)

Kuvakaappaus 2012-12-02 20:31:13.png
 

Attachments

Esereja

Active Member
Contributor
Isn't the version of perlin noise in code at moment in reality simplex noise function?
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Cool images, I especially like the last screenshot :)

Most the focus lately has been on higher level terrain generation like height maps, biome selection, and stuff like that. Yeah, the current Perlin setup is pretty simple and we need to add said higher level stuff so we can differentiate the local generators.

For instance somebody submitted a patch to generate alternative mountains - which is great, but we want to have both, and there's no easy way to do that right now.

So I'm very happy to have somebody else focus more on the local generation and noise to go along with the bigger picture Nym Traveel is working on :)

I'd be thrilled in particular if you could come up with alternative local generators and an easy way to switch between them. Right now you can select normal vs super flat on game startup, but that's more of a hack and affects the whole world - how would we generate two different mountains using different methods? And I guess mainly how you would fletch together two areas using different generators.
 

Esereja

Active Member
Contributor
I will look at switch between generators and local generators. to be honest i have allready 2 clases that work diferent than orginal perlin.
My moded version of perlin is bit slower because it has one calculation per cycle more
vornoi is in the progress and it is rather fast but creates bit "dull"(vornoish) looking results
I will add some more to test what looks best. Or most intresting

It is easy to greate easly changable noise generator and have diferent generators for diferent biomes. I think getters and setters, few variables and switch/case structures should do the job for that.
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Okay, I looked at and tested the pull request some - seems good, went through several Normal/Perlin worlds and several Multi worlds, both seem to be working fine other than the missing trees. Bit hard to tell them apart (aside from the missing trees), but I can see some of the details in the code and *figure* I'm seeing the occasional plateau and smoother mountain transitions :)

The integration of the new generator seems good and thanks for moving the mods button :D

What's breaking for you in ChunkGeneratorManagerImpl is not having Groovy set up right. Are you using IntelliJ or Eclipse? IntelliJ works out of the box but there's a Groovy plugin you need to set up in Eclipse. Which we probably should spell out for sure on the Dev Setup page which I just realized doesn't even mention Groovy :confused:

If I try to revert the couple commented lines in ChunkGeneratorManagerImplon my system it works just fine and generates trees all day. Want to try that on your system and reactivate trees?

I did find one bug - it looks like you're not dealing with the very top of the world right. In Normal/Perlin the top of the world gets cut off and normalized so there's an open & lit layer up there that trees will even generate on. If you find an unusually tall peak in Multi then it looks like everything wants to continue but breaks, top layer is unlit as IndexOutOfBoundsExceptions are thrown related to lighting.

Want to take a look at that issue, re-enable trees, and worry less about lines longer than 80 chars? We haven't officially set a max line length but 120 should be plenty fine to aim for :)

Edit: Oh, and what's the issue with the 12 km walk/ring thing exactly? Notes about it in the code :geek:
 

Skaldarnar

Development Lead
Contributor
Art
World
SpecOps
Had a look at the pull request myself...
At fist I thoght the hilly "biome" without trees was a feature, but then I realized there were no trees at all :D Re-enabling them works fine for me and I can confirm the height issue. But all in all I think this would be a nice update, working towards some variation in terrain generation.
 

Immortius

Lead Software Architect
Contributor
Architecture
GUI
We only have one groovy class left. I will switch it to Java this weekend and then we can at least temporarily jettison groovy until a use case emerges for it again.
 

Nym Traveel

Active Member
Contributor
Art
World
Hi there and welcome :D

Couldn't look at the code so far, but the pictures and the text look promising ;)

To summarize the current plans:
We'll have the world map generated pre-play and based on this the actual generation of the map.
So the heigthmap is there (modulus some more fancy geological layers for Cervator ;)) to aid the actual generation of the terrain by giving an average heigth/climate value for the current point. Maybe I'll try to set up another voice/irc meeting in near future (though I have some packed weekends coming)
 

Esereja

Active Member
Contributor
I have proplem to find out why MultiTerainGenerator gives values that allow generating blocks over limit. any help for that?
in my computer generator haven't generated over heighted mountains yet and so I have proplems to find bugs living code line.

also i need to invet better way to rotatye generators options, as now it is player related: more chunks created, more changes to generator. so if player walks for 5 km one direction, dies and respawn and goes circle around respawn place, it should craete line between new and old chunks. location data would propaply be beter seed for those changes, that when you go near same plaçe twice, generator always generates enviromet around that place same way as first time.(this is the deal about walking around 12 km)

Oh I also made more contex bassed music playing in WorldRenderer, honestly I like it now. it plays diferent tracks in depenpending time and z level you are in. Low levels(<50) get creepy soundtracks. What do you think about this idea?(it is in code allready)
and i added Crish's music in game (http://forum.movingblocks.net/threads/chris-music-showcase.508/) for those alternative soundtracks

I think later on we can have also biome to affect in choosing what trackt to play(if it is not waste of resources)
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Cool simple music hooks - looks pretty straight forward. Just one little drawback ... :D
  • Old zip of whole source tree = 29.4 MB
  • New zip of whole source tree = 55.3 MB
That's what has kept me from adding all the music from Chrisk so far. The existing music already take up half the size of the downloader and we use the same thing for the applet. We need one or both of:
  • Minimizing the size of the applet built by Gradle, including obfuscating to minimize further. Issue #58 is pending for that, and being able to just remove Groovy soon (at least for a while) will shrink it further. Some way to take music back out or limit the pieces included would help
  • Externalizing most the music and making it an optional download available from inside the game/launcher (so effectively make music mod-based). We already store all the music pieces in TeraMisc, so being able to grab it from there would be nice. Issue #200 is for that, although I'm not sure making lower quality versions of the music pieces is easy or useful. Enabling them with a single button click from the main menu would be very useful though :)
Also, where are the Spacial Winds and Space Explorer tracks from? They don't seem to work, just placeholders maybe?

On the height bug - I was only able to find a high enough mountain twice. It may help to grab one of the purple potions for extra speed, or just tweak generation to make everything higher. You probably have an off-by-one bug somewhere in array indexing to hunt down, may be easier to just re-analyze some of the loops to look for a likely spot

As for terrain generation and having the player approach it from different angles - that sounds strange. Is that something related to your Multi thing or do we do that in general? I think I hear what you're saying - go to a location, respawn, circle around and approach it from a different angle - that actually can lead to terrain issues?
 

Immortius

Lead Software Architect
Contributor
Architecture
GUI
Chunk generation should always be deterministic based on the world seed and the location, yes. The use of continuous noise should provide this anyway. This is why perlin noise is good afterall - you can provide it x/y coordinates to obtain noise at a point, and the value will always be the same. If generating the same chunk twice in a row gives different results something is wrong.
 

Esereja

Active Member
Contributor
bump'ed,
haven't yet found bug and I need to change some things in that MultiTerainGenerator to make it dederministic. proplem is in line where made system to change ammount of plateau depending chunk loads(need to remove or change that). but proplem in too high mountains lies somewhere else(propaply)

About music: I was wondering if making music playing modable would help. Moving it into mods(something like coreplaytrack) and making it load infromation of playing track from json file, would allow it to be loaded if needed.(propaply some changes to loding music file is needed so it won't crash game when file not found).

two new track are from:
http://freepd.com/Cinematic/
and are public domain

Making lower version of music files is easy. something like 50% can be taken easly away whitout huge diference.

(I hate my typos, bad hapit)
 

Esereja

Active Member
Contributor
I fixed MultiTerrainGenerator (at least I think so), and added some really nice lights, fixed small bugs in music playing(in my code). Tought music playing still needs bigger changes in oder get those 41 mb of music out of binary.

by lowering guality we could fit them(all of them) in 13 mb (1/3 size of orginal). Sound is bit dull as result but not much.
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Absolutely agreed on music as mods - I actually tried structuring the music home in TeraMisc a bit like mods including an info file in JSON meant to allow hooks when the mods get registered. Not functional yet, of course, but that would be a good way to extract the music out of WorldRenderer where it doesn't belong in the long run :)

Probably could bundle some flavors of the downloader with fewer or low quality pieces and another with everything.

Thanks for the bug fix - lost most of today to RL bugs but will review ASAP!
 

Skaldarnar

Development Lead
Contributor
Art
World
SpecOps
Hey Esereja,
have you thought of making an incubator thread about your approach on terrain/biome generation. It would be nice to have the threads clear and structured so that everyone can follow.. ;)
 
Top