Announcement

Collapse
No announcement yet.

Modelling a sphere

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • mrmielke
    replied
    for those willing to help, there might be something starting to happen over at freeciv ... maybe.

    Leave a comment:


  • mrmielke
    replied
    the program you linked to is actually kind of cool, and it uses an important concept that I think will have to be used for spherical tiling: evenly distributing points and expanding them into tiles. that's what I meant by "nodes": the points later represent possible unit (or city) positions, and each connection to a neighboring node is a possible pathway for movement. if it is programmed this way, the tiles can be any shape. but my favorite is still the icosa/dodeca-based model (the same that Buckminster-Fuller used in his original patent paper).

    here's a picture I made yesterday, using 3d modeling... the red columns mark the pentagons at the corners of the original icosahedron
    click the image to go to a higher resolution version, size approximately 230 kB



    [EDIT] oh, btw, the image is of a grid with a multiplier of 16, by which I mean that each of the triangular faces of the original icosahedron is divided so that it holds 16*16 smaller triangles, which then each hold one "node". the resulting grid has 2550 hexagonal tiles plus 12 pentagonal tiles, which is approximately the amount of tiles found in a "standard" size civIII map. [/EDIT]

    the movement control by keyboard could be using the w-a-s-d keys plus e, z and x, making a nice little hexagonal motion pad:
    Code:
     w e 
    a s d
     z x
    if the player is on one of the pentagons, one of the keys simply has no function. preferably, since the whole display might not have a constant "north", the keys for movement should be superimposed on the surrounding tiles.

    city radii are absolutely no problem, since they are defined with the node system: any tile that can be reached in two movement steps is "within the radius" - usually that would be the city tile itself, the six tiles surrounding it and the twelve tiles around that, for a total of 18+1 tiles. in the vicinity of a pentagonal tile it will be a little bit less, but if that really bothers too much, the pentagonal tiles could get some marginal boost in "shields" (="hammers") and/or "gold".
    Last edited by mrmielke; June 14, 2006, 00:51.

    Leave a comment:


  • TimeTraveler
    replied
    Two weeks ago, I sought a new means of distributing tiles on a sphere, specifically for future games like Civilization (insert roman numerals here). I've looked at a myriad of patterns that failed to appeal to me for various reasons. The geodesic domes of 5-3-2 symmetry are the only ones that were even decent, and those still failed to appeal to me because of there being too few options for numbers of tiles.

    I found an online program where the user chooses a number of points, then how they would be evenly distributed around a sphere or torus (I'm mainly looking at the sphere). Before the points rearrange themselves to what seem to look like failed attempts at perfection, there's the option to have the program arrange them into a spiral formation. It reminded me of points where each point slightly further from a center would be the golden angle around that center from the last.

    I figured that making something that looked like this would still probably produce well-distributed points if the points were on a sphere. ...and I was right. I expanded the points into tiles and here are my creations.

    One globe of tiles and one simple latitude-longitude map. I'd make ones with more detail, but I don't know how to make a program to do it for me, and making it by hand can be really tedious and time-consuming. Anyway, my methods of creating the globe is here.

    Pros: It'll work for ANY whole number of tiles greater than 3, unless the number is so high that one's computer would crash from data overload (depends on the graphical detail and the computer's abilities. Raising it to 100000 or more generally shouldn't be too hard.) For common sizes, nearly all the tiles should be hexagons, with a few pentagons and fewer heptagons. Of similar sizes.

    Cons: Since the tiles are arranged differently from each other, there may have to be some new rules involving city radii, or even movement (not that I don't think those need to be done anyway, though). Using a keyboard to move about won't be easy, either. Also, most people won't be able to easily plot the maps on paper.

    Anyway, I figured it'd be worth some thought. So... any comments?

    Leave a comment:


  • alms66
    replied
    Originally posted by mrmielke
    is anybody still considering the spherical map idea? if so, please raise your hands. especially if any programmers are among you.
    I am a total fan of spherical maps (I want to play on a real planet! not a cylinder, not a donut, a planet!), and the icosahedron-based approach with hexagonal tiling (including the necessary twelve pentagons) should be comparatively easy. if it won't be done in this game, we might just want to start our own project...
    the internal representation of the grid would probably use nodes, with each node being the center of a tile and the middle between two nodes being the border of the tile.
    the graphics would need to be all 3d to avoid weird stretching of the tiles. I have some renderings of 3d models if anyone wants to take a look.

    so please, if any of you are interested: speak up!
    I can't speak for anyone else, but IMO, a tiled sphere would be the best possible map style for a strategic game of Clash's scope, level of detail and desired level of realism. I would be interested in seeing anything you've got in this regard.

    Leave a comment:


  • mrmielke
    replied
    is anybody still considering the spherical map idea? if so, please raise your hands. especially if any programmers are among you.
    I am a total fan of spherical maps (I want to play on a real planet! not a cylinder, not a donut, a planet!), and the icosahedron-based approach with hexagonal tiling (including the necessary twelve pentagons) should be comparatively easy. if it won't be done in this game, we might just want to start our own project...
    the internal representation of the grid would probably use nodes, with each node being the center of a tile and the middle between two nodes being the border of the tile.
    the graphics would need to be all 3d to avoid weird stretching of the tiles. I have some renderings of 3d models if anyone wants to take a look.

    so please, if any of you are interested: speak up!

    Leave a comment:


  • alms66
    replied
    Originally posted by demipomme
    Also, could someone explain CCS or point me in the direction of an explanation?
    CCS = Continuous Coordinate System

    This is the type of movement system used in RTS games. Units don't rely on squares, they just move to a certain point in space (x & y coordinate). Presumably, cities and borders would work the same way for Clash.

    Leave a comment:


  • demipomme
    replied
    What would a CCS map look like?
    If it is something like latitute and longitude, how do you counter for the increased resolution at high latitude?

    I had a think about a sphere of squares and found this picture on the web. I can't visualise it, but couldn't you smooth it out into a sphere of squares?
    Attached Files

    Leave a comment:


  • alms66
    replied
    Or if you're willing to accept a spherical world and not a true sphere.

    Leave a comment:


  • Lord God Jinnai
    replied
    In order to make a perfect sphere using anything but CCS some compromises will haveto be made.

    FE: You could use hexigons, but you'd haveto accept that there would be exactly 5 pentagons, no matter what size.

    Or triganles being the smallest unit, other than a pixel, to represent the map best would have exactly 5 areas where there would be 11 triangles vs. 12 as neigbors.

    Compared to using squares, those disortions pale into signifgance.

    There is no way around anything except with CCS.
    Last edited by Lord God Jinnai; February 1, 2005, 23:55.

    Leave a comment:


  • shimmin
    replied
    N.B. apologies for a mistake I made in the first post of this thread, even using triangles not every polygon is adjacent to the same number of polygons

    That's part of what I was referring to: on the example you provide, most of the triangles have 12 neighbors, but some have only 11.

    If this is acceptable, then you can also use squares: most of the squares have eight neighbors, but some will have 7.

    Leave a comment:


  • demipomme
    replied
    Also, could someone explain CCS or point me in the direction of an explanation?

    Leave a comment:


  • demipomme
    replied
    Originally posted by shimmin
    there are several ways to tile a sphere with like polygons, none of them scale up to using a large number of tiles.
    As far as I can see, triangles do scale up. Four (or more) equilateral triangles fit in each equilateral triangle. See picture below.

    There are really two separate issues in modelling a sphere:
    1. dividing the surface into evenly sized units
    2. presenting the sphere on a 2D screen (i.e. the use of projections)

    Number 1 is solved by using triangles.

    Number 2 can be ignored if the player only ever sees the world in 3D as a sphere. Zoomed in, it would look slightly flatter.

    N.B. apologies for a mistake I made in the first post of this thread, even using triangles not every polygon is adjacent to the same number of polygons
    Attached Files

    Leave a comment:


  • shimmin
    replied
    Before you give yourself a headache with the geometry, be aware that while there are several ways to tile a sphere with like polygons, none of them scale up to using a large number of tiles.

    If you want a tile-based system with spherical geometry, you must accept that there will be a few corners, and then adapt your game mechanics so that they will not be terribly distorted at these corners.

    Leave a comment:


  • Max Sinister
    replied
    I always thought the problem with a CCs would be the question how you represent streets - it's easy for a unit to go from (x1, y1) to (x2, y2), but how do you get the fastest way from here to there? It's hard enough with tiles. Maybe it would help if you represented the roads not as one-dimensional lines, but as long-stretched areas, but I still don't know a working pathfinding algorithm. And that's what you'd need, right?

    Leave a comment:


  • LDiCesare
    replied
    I still have a document on icosahedra somewhere on my files (there's something to do with pentagons when you're trying to pave a spgere correctly, but I don't remember all of it - it's somewhere on these forums).
    The CCS is Gary's dream, so it very much depends on him having time to do it.

    Leave a comment:

Working...
X