Mapgeneration

Esereja

Active Member
Contributor
still something to decide area whit special things are needed. Like if I want randomly disorted area now and there, there should be something deciding it. and how we decide like water sources in mid of decert?

What decides that is diferent thing.
 

Nym Traveel

Active Member
Contributor
Art
World
All of the algorithm should be deterministic given a seed-value.
water sources can be placed according to the humidity map - maybe make water in deserts super rare -> oases.
 

Skaldarnar

Development Lead
Contributor
Art
World
SpecOps
Yes, thats an idea. Maybe we should think about addtional noise for the climate zones to generate something unexpected - so maybe an ice valley in tropical region or a jungle somewhere random.... just to make the world more mystical (for those who want it)
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Yeah I think using biomes as labels for some stuff is still fine, but let terrain gen work straight on the underlying temp / humidity / etc.

Also, awesome :D

And I felt very much like that dog picture when I started on GitHub stuff. I still screw stuff up but have learned enough to safely be dangerous :rainbowdetermined:

Merged the pull request and fittingly learned something new about Git/GitHub/IntelliJ - I checked for other changes last minute but Immortius managed to slip in a bug fix between then and my push. IntelliJ nicely enough offered me to rebase on top of those changes which was painless and took nothing but a single button click. Made the network graph look nice and clean, but also seemingly orphaned the changes in your repo, Nym - you may get an error if you try to pull from MB develop about Git not wanting to lose your changes. Can ping me on IRC if you need a hand sorting that out :geek:
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
That fellow has some pretty cool tech. World seems more Skyrim'my, although it also almost seems too large to me.

... and ultimately it is yet another closed source project to add to the bunch :(
 

Immortius

Lead Software Architect
Contributor
Architecture
GUI
All of the algorithm should be deterministic given a seed-value.
water sources can be placed according to the humidity map - maybe make water in deserts super rare -> oases.
This is true, although you probably need a feature-placement source rather than doing everything off of contiguous maps like humidity. A Voronoi map may work well - just have each point in the map be a special feature, just have the feature be in a limited radius around the point. Voronoi maps are nice and flexible like that. Voronoi maps can be coded in a deterministic manner with very low memory footprint.
 

Esereja

Active Member
Contributor
can we make so that:
when you go very deeb at some point you have very hard but breakable stone and under it lava and lava and maybe some balls of stone filled whit crystals. when you broke that bedstone lava will start crushing out. If that level of depth where lava starts would change in diferent places, it would make mining realy intresting. Because you need to be carefull not to fill your tunnels whit lava if you go too deep(if there would be something valuable at those depths you would still want to go there).

alternate would be that: if lava that haven't have air contact is found it will always expand. yhis would make mining always intresting.
 

Nym Traveel

Active Member
Contributor
Art
World
I keep on forgetting to follow this blog - he got some pretty stunning techdemos up an running.

Immortius:
Thats right, and Voronoi Map seems to me like a fitting way.
What I really ment with this quote was that a given initial condition (seed) should result in the same map every time. Not every algorithm will need this seed but will use something thats driven by it. So if we have an algorithm that's searching for landscape features this won't need the seed but the landscape was originally created using it.

Esereja:
There's two things in your post: Lava as most bottom layer seems like a good idea for me. though Ijust would increase lava possibility the deeper you go. Mineral spawns are not yet relevant - this will be a huge topic in some time though.
Next thing is concerning fluid behavior: I really like the idea of lava spreading. Maybe handle it like: the deeper a lava apperance goes the more pressure lays on it and the faster it will spread.
But this will need to go into the fluid simulation thread, not the actual mapgeneration...

I have a general question:
I want to start a rough implementation of vertical chunks asap, but I'm a bit lost in the code. I'm searching for the parts where the chunks are (un-)loaded and what determines when they are (un-)loaded. This would also help me make the world really wrap around.

Another issue we have to face:
The heigthmap is currently 512x512 px which are only 8192 blocks or meters on each side.
I mean we could just scale this map until it fits our demands and then add noises and stuff to make the medium and small scale features.
Any opinions from some compter science guys about performance and possibilities?
 

Esereja

Active Member
Contributor
scaling is at least very cheap in terms of processing and i'd see that only way to go, before generating heightmaps is included.

About warping: didn't we decide world is infinite? Wouldn't warping would go against that idea?
I think it is better just add tiling and repeat height map over and over again. this way some others can use this simpler version of height map loader later on for their custom height map generators. who knows if some one wants to use gimp to create height maps(that would be coool, even better .png to height map function).

what are max/min values of height map loader for float values? I just want to try making code to convert png into height map. (got so into this idea while writing, beware of coding fever):geek:
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Infinite / finite: Both :)

