Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 ... 7

Author Topic: The World is Just Awesome - Advanced Terrain Generation Thread  (Read 21419 times)

Normandy

  • Bay Watcher
    • View Profile
The World is Just Awesome - Advanced Terrain Generation Thread
« on: February 01, 2011, 11:12:42 pm »

The world is just awesome. Perlin noise heightmaps just don't cut it justice. Everything from plate tectonics to climate to bedrock composition affects topography.

Originally I was going to make my own generator, but time constraints have forced me otherwise. However, you can still contribute! Post interesting terrain generation projects that you are undertaking here, for us to admire and comment on.

Old OP:
Spoiler (click to show/hide)
« Last Edit: April 07, 2012, 12:01:42 am by Normandy »
Logged

Hugehead

  • Bay Watcher
    • View Profile
Re: Project: The World is Just Awesome - Advanced Terrain Generator
« Reply #1 on: February 02, 2011, 12:41:30 am »

This is really neat, will you release it as a developer's resource or do you intend to keep it for yourself?
Logged
We're Bay12er's. If there is a bug, we will find it, exploit it, and make a recursive statue out of it. Just look up Planepacked.
When a dwarf enters a martial trance, they become Jedi. Short, drunken Jedi.

Captain Mayday

  • Bay Watcher
  • A Special Kind of Terrible
    • View Profile
Re: Project: The World is Just Awesome - Advanced Terrain Generator
« Reply #2 on: February 02, 2011, 01:21:20 am »

I have seriously been looking for a terrain generator of this nature for years. I'm deeply interested in seeing how this goes.

Edit: I notice this isn't seamless. Are you looking at getting seamless maps working once you have overall functionality up and running?
« Last Edit: February 02, 2011, 01:35:56 am by Captain Mayday »
Logged
Why not join us on IRC? irc.newnet.net #bay12games

Akhier the Dragon hearted

  • Bay Watcher
  • I'm a Dragon, Roar
    • View Profile
    • My YouTube Channel
Re: Project: The World is Just Awesome - Advanced Terrain Generator
« Reply #3 on: February 02, 2011, 02:08:43 am »

   Quite an interesting terrain generator you have
shaping up here. I wish you luck on this venture
because the way its looking the generator will be
amazing in its realness as compared to life.
Logged
Quote
Join us. The crazy is at a perfect temperature today.
So it seems I accidentally put my canteen in my wheelbarrow and didn't notice... and then I got really thirsty... so right before going to sleep I go to take a swig from my canteen and... end up snorting a line of low-grade meth.

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: Project: The World is Just Awesome - Advanced Terrain Generator
« Reply #4 on: February 02, 2011, 03:35:41 am »

I've looked into noise generation for plate tectonics before, using Teragen 2, though without taking convection into account. To generate the plates I started off with distorted voronoi noise. I used the hue of the flat-shaded cell variants to determine the average height of the plate and the distance gradient voronoi variant to mask where the mountains and troughs should be.
Logged

nbonaparte

  • Bay Watcher
    • View Profile
Re: Project: The World is Just Awesome - Advanced Terrain Generator
« Reply #5 on: February 02, 2011, 03:40:21 am »

I am very interested in this, posting to watch.
Logged
A service to the forum: clowns=demons, cotton candy=adamantine, clown car=adamantine tube, circus=hell, circus tent=demonic fortress.

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: Project: The World is Just Awesome - Advanced Terrain Generator
« Reply #6 on: February 02, 2011, 03:49:41 am »

Your block effects are interesting, any clues as to the cause? I mean if I had to take a stab in the dark, I might guess that to speed up the generator you multi threaded it, giving each 'block' it's own thread, but didn't give any way for them to interact, leading to less activity on the edges on such blocks.

On that note, it would be in your bets intrest to make the edges interact, so that the left conencts to the right, and the top to the bottem, giving some strange hyper dimentional sphere.

Shades

  • Bay Watcher
    • View Profile
Re: Project: The World is Just Awesome - Advanced Terrain Generator
« Reply #7 on: February 02, 2011, 04:17:34 am »

Your block effects are interesting, any clues as to the cause? I mean if I had to take a stab in the dark, I might guess that to speed up the generator you multi threaded it, giving each 'block' it's own thread, but didn't give any way for them to interact, leading to less activity on the edges on such blocks.

On that note, it would be in your bets intrest to make the edges interact, so that the left conencts to the right, and the top to the bottem, giving some strange hyper dimentional sphere.

From a performance point of view he'd be best off treating the blocks as tasks with a multi-threaded api like tbb. That way that can still interact and you only have as many threads as you do cores but can infinitely (within memory limits) extend then world, rather than a thread for each block. But your probably right that it's an interaction disconnect cause the tile look.

Looks like an interesting project, watching to see how it goes :)
Logged
Its like playing god with sentient legos. - They Got Leader
[Dwarf Fortress] plays like a dizzyingly complex hybrid of Dungeon Keeper and The Sims, if all your little people were manic-depressive alcoholics. - tv tropes
You don't use science to show that you're right, you use science to become right. - xkcd

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: Project: The World is Just Awesome - Advanced Terrain Generator
« Reply #8 on: February 02, 2011, 04:42:25 am »

