Saturday, March 31, 2012

The Space station challenge.



Wesley Bruce
We need a radial world builder.
For decades now people have designed space stations for human habitation off the earth. The International Space Station is our first but while its nice zero g lab you would not want to live there.
It's been known since 1920's that any truly habitable space-station has to be a big centrifuge built with materials predominantly mined from off the earth. The minimum viable radius is 80 m and the maximum revolutions per minute is 1.2 rpm. But most are much larger in size, something like this:

That's an O'Neill island 3. The design is from 1976. Each cylinder is: 5 miles (8.0 km) in diameter and 20 miles (32 km) long and with 3 valley's per cylinder that look like this:
The valleys combined yield a usable land area of 157 square miles and the small cylinder ringing the larger cylinders are 0.5 g farm units
We also have designs for torus's that look like this:



 

Hopefully many are aware of these designs.

There are good animated designs on Youtube but none that you can walk about in. http://www.youtube.com/watch?v=zBIQCm54dfY 
and
and

While these models and fly-through's are OK; building a world you can walk around in is difficult. Bungie managed it with Halo using a very smart skybox solution and we would need that in any space station design. However to create something that works well and gives the feeling that your really there we need to innovate. Something that makes people feel as if their in the future requires a dedicated physics engine and creative code to solve Level of Detail problems caused by angle.

To do a centrifugal space station the normal x,y,z parameters of a game physics engine are inadequate. It does not handle curvature well and gravity is locked in one direction causing endless code problems. Several people including myself have tried to do something in Second Life and have found it exasperating to say the least. While not totally fruitless, the work at Space Destinies in Scilands stresses Second Life's LSL code to the limits. (Sadly Space Destinies is gone from Second Life.) 

To really work well we need a physics engine that defines x as an axis, y as an angle around x in degrees, minutes and seconds, and z as a radius out from the axis x. In three dimensional space therefore x=0, y=0, z=0 needs to be defined in an more normal x',y',z' co-ordinate system so graphics engines don't have a fit and crash.
 We may use x, Ω and r for axis, angle and radius to avoid problems. However Ω is not a standard letter which may increase code size and decrease speed. I don't know if it will. 
My code writing proof reader tells me it will and we will need to stick to 'o' or something.
Care must be taken not to add the angles as non angle numbers. Because there is both a 3d coordinate system and a radial coordinate system it is possible to build several spinning stations in the one 3d space. Thus will require an additional parameter 'spin direction', clock wise or anticlockwise relative to x' = 0 y' = 0 or the sun.

Objects are placed at an x, y,z coordinate but with the object orientation in the z direction. At high z that is not a problem the surface is near enough to flat. To prevent edges from disappearing into other objects and overlapping textures jittering we may need to adjust the edges or come up with edges that fold down at an angle. I am a firm believer in giving virtual trees roots (no collision) that reach down into the ground so that you don't get the floating tree problem on slopes. 

Object rotation is a challenge because it adds an extra two bytes to record the angle or 4 bytes if the rotation is on two axies. The larger an object is the better in this respect. Using a single byte 1-255 and multiplying by 1.4 round nearest would work. Another solution is to sum the absolute value of the x,y,z coordinates into a seed angle and use that for random objects: flowers, trees, rocks. It may be possible to add a class of objects called key stones. These have orientation saved for them and all the adjacent objects in the non random classes calls the angle from the nearest key stone and assumes that orientation. Best for structural elements that are not the hull, walls or end caps but are buildings, roads, water flows, hedgerows. These may be treated as optional extras where other orientation options are established.

Gravity needs to be defined by three parameters. Parameter 'Inspin': is the location in the centrifuge or not. If 'Inspin' is yes then what's the locations rate of rotation 'RPM' and radius = r in meters. RPM constrains rotation to prevent dizziness. RPM over 1.2 is unusable for a general populous. Gravity due to centripetal force is a= v^2/ r. For r we can use z since its a radius.
G is 1 where v is 99 m/s for z = 1000m and RPM of 1. v = RPM/z
Very large space-stations 8 km radius can have RPM as low as 0.35 rpm. A v of 293 m/s
Note: Close to the axis gravity will diminish to zero because r [z] drops to zero. At the axis we have a potential divide by zero problem so if z is less than 10 inspin is 'No' to avoid the problem. 10 provides a buffer, 1 might not suffice.
and

