Planetfall

Blitz3D Forums/Blitz3D Programming/Planetfall

Farflame(Posted 2003) [#1]
Ok, I may be being a bit over-ambitious here, particularly as I'm fairly new to 3d programming, but I'd be interested to know if this is possible or if people have tried it.

I'm working on a space game. The stuff in outer space is working fairly well, but I need to be able to go down onto the planets. The obvious way to do this is simply to 'switch screens' when you go onto a planet and then work with a terrain. However, what I'd really like to do, is to be able to seamlessly move from space onto the planet. If the planet has a thick atmosphere, this would be fairly easy as I could just apply some thick fog for a second or two, to simulate re-entry and then switch to the terrain while the screen is covered in fog, but for a planet without an atmosphere, the only way to do it would be to 'build' the planet from the terrain so that it's fully visible from space.

So I guess what I'm asking is, is there a way to make a terrain into a globe? This way, the terrain would actually be part of space too and there'd be no switching. Any buildings on the surface would be visible from space, and once you land on the surface you could look back up and see whatever's up there.

Right now I'm using the simple option of creating a sphere and just drawing the terrain onto it as a texture but obviously, once you reach the surface, it's totally flat.


Ross C(Posted 2003) [#2]
Check out the samples folder >> blitz 3d >> birdie >> spherical landscapes. It makes a planet like landscape. It might be a start?

For you planets in general tho, you've got a good idea about making the transition in the atmosphere. Represent you planet as just a sphere or something then when you fly in, get rid of all the space related stuff, and make it so the user can't see back into space until he's thru the atmosphere or something (could write it in that the ship needs to cool before it can work it's way back out the atmosphere or something :o) )
And while hiding all the space stuff, start either loading in the planet stuff little by little so the player doesn't notice the delay so much, or unhide all the planet stuff.


IPete2(Posted 2003) [#3]
You can always use some clouds/atmospheric effects to switch between space and the planet.

Someone else had a similar problem/idea a little while ago.

Great thing about 3d worlds is they can have several models with different landscapes and space and underwater scapes - whatever.

IPete2.


Perturbatio(Posted 2003) [#4]
I had an idea about spherical terrains as well (like populous 3 but maybe a bit larger), problem is you're not going to get blitz terrains to be spherical.

You will have to deform a high-poly sphere.

Best thing I can think of (off the top of my head), is perhaps a LOD planet, use the low poly version for in space (maybe implement bump mapping once it's all sorted out), switch to the high poly whilst going through the atmosphere.

Or have multiple LOD's which are revealed depending on altitude, only when they are close to the ground could you get away with Blitz terrains.


RexRhino(Posted 2003) [#5]
What the computer game "Orbiter" seems to do (if you are making a space sim, you should DEFINITLY check out Orbiter, it is probably the definitive space simulation)is create a giant planet sized sphere, and then attach a smaller "launch pad" or "landing pad" object to that sphere.

So, when your Saturn 5 rocket is launching from Cape Canaveral, the launch pad and buildings are models, and there is a high quality texture of the cape for larger terrain in the distance. As you get higher and higher, the buildings fade away, and you are looking at the high altitude texture of the cape. After you get higher still, it fades into the global texture. Here is what it looks like:[image]http://www.medphys.ucl.ac.uk/~martins/orbit/images/gallery34.jpg[/image]
[image]http://www.medphys.ucl.ac.uk/~martins/orbit/images/gallery28.jpg[/image]

The effect sometimes doesn't work super well... here is an example of where the two textures don't match:
[image]http://www.medphys.ucl.ac.uk/~martins/orbit/images/gallery45.jpg[/image]

But I think this is the most seamless you could make it.


Farflame(Posted 2003) [#6]
Yes, those ideas will all work and I can fall back on them if I can't get this to work out, but I'll fiddle around to see if I can.

Another problem I can see with turning a terrain into a globe, is that the poles become too deformed and would be unusable, but I could get round that by just making them ice-covered.

My game is more of a space-management game, so you don't actually steer your ship, you'll just order it into (or out of) the atmosphere. So if the worse comes to the worse, you could issue the order and then lose access to the ship completely until it arrives on the planet. Then you pop down to re-access it and get a new planet view (possibly from an isometric angle so you can't see up into space anyway).

It will be much nicer to ride down through the atmosphere though and see the planet unfolding before your eyes :)


Perturbatio(Posted 2003) [#7]
you can get around the deformation by using a Geo-Sphere, I'm sure someone posted code on how to make one somewhere


Farflame(Posted 2003) [#8]
Sounds interesting, anyone got a link to info on geo-spheres?


Perturbatio(Posted 2003) [#9]
maybe here

*edit*

http://216.239.59.104/search?q=cache:orjkMxdgausJ:www.flipcode.com/cgi-bin/knowledge.cgi%3Fshowunit%3D20+programming+create+a+geosphere+3D&hl=en&ie=UTF-8


Perturbatio(Posted 2003) [#10]
if you like, I can create a few Geospheres in truespace and post a link to them


Farflame(Posted 2003) [#11]
Hmmmm, looks like what I'm looking for, and some of those spheres seemed to have uniform sized surfaces, so no deforming at the poles. That might just work, although it looks like I need to put my math-head on :)