"World Shape" is another parameter to add to world generation at some point (flat, cylinder, donut, etc). Not all generator steps would necessarily be valid for all world types. Infinite worlds have some benefits and drawbacks, finite worlds other, and you can mix the two on different axes.

Couple other people were interested in chunk work too, need to dig up some more notes.
 

Esereja

Active Member
Contributor
we definedly need to keep heightmap to world generator! it is so awesome whit png images.
I made matlab function to convert pictures to height map and then used gimp to create pictures for this purpose. And it is fuuuuun. You can generate world you want. so we must keep optin for heightMap/image world generation.

lets just add directory where you but your height maps/images. function to convert png to height map(i can do that). Window to gui which lists all you height maps in that directory.

it was awesome to use diferent images to generate height maps.

image of gimps labyrinth algorithms result:
Kuvakaappaus 2012-12-18 03:25:53.png


there is heightmap file linked and matlab function if some one has matlab(kids: remember to not use matlab).

and I caused this while exploring these new worlds:
Code:
[WARNING] (12-18 02:57:25)    org.terasology.entitySystem.pojo.PojoEntityManager:create() - Unable to instantiate unknown prefab: "potions:purplepotion" (Thread: 1)
[WARNING] (12-18 02:57:25)    org.terasology.entitySystem.pojo.PojoEntityManager:create() - Unable to instantiate unknown prefab: "potions:greenpotion" (Thread: 1)
[WARNING] (12-18 02:57:25)    org.terasology.entitySystem.pojo.PojoEntityManager:create() - Unable to instantiate unknown prefab: "potions:orangepotion" (Thread: 1)
[WARNING] (12-18 02:57:25)    org.terasology.entitySystem.pojo.PojoEntityManager:create() - Unable to instantiate unknown prefab: "potions:redpotion" (Thread: 1)
[WARNING] (12-18 02:57:25)    org.terasology.entitySystem.pojo.PojoEntityManager:create() - Unable to instantiate unknown prefab: "books:book" (Thread: 1)
[WARNING] (12-18 02:57:25)    org.terasology.entitySystem.pojo.PojoEntityManager:create() - Unable to instantiate unknown prefab: "books:bluebook" (Thread: 1)
[WARNING] (12-18 02:57:25)    org.terasology.entitySystem.pojo.PojoEntityManager:create() - Unable to instantiate unknown prefab: "books:redbook" (Thread: 1)
Exception in thread "pool-30-thread-1" java.lang.OutOfMemoryError: GC overhead limit exceeded
    at org.terasology.world.liquid.LiquidSimulator.calcStateFor(LiquidSimulator.java:208)
    at org.terasology.world.liquid.LiquidSimulator$ReviewChunk.run(LiquidSimulator.java:331)
    at org.terasology.world.liquid.LiquidSimulator$1.run(LiquidSimulator.java:95)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)
Exception in thread "pool-30-thread-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
    at org.terasology.world.liquid.LiquidSimulator.calcStateFor(LiquidSimulator.java:240)
    at org.terasology.world.liquid.LiquidSimulator$ReviewChunk.run(LiquidSimulator.java:331)
    at org.terasology.world.liquid.LiquidSimulator$1.run(LiquidSimulator.java:95)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)
[SEVERE] (12-18 02:59:33)    org.terasology.game.Terasology:main() - Uncaught Exception (Thread: 1)
java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "Thread-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
AL lib: ReleaseALC: 1 device not closed
edit: that world that caused eror was labyrinth whit lot of extreme elevation changes, and terain going under water and back all time.
 