If 'In spin' is No then the player or object is in zero g. Objects should not fall and players should fly. Even cattle should fly in zero g. [It may be a little stress full and ruin the milk!] flying speed should be near zero for anyone without a propulsion aid. That's why the International Space Station has few big empty spaces. Its possible to get stranded with no wall in reach and flapping your arms does not get you very far.

There are several other problems to be solved. As objects are built or placed in the habitat adjacent in the y angle they will converge in the centre x axis. For very tall objects this will produce acute angle collisions. If everything is rectilinear, or uses square bounding boxes, the code may crash. Some procedurally spawned triangular objects, gap fillers will help. Adding a minimum z limits on some objects solves this problem.
Space stations have end caps in the case of the spheres and cylinders and side walls and ceilings/windows in the case of the torus designs. Building these by hand is hard so a procedural method is required ideally at the new world creation phase.

In some cases the centrifuge is inside a larger pressurized hull. Sea of Suns SF and my banked track space station design. In this context we need another surface. One that represents a hull moving past you at 100 m/s. It needs a corresponding fast moving animation. Contact with this surface should be fatal without special tools. [I can see ways to do the special tools to jump on or off, in a real space station. I need an armoured suit with wheels on it and a powerful electro magnet. ]

LOD level of detail problems need to be dealt with because in a space station you can see other areas of the space station several miles away. Here is no horizon when your in a bottled city. 
 That's a horizonless New York downtown.
From http://berglondon.com/projects/hat/

For a closed world which is highly constrained this is just a skybox problem. For a true open world simulation this is a problem since you can see things due to the inside out nature of the world. Minecraft is one case that handles very high lod problems created by the ability to build very high, 255 in the current game. This means you can see many km away. Another solution is to edit the sky box on the fly to display a lower resolution image of the areas seen. This would be similar to the minecraft mapping resolution. We could use several options for longer distances including 2 to 6 pre-saved default texture maps, 9 chunks, per biome that are tiled to form the unexplored area. These would influence the higher resolution map when its crafted if the player ventures into that area. A last ultra long distance option is green, blue, brown and yellow surface fog.

Building blocks for the world need to include some large hull plates, rock sheets, soil over hull plates, and windows. Some stations have windows in the floor illuminating the valley opposite. Each would need flat, 2d curved and spherical geodesic. To minimise save file size and edge to edge fitting they need to be relativity large. Given the rules of space-station architecture they would be very robust. High but not infinite hit points.

The result would be a representation of these spaces station for educational purposes and for gaming. Because education is my primary short term goal the result needs to be reasonably realistic with procedural landscapes and some buildings. Because many interested in manned space colonization will want to place their stuff in our world it needs to be open I.E. Compatible to open source objects or objects from sketch up, Maya, blender, wings, etc.

If we want to build gaming worlds then appropriate foes would be a would-be dictator and his troops, terrorists, aliens, rebellious robots, or in the case of a space-station world that is very old; primitive humans armed with bows who barely believe in the existence of earth. Big Guns are likely to be banned in such a space  station. If your trying to take a space station intact you may want to limit you weapons to non lethal stunner's, dart pistols, gas grenades and bows. Some space stations may be populated with animal transplanted from earth. This may go beyond sheep and cattle to include dangerous endangered species and genetically modified creatures that they wont allow you to grow on the earth. That could go wrong badly particularly if someone takes violent offence at your killing their newly created GM pet dinosaur.