This looks rather interesting indeed. following this.
Logged

Normandy

  • Bay Watcher
    • View Profile
Re: Project: The World is Just Awesome - Advanced Terrain Generator
« Reply #9 on: February 02, 2011, 11:53:12 am »

Actually, the blocks are visual artifacts generated by perlin noise. Perlin noise looks seamless, but in reality it has subtle artifacts when any coordinate is close to an integer. I'll probably change the noise generation or find some way to remove these artifacts, but it's not of particular interest to me now, since eventually the magma temperatures will be affected by other factors which (should) get rid of these artifacts.

I won't be generating plates through noise; I'm first going to see if I can manage to get them down through the stress maps. The mathematics are a bit complex, so I'm doing it all on paper first; however I've got the theory behind it:

The movement of a plate should be equal to the sum of the forces on it; ignoring friction between plates and gravity for a moment, let's look solely at the force contributed by magma convection currents. In a highly viscous fluid, drag is directly proportional to velocity, so that works out well. Using a simple flood-fill algorithm over a plate to calculate this total force is pretty easy then. You can then use this total force to accelerate the plate accordingly.

Once the plates begin moving, there will be a disparity between the motion of the plate and the motion of the magma underneath. For now we'll assume the plates do not change the flow of the magma (they do, but that's rather complicated right now). The difference between the motion of the plate and the magma underneath creates stress. Once stress reaches a certain threshold, the plate begins to deform and rift (i.e. separate), forming new plates.

This model depends on rigid plates that don't have significant deformations or velocity deviations relative to their total velocity. I think I can fix for the deformations by adding in a deformation factor somewhere in there, but I'm currently stuck on the actual process of separate plates forming. Since the rift has not completely separated the two plates yet, a flood-fill algorithm will overstep this boundary. However, the velocities of the plates on either side of the forming rift are bound to be in complete opposite directions.

Anyways, next update will probably add rectangular map wrapping to make some math easier. Look forward to it.

EDIT:
Also, if anyone has a java function for 4d perlin noise, I could sure use it.
« Last Edit: February 02, 2011, 12:54:36 pm by Normandy »
Logged

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: Project: The World is Just Awesome - Advanced Terrain Generator
« Reply #10 on: February 02, 2011, 01:28:30 pm »

the plates need to rotate to.
Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

Nadaka

  • Bay Watcher
    • View Profile
    • http://www.nadaka.us
Re: Project: The World is Just Awesome - Advanced Terrain Generator
« Reply #11 on: February 02, 2011, 01:41:34 pm »

Your block effects are interesting, any clues as to the cause? I mean if I had to take a stab in the dark, I might guess that to speed up the generator you multi threaded it, giving each 'block' it's own thread, but didn't give any way for them to interact, leading to less activity on the edges on such blocks.

On that note, it would be in your bets intrest to make the edges interact, so that the left conencts to the right, and the top to the bottem, giving some strange hyper dimentional sphere.

Your strange multidimensional sphere is actually a simple torus. Spheres in higher dimensions are much weirder than that.
Logged
Take me out to the black, tell them I ain't comin' back...
I don't care cause I'm still free, you can't take the sky from me...

I turned myself into a monster, to fight against the monsters of the world.

G-Flex

  • Bay Watcher
    • View Profile
Re: Project: The World is Just Awesome - Advanced Terrain Generator
« Reply #12 on: February 02, 2011, 01:55:15 pm »

Your strange multidimensional sphere is actually a simple torus. Spheres in higher dimensions are much weirder than that.

It's not even a simple torus, actually. It's toroidal, but with an odd distortion going on.

Let me put it this way: Imagine folding a square piece of paper like that. Fold it into a tube, then attempt to fold that tube into a torus by connecting the remaining edges. You can't! The outer circumference of the torus is greater than the inner circumference, which doesn't work here for obvious reasons. In other words, your typical RPG map isn't only a torus, it's a distorted toroidal shape that doesn't make much sense in real-world terms, as the area of some arbitrary section of the torus does not always equal the same amount of area on the map itself.
Logged
There are 2 types of people in the world: Those who understand hexadecimal, and those who don't.
Visit the #Bay12Games IRC channel on NewNet
== Human Renovation: My Deus Ex mod/fan patch (v1.30, updated 5/31/2012) ==

Nadaka

  • Bay Watcher
    • View Profile
    • http://www.nadaka.us
Re: Project: The World is Just Awesome - Advanced Terrain Generator
« Reply #13 on: February 02, 2011, 02:10:02 pm »

Right of course, I was assuming that people would understand that there is some distortion any time you attempt wrap a flat plain onto a curved surface. You can still wrap that sheet of paper into a torus without distortion if you allow the thickness between the inner and outer surface to be 0.
Logged
Take me out to the black, tell them I ain't comin' back...
I don't care cause I'm still free, you can't take the sky from me...

I turned myself into a monster, to fight against the monsters of the world.

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: Project: The World is Just Awesome - Advanced Terrain Generator
« Reply #14 on: February 02, 2011, 02:11:58 pm »

wrap a sheet of paper around a sphere. OMG! you can't!
Logged
Pages: [1] 2 3 ... 7