Bay 12 Games Forum

Please login or register.

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

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

Shades

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

wrap a sheet of paper around a sphere. OMG! you can't!

Sure you can, just depends on the shape of the sheet.
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 #16 on: February 02, 2011, 02:27:27 pm »

flat sheet.
Logged

Kogut

  • Bay Watcher
  • Next account: Bulwersator
    • View Profile
Re: Project: The World is Just Awesome - Advanced Terrain Generator
« Reply #17 on: February 02, 2011, 02:34:14 pm »

Funny, I just started doing sth similar (but for now I have flat world and I am making animal interactions).
Logged
The worst bug - 34.11 poll
Tired of going decades without goblin sieges? Try The Fortress Defense Mod
Kogut, the Bugfixes apostle of Bay12forum. Every posts he makes he preaches about the evil of Bugs.

Duke 2.0

  • Bay Watcher
  • [CONQUISTADOR:BIRD]
    • View Profile
Re: Project: The World is Just Awesome - Advanced Terrain Generator
« Reply #18 on: February 02, 2011, 02:35:55 pm »


It's a rather strange a sheet, but still a flat sheet.
Logged
Buck up friendo, we're all on the level here.
I would bet money Andrew has edited things retroactively, except I can't prove anything because it was edited retroactively.
MIERDO MILLAS DE VIBORAS FURIOSAS PARA ESTRANGULARTE MUERTO

Nadaka

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

It will still be distorted when wrapped on a sphere, less than a rectangle, but still distorted.
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.

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 #20 on: February 02, 2011, 02:45:49 pm »

   Actually maps like that are made to not distort though
that one might. Its a weirder shape then it has to be
because whoever made it wanted to keep from cutting up
any continents.
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.

Kogut

  • Bay Watcher
  • Next account: Bulwersator
    • View Profile
Re: Project: The World is Just Awesome - Advanced Terrain Generator
« Reply #21 on: February 02, 2011, 02:48:59 pm »

maps are made in ways to reduce distortion - it is impossible to keep accurate area, shape etc in the same type of map projection [ http://en.wikipedia.org/wiki/Map_projection#Choosing_a_model_for_the_shape_of_the_Earth ].

EDIT: from enwiki: NOTE: Because the sphere is not a developable surface, it is impossible to construct a map projection that is both equal-area and conformal.
Logged
The worst bug - 34.11 poll
Tired of going decades without goblin sieges? Try The Fortress Defense Mod
Kogut, the Bugfixes apostle of Bay12forum. Every posts he makes he preaches about the evil of Bugs.

Eagleon

  • Bay Watcher
    • View Profile
    • Soundcloud
Re: Project: The World is Just Awesome - Advanced Terrain Generator
« Reply #22 on: February 02, 2011, 03:14:27 pm »

Guys, you're missing the simple solution here - reduce the paper to a soggy mass and spray the map over the sphere in a fine mist.

Problem, cartographers?
Logged
Agora: open-source, next-gen online discussions with formal outcomes!
Music, Ballpoint
Support 100% Emigration, Everyone Walking Around Confused Forever 2044

Virex

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

Guys, you're missing the simple solution here - reduce the paper to a soggy mass and spray the map over the sphere in a fine mist.

Problem, cartographers?
I think that would make a lot of Topologists cringe. If you're not careful you may also end up with 2 maps instead of one.
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.
You could make your flood fill algorithm look at the plate's direction. If it hits a discontinuity in the direction of movement, you've hit a future rift. Of course this would mean plates moving parallel to each other are considered as one plate so if you need to you may want to catch that.
Logged

Shades

  • Bay Watcher
    • View Profile
Re: Project: The World is Just Awesome - Advanced Terrain Generator
« Reply #24 on: February 02, 2011, 04:26:44 pm »

maps are made in ways to reduce distortion - it is impossible to keep accurate area, shape etc in the same type of map projection

It's not impossible, you just don't make a conformal one. Unwrapping a sphere is easy, and a map on a sphere would also be perfectly fine on the unwrap. It's just north would not be the same direction at every point and so would be a fairly unhelpful as a map, but a still flat sheet and fit perfectly onto the sphere. And if you still don't think unwrapping a sphere is possible, try peeling an orange in one connected layer and laying the skin flat.

If your talking about conformal, rectangular maps then yes you have a point but when your talking surface map generation there is no need to stick that that.
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

Nadaka

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

An orange peel is elastic. when you lay it flat after peeling it, it distorts. To place translate a surface curved in more than one dimension onto a flat surface you must distort it. You can never slice it to 0 wide stripes, because then the flat map would have no area. Any non-0 slice of that curved surface will itself be curved and have to be distorted to lay flat.
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.

Shades

  • Bay Watcher
    • View Profile
Re: Project: The World is Just Awesome - Advanced Terrain Generator
« Reply #26 on: February 02, 2011, 04:40:40 pm »

An orange peel is elastic. when you lay it flat after peeling it, it distorts. To place translate a surface curved in more than one dimension onto a flat surface you must distort it. You can never slice it to 0 wide stripes, because then the flat map would have no area. Any non-0 slice of that curved surface will itself be curved and have to be distorted to lay flat.

Your right, I'm being an idiot and not thinking straight. Sorry
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

Nadaka

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


Your right, I'm being an idiot and not thinking straight. Sorry

no need to apologize!  Did my text have a mean tone of voice? It does that some times. Oh, and you should totally ignore my ridiculously bad grammar. Sometimes when I rewrite a sentence, it forget to do the whole thing.

I should think of something I can say that is on topic...

This is an interesting idea, though I generally use midpoint displacement to produce fractal maps that just look nice, instead of being physically accurate.
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.

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: Project: The World is Just Awesome - Advanced Terrain Generator
« Reply #28 on: February 02, 2011, 05:32:23 pm »

I just realized that you want the edges of plates to be where the stress exceeds a certain threshold, for which you could just use vector math. Since stress is proportional to the difference between a plate's general movement direction and the direction that the underlying magma is moving in, the general stress at any one point can be defined as:

S = Vp-Vm
With S the stress, Vp the plate velocity and Vm the magma velocity at the given point, all vectors.


This stress consists of 2 parts, compressive stress, Sc and shear stress Ss. You'd probably only want to get plate boundaries there where either |Ss| (the magnitude of Ss, defined as sqrt(Ss.X2 + Ss.Y2)) is sufficiently large, or where |Sc| is sufficiently large and in the same direction as the plate's movement. In the case where Sc is in the opposite direction, the plate is being compressed which does not cause a plate rupture (but it may have other effects).


Sc = S * cos(a),
Ss = S * sin(a),
With a the angle between S and Vp


So for a given initial Vp the plate boundaries can be calculated. The problem is now that while the rupture zones can be found, there is no guarantee that these zones will actually connect to form new plates. To ensure this, it'd probably be best not to blindly calculate where Sc or Ss crosses a certain limit. Instead it should be observed that a rupture at one spot will induce stress in the rest of the rock. This stress, Sr, is in addition to the already existing stress, which means that a small rupture can propagate trough the rock until it hits another rupture.


To solve this, observe that at a rupture, there are essentially 2 plates being formed. The direction and magnitude of Sr are proportional to the stress causing the rupture, but on either end of the rupture the direction of Sr is directly opposite to the direction of Sr at the other side. So a rupture due to a high Sc will lead to Sr1 and Sr2 pointing away from the rupture, while a rupture due to a high Ss leads to Sr1 and Sr2 that are perpendicular to the rupture but in opposite directions.


To then calculate how the crack will propagate, for the points around the rupture, evaluate S' = S+Sr, obtain S'c and S's and see if new cracks are created. This will probably cause a lot of small cracks around existing cracks. To combat that, make a rupture only propagate along the line where S'*cos(b) is the highest, where b is the angle between the local direction of the rupture and S'.


Now, this doesn't completely solve the problem yet. A rupture may hit a "dead zone" trough which it can not propagate, leading to ruptures that start and end in nothing. This can be avoided by scaling Sr with a value L, where L is a function of the length of the rupture it connects to (I'd expect a logarithmic function to work well, but you'll need to experiment with this). This way, a long rupture will have the tendency to continue even if the local bedrock is not under large stresses. Finally, terminate a rupture as soon as it hits an existing rupture.
After running the rupture algorithm, obtain directions for the newly created plates using a flood-fill algorithm and optionally rerun the rupture algorithm, with 1 modification. In the calculation of S, also take into account the stress caused by one plate pushing against another.


Edit: I see you've already got compressive and shear stress worked out, so feel free to ignore the trigonometry if you don't need it.
« Last Edit: February 02, 2011, 05:42:41 pm by Virex »
Logged

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: Project: The World is Just Awesome - Advanced Terrain Generator
« Reply #29 on: February 02, 2011, 06:07:07 pm »

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

EDIT
It's not even a simple torus, actually. It's toroidal, but with an odd distortion going on.
Well, thank you even more so.  :D
Pages: 1 [2] 3 4 ... 7