A suggested option list is possible. It is only included to ensure that the magnitude of the options purists will demand is fully appreciated early. [So you can chicken out now. lol.]
At the creation of a new world the player, world crafter, would be asked for:
Station type:
  • Sphere (Bernal sphere) has a main length of 1m to 100m. Radius over 400 m; optimal 1km. Most buildings are on the hemispherical end caps lower slopes. Generally its terraced.
  • A cylinder has a main length of 101m+, hemispherical end caps.
  • A torus has two parallel walls and an arched glass roof at the roof height. Torus wall height is half the roof height.
  • Banded torus (Crystal-palace) is multiple tori side by side with some of the side walls removed creating a very wide torus.
  • Dumbbell; A pair of balls on each end of a stick or string [Tether]. Often dome shaped habitats. Main length is a width of the dome and the circular base. rotational radius is the full length of the dumbbell. 
  • Beaded torus; The same as Dumbbell but with more domes. With 4 to 20 domes defining each section and some sections are not drawn if their not opposite another bead.
  • Bubble is zero g, air filled but has a narrow and low centrifuge somewhere inside generally on the equator. In this case most activities are zero g with the centrifuge taking the form of a subway train full of apartments, gyms, a school, etc. {This is my own design. http://bit.ly/BankedTrackGravity}
Material: Metal, asteroid rock, glass.
  • Metal is the default.
  • Asteroid rock is bumpy,
  • Glass is generally only used for bubble. Actually this is not just glass but may also be diamond sheet, reinforced polymer, transparent aluminium, biological material, or clear unobtainium.
Main radius. The radius of the main habitat floor. There may be rooms, basements, below this in some cases.
Main length. The length of a cylinder or the width of a torus. Also the diameter of a dome making up a dumbbell or beaded torus.
RPM.
Percentage urban: rural: mountain: wild.
  • Urban, buildings, concrete, some flat and sloping grassed areas, some trees.
  • Rural. Farm houses, Grass, woods, hedgerows, roads, and ponds.
  • Mountain. Large hollow buildings with earth roof and walls or sculpted cliffs. Some trees.
  • Wilderness. Lots of trees, smaller patches of grassed clearings and ponds. Some rivers.
Zero g radius and length. Some stations have large non spinning structures out side the end caps. These take 4 possible forms. This may also need a separate material option.
Zero g Habitat Type:
  • Large pressurised industrial voids.
  • Tunnel and rooms. All zero g with some unpressurised rooms and tunnels.
  • Zero g farm. Lots of floating trees, 3d vines and puff ball plants.
  • Mixed: all three.
    Airlocks define pressurised or vacuum. The vacuum is contagious spreading from room to room. The bubble space-station design can use this zero g architecture with no vacuum rooms (until someone does something stupid ).

Lights/ Windows:
  • Valley: The window is in the floor with a soil covered area opposite and adjacent. Normal in cylinders.
  • Mountain: A structure on the valley that has stone side walls and earth covered slopes and glass lens on top spreading the light across the opposite face. I.E. Rama's lights. They allow smaller windows and more living space.
  • End cap: Window above 60 degrees on each end cap. Normal for the Bernal sphere.
  • Axial light: a fusion lamp or solar light pipe running the length of the structure at zero radius. Used in all toruses and any of the others.
  • Sun clouds are small glowing drones.
Torus options number: 'TOB” between one and 20. Two body spin locks TOB to 2.
Torus roof hight.
  • The highest point of the glass roof. It's arch curvature is set by the ratio of this value and main length. In Banded torus its curvature uses 1/TOB x the main length. The arch repeats TOB times. In the beaded torus the main length is much greater than the roof hight. It also curves down to the circular wall. I.E. its a dome. TOB sets the number of completed beads.

This parameter list covers all the current space station designs including the ISS. It is only a suggestion and need not be done all at once.

It would be nice if we could simulate Coriolis forces with reasonable accuracy. Objects will not fall straight down they will fall in the opposite direction of the stations spin. Flying objects will veer in the same direction. Water will form complex eddy patterns even in slow flows.

I can see what is needed but I can't write the code. Dyslexia makes me a lousy programmer. I have done some programming training way back in the 1980's and know some more modern languages. I know how it works but I just don't have the speed and memory for it. I need to build a team. I have no starting funds so it needs to be an open source project or a component of a commercial game.

Wesley Bruce

Skype: wesley_ian_bruce


No comments: