Announcement

Collapse
No announcement yet.

Modelling a sphere

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

  • Modelling a sphere

    Before I begin, I realise the controversial nature of this post and understand that this will never be implemented. I do however want to post it, just so its out there.

    One of my biggest annoyances with civ 2 was the cylindrical world, so I have alway been a fan of a spherical world. It was not till recently however that I realised that squares don't fit on a sphere. So I set out on a quest to find a polygon that would enable a map spherical map:

    - every polygon is of the same type (this excludes the hexagon-pentagon mix of soccer balls)
    - every polygon is adjacent to the same number of polygons (this excludes cubes the corner squares of which are adjacent to seven rather than eight squares)
    -the polygons are regular

    The only answer I can find is to use equilateral triangles. I didn't like the idea at first, but it doesn't look too bad...
    Attached Files

  • #2
    Hi demipomme:

    This has been discussed several times. Actually once we go to a continuous coordinate system (if we ever get there) then a sphere would be relatively easy. You should be able to find some of the earlier discussions by searching. I did one on "spher" but on got a Really old 1999 thread. There have been much more recent ones that I'm sure you can find if you're interested.
    Project Lead for The Clash of Civilizations
    A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
    Check it out at the Clash Web Site and Forum right here at Apolyton!

    Comment


    • #3
      What are the likelihoods of a CCS being implimented then?
      Which Love Hina Girl Are You?
      Mitsumi Otohime
      Oh dear! Are you even sure you answered the questions correctly?) Underneath your confused exterior, you hold fast to your certainties and seek to find the truth about the things you don't know. While you may not be brimming with confidence and energy, you are content with who you are and accepting of both your faults and the faults of others. But while those around you love you deep down, they may find your nonchalance somewhat infuriating. Try to put a bit more thought into what you are doing, and be more aware of your surroundings.

      Comment


      • #4
        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.
        Clash of Civilization team member
        (a civ-like game whose goal is low micromanagement and good AI)
        web site http://clash.apolyton.net/frame/index.shtml and forum here on apolyton)

        Comment


        • #5
          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?

          Comment


          • #6
            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.

            Comment


            • #7
              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

              Comment


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

                Comment


                • #9
                  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.

                  Comment


                  • #10
                    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.
                    Which Love Hina Girl Are You?
                    Mitsumi Otohime
                    Oh dear! Are you even sure you answered the questions correctly?) Underneath your confused exterior, you hold fast to your certainties and seek to find the truth about the things you don't know. While you may not be brimming with confidence and energy, you are content with who you are and accepting of both your faults and the faults of others. But while those around you love you deep down, they may find your nonchalance somewhat infuriating. Try to put a bit more thought into what you are doing, and be more aware of your surroundings.

                    Comment


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

                      Comment


                      • #12
                        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

                        Comment


                        • #13
                          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.

                          Comment


                          • #14
                            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!

                            Comment


                            • #15
                              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.

                              Comment

                              Working...
                              X