Sign in to follow this  
Wavinator

Civ IV's Planet Trick

Recommended Posts

I'd like to do some research on how maps in Civilization IV work. Can anyone speculate on the technique they use to zoom from their strategic ground view all the way to a planet in space? I have a suspicion that for the strategic view may be using terrain "tiles" to create the random maps, and at some point switching to a sphere with vertices roughly corresponding to where cities and territory would be. Then again, I may have been taking too much cough medicine. Anyways, I'd love to read up on the technique but I'm not sure how they do it. Any help appreciated.

Share this post


Link to post
Share on other sites
couldn't it just be a very strong fisheye? they used a fisheye to simulate a sphere in tetrisphere (which was a square grid where you played on) and in that one simulation game where you where god. it was version 3..

hm.. forgot the name.


"just" setup a fisheye lense and you're done. (don't ask me how, i don't know)

Share this post


Link to post
Share on other sites
It could be a cylinder mapped to a sphere.Because the game maps in civ4 are actually rectangles you can go east and reach where you started but you cant go north to reach where you started.
So it may be a rectangular grid mapped to a cylinder and then to a sphere.
Just a thougth and don't ask me how, i don't know lol ;)

Share this post


Link to post
Share on other sites
They most likely just warp the map to look spherical, and disregard what's happening in the back invisible portion of the sphere, where tiles are probably overlapping each other and not connecting together correctly. To warp the rectangle map into a perfect sphere would require a lot of ugly distortion.

You could do the same thing with a space game. Visible planets only need to look correct from the camera's perspective.

Quote:
Original post by Black Knight
It could be a cylinder mapped to a sphere.Because the game maps in civ4 are actually rectangles you can go east and reach where you started but you cant go north to reach where you started.

You can actually do both with certain map settings.

Share this post


Link to post
Share on other sites
Quote:
Original post by Kest
They most likely just warp the map to look spherical, and disregard what's happening in the back invisible portion of the sphere, where tiles are probably overlapping each other and not connecting together correctly. To warp the rectangle map into a perfect sphere would require a lot of ugly distortion.


Okay, I can see this happening. And when you orbit left and right I imagine they could just use the camera's position as the coordinates for the center of projection. So you could spin around the world but never see how screwed up in the back it was.

Quote:

You could do the same thing with a space game. Visible planets only need to look correct from the camera's perspective.


Thanks Kest! I'm off to look for newbie tutorials on this.

Share this post


Link to post
Share on other sites
Quote:
Original post by davepermen
couldn't it just be a very strong fisheye? they used a fisheye to simulate a sphere in tetrisphere (which was a square grid where you played on) and in that one simulation game where you where god. it was version 3..

hm.. forgot the name.

Populous 3?

Back on topic, I suspect you can get this effect fairly easily by laying your geometry out on a flat strip and having a vertex shader which can interpolate the vertex positions between their initial state and one warped around a sphere. That would mean it's connect properly at the back, but tiles would get pretty warped near the poles. IIRC Civ cheats and doesn't let you go near the poles so they can substitute some regular geometry there.

Share this post


Link to post
Share on other sites
Quote:
Original post by Kest
They most likely just warp the map to look spherical, and disregard what's happening in the back invisible portion of the sphere, where tiles are probably overlapping each other and not connecting together correctly. To warp the rectangle map into a perfect sphere would require a lot of ugly distortion.

You could do the same thing with a space game. Visible planets only need to look correct from the camera's perspective.

Quote:
Original post by Black Knight
It could be a cylinder mapped to a sphere.Because the game maps in civ4 are actually rectangles you can go east and reach where you started but you cant go north to reach where you started.

You can actually do both with certain map settings.


I couldn't manage to go over the poles.Which settings are you talking about?
It would be fun if I could send planes over the poles :P

Share this post


Link to post
Share on other sites
Civ IV maps played with the toroidal setting (instead of the cylindrical setting) can be navigated, scrolled, and planet-viewed in all directions. I think that map setting is exclusive to the Warlords expansion, though. I haven't played the original for a while, so I can't be sure.

Share this post


Link to post
Share on other sites
Quote:
Original post by Wavinator
I'd like to do some research on how maps in Civilization IV work. Can anyone speculate on the technique they use to zoom from their strategic ground view all the way to a planet in space?

I have a suspicion that for the strategic view may be using terrain "tiles" to create the random maps, and at some point switching to a sphere with vertices roughly corresponding to where cities and territory would be.

They actually described how they did it in an interview or postmortem ages ago... Unfortunately, I don't have the link, and I can't remember exactly what they said. You might be able to dig it up. A postmortem probably isn't a bad bet.

But yeah, they cheat, and at a certain zoom level they morph the planet into a sphere instead of a flat tilemap. What you see when zoomed out on the planet-level is completely different geometry from what you see on the normal strategic view. (It's not just warped like Kest says.... I think. Been a few years since I read the article... [grin])

(On a different note, I actually think it's a pretty crappy effect. Makes me dizzy to look at it, and just isn't anywhere near convincing... On the other hand, I can't think of a better solution)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this