Tag Archive | Planets

Baby steps – Planet and Stars

How do you wrap a 2D image around a sphere? Well, the most familiar way to me is what 3ds max calls spherical mapping; you’ll have seen this if you’ve looked at a 2D atlas. The top and bottom poles of the sphere get a much larger area of the image than the middle of the sphere. Without correcting for this in some way, the top and bottom seem very pinched. I found a way of correcting for this, for a (horizontally tileable) texture in Photoshop. You can download a little action I made to help with this here. I’ll try and illustrate what you get from it with an image:

Top left – front view of sphere’s geometry with yellow UV seams at poles; top right – UV layout; bottom left – a cheap 2D grid texture I photoshopped together using my action; bottom right: the resultant sphere with texture applied. Although the grid on top and on the sides doesn’t match up, at least the scale is relatively consistent, which for most textures will be the most obvious thing if standing out.

Another way of mapping spheres, with less distortion, is using a cube map. This is just 6 images representing the positive and negative of the 3 axes – front, back, left, right, top, bottom. I’m probably going to use this method for a static “spherical” environment of a star-field, to indicate far off, where there is no geometry. It’s very cheap on modern graphics cards, and you can generate them in 3ds max easily using an existing environment. Here’s a quick test I did in the engine:

The cube map starfield was created in about a minute using a pflow system in max. It is apparently possible to generate a “real-time” cube map starfield texture procedurally, but I doubt my skills will be up to it in the near future. I’ll probably just create something prettier in max and photoshop, or maybe not use cube maps at all and go with pure geometry.

In the above image, the planet is a geosphere (triangles and no geometric poles) with spherical mapping using the method above with a PS generated texture. Obviously the lighting and shading are really dull at the moment. The vertical poles look pretty good, except when the LOD mesh kicks in – probably a UV interpolation issue. Not yet sure whether to go with procedural planets, moons etc, or bitmaps. I’ll leave it to when I really want to overhaul the graphics!

Advertisements

Game design document

Here’s an imaginary path for each iteration of the game that I’m making. If you have any ideas that you would love to see in a game like this, I would love to know! I enjoy keeping the ideas quite freely moving and changing until I have to actually make that version.

Version 0.1

  • A couple of planets, with gravity forces.
  • A rudimentary ship with a thrust and mouse-controlled turning, that can collide with the planets
  • In deep space, thrust is needed to accelerate or decelerate; thrust is also needed to land on planets else you die.
Version 0.2
  • Static enemy turrets, that can fire lasers at the smuggler ship
  • Smugglable resources and fuel on planets; cost money
  • Multiple solar systems
  • An exponential thrust system for the smuggler ship to quickly cover large distances
  • Fuel supply and damage amount for smuggler ship
Version 0.3
  • Other solar entities such as asteroids/ asteroid fields, stars, non-inhabitable planets – all cause damage to ship.
  • large-scale enemy ships with AI to avoid asteroids and planets, and fire at the smuggler
  • improved graphics 🙂 sound effects.
  • Trade/ smuggling screens for each planet’s resources
  • save/ load games
Version 0.4
  • Guns on the smuggler’s ship
  • Physics collisions with parts of smuggler’s ship breaking off
  • Modular repairs/ upgrades for smuggler’s ship, with per-module damage amount.
  • Small enemy ships with AI to chase the smuggler quickly and shoot at it.
  • Directional boosters (left right up down) for smaller ships.
Version 0.5
  • Ability to call for ally backup a limited number of times.
  • Galactic map…
  • Distinction between options of trading legal substances for less money or illegal substances with higher risks
  • Nefarious pirate ships
Version 0.6
  • Shady repairs, and occasionally vendors of ‘legal’ goods/ supplies, can screw you over.
  • Shields/ cloaking devices that fail if you take damage
  • Fuel stations and repair stations as well as planets
  • Non -smuggling ‘missions’ – take down satellites, get bounty hunters/ assassins trying to kill you, team up with other smugglers and protect them from incoming fire, kill off other smugglers taking your business, low-level flying and bombing planets.
Version 0.7
  • Ground level chases from tipped off police ships when loading/ unloading cargo
  • Given option to switch sides if your ship crashes on a habitable planet – you start taking out other smugglers and shutting down illicit substance manufacturers.
  • Buy planets to gain a steady income from illegal substances grown/ mined/ purified, but with high risk
  • Possibly combat mechanics like slow motion, different weapon types

I’m trying to think of a catchier name for this project than “smuggler game”. Do you have any ideas for a unique and interesting-sounding name? Thanks!