Attachments

Nym Traveel

Active Member
Contributor
Art
World
Beware - pre coffee post ;)

Right, we want to have both finite and infinite worlds. As we're heading to make an rpg-style game finally I just wanted to develop in the finite direction first.
I'm a bit stressed with university till x-mas but maybe I can implement a gui element where one can put the width/heigth of the image and then create a rectangle map of arbitrary size.

Esereja:
We definately need to keep this option! :)
But to be honest: we're losing track slowly but steady.

I'll write everyone an email concerning another devmeeting.

I'll try to replicate this error when I'm back home this evening
 

Esereja

Active Member
Contributor
Isn't our main goal make map generator that:
1 uses tectonics to generate main base terain by height map.(this where we are right now)
2 but minerals to right places by using crust age got from tectonics calculator. and calculate mineral veins by vornoi noise.
3 calculate climates by height map.
4 set biomes or similar to know how to proces that area
5 using biome info, use noises to more refine terain
6 forest gen
7 building gen
8 more?

do I have understood right?

(yeah I have bad tendency to try get every possible solution and option implemented, so that user have as much as possible choises to optimize)
 

Panserbjoern

Member
Contributor
Architecture
Hi Nym Traveel

Esereja has pointed out, that you are working on "vertical chunks". What does that mean? Is there any code available?

I am studying the code related to chunk generation, management and storage and i've implemented a simple mechanism for sparse chunks. Its simple and i thought its a good point to start getting familiar with the code.

There is the pull request:
https://github.com/MovingBlocks/Terasology/pull/391

Would you mind taking a look at it? Do these changes collide with your changes?
 

Nym Traveel

Active Member
Contributor
Art
World
Hi,
I will take a look at it asap, but I can't promise anything before x-mas.
Just reading it I wouldn't say there's anything that can collide, because the topics don't really intersect.

So, at the moment the world is made of 16x256x16 chunks which are tiled together on the x and z axis. The problem with this is:
our highest elevation can be only, well, 256 meters which is pretty lame for a high mountain region^^

So the idea came up that we could stack the chunks on top of each other. This way we wouldn't need bedrock and we would be able to make some real mountains :)
Of course this would need a good chunkhandling when which chunks are getting loaded/unloaded.

I have nothing really in codeform, yet. I really want to understand where what happens in the code but i can't find a good starting point. would be awesome if you can give me a hint :)
 

Panserbjoern

Member
Contributor
Architecture
Hi Nym Traveel

In that case i think, there wont be any problem. My changes only affect some internals of the Chunk class.

I was thinking about stacking chunks on top of each other too. It should not be difficult to implement that with the current architecture.

I have read through the Hightlimit thread. I have some ideas how to solve all those problems with the terrain generation and light propagation and all that stuff. It would also integrate finite / infinite maps. And it would be possible to generate maps with different hight limits.

Of course thats a lot of work, though, but i have lots of time currently. :)

By the way, the process of loading and unloading the chunks isn't extremely complex too. All that stuff resides in the class LocalChunkProvider in the chunks package. That would be a good starting point.
 

Immortius

Lead Software Architect
Contributor
Architecture
GUI
Yes, LocalChunkProvider. This allows a number of entities to be registered as needing a region of chunks kept "relevent" around them, with chunks falling out of that region eventually being unloaded as memory is needed.

It is written with vertical chunks in mind, although hard coded to work in 2D for the moment.
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Esereja - very cool and creative use of the height map straight to a weird world type, kudos :D

Yeah, definitely would be neat to keep around for feeding arbitrary images to. Reminds me a bit of the "generate a world based on a seed taken from a specific CD" suggestion from a while back :)

The memory error - yeah, there are some ways to still provoke memory issues. Your creative world setup might indeed have uncovered a new one related to water. I'm not sure if we should worry too much about it though since current water simulation is fairly primitive and we need to overhaul it sooner or later.

As far as your numbered list - yep, that sounds about right. Including giving the user lots of choices. While we might want to focus on one track right now (tectonics in a finite world) I expect every single item on there will be an extension point where that layer can be implemented with different strategies :)
 
Top