Hey, how it works is that when you get to a certain distance from the planet, it slowly fades another sphere (the terrain) into view, the terrain sphere is created at the start with slightly deformed polys to make it look like mountains, but im going to completely redesign the system using the more complex subdivision method (what the infinity engine uses on the video you sent me) which makes much more detail by subdividing the poilygons giving improved detail, here is the code for my old terrain system if anybody wants it:
`Old Terrain System for Seamless space to planet transition by Serial Velocity
load dll "user32.dll",1
ScreenWidth = call dll(1,"GetSystemMetrics",0)
ScreenHeight = call dll(1,"GetSystemMetrics",1)
delete dll 1
set display mode ScreenWidth , ScreenHeight , 32
sync on
autocam off
sync rate 60
hide mouse
randomize timer()
center text screen width()/2,screen height()/2,"Loading"
`Set variables
planet=1
planet_detail=2
size=1000
`____________________________________________________________
`Build Planet
`____________________________________________________________
`********* This Part is not necessary *********
`Make textures
cls rgb(120,120,120)
for a=1 to 2000
colour=rnd(100)+100
ink rgb(colour,colour,colour),0
circle rnd(512),rnd(512),rnd(20)+10
next a
get image 1,1,1,512,512
cls 0
ink rgb(255,255,255),0
cls rgb(120,120,120)
for a=1 to 90000
colour=rnd(100)+100
ink rgb(colour,colour,colour),0
dot rnd(512),rnd(512)
next a
get image 2,1,1,512,512
cls 0
ink rgb(255,255,255),0
`**********************************************
`Build the planet
make object sphere planet,size,50,50
texture object planet,1
position object planet,0,0,0
`Build the detail map
make object sphere planet_detail,size+((size/1000)*2.2),60,60
position object planet_detail,object position x(planet),object position y(planet),object position z(planet)
texture object planet_detail,2
scale object texture planet_detail,60,60
set object transparency planet_detail,3
`Add bump effects
lock vertexdata for limb planet_detail,0
i=get vertexdata index count()
for v=0 to i
x#=get vertexdata position x(v)
y#=get vertexdata position y(v)
z#=get vertexdata position z(v)
xn#=get vertexdata normals x(v)
yn#=get vertexdata normals y(v)
zn#=get vertexdata normals z(v)
h#=rnd(10)
x#=x#+(xn#*h#)
y#=y#+(yn#*h#)
z#=z#+(zn#*h#)
set vertexdata position v,x#,y#,z#
next v
unlock vertexdata
`__________________________________________________________
`Position camera
position camera 0,0,-1400
`Set lights
hide light 0
make light 1
set point light 1,100000,0,0
set light range 1,1000000000
do
`Debug
text 0,0,str$(screen fps())
`Work out how visible the detail map is
distplanet=intersect object(planet,camera position x(),camera position y(),camera position z(),object position x(planet),object position y(planet),object position z(planet))
if distplanet>150
hide object planet_detail
else
show object planet_detail
set alpha mapping on planet_detail,100-(distplanet-50)
endif
`Control the camera
if upkey()=1 then pitch camera up 1
if downkey()=1 then pitch camera down 1
if leftkey()=1 then turn camera left 1
if rightkey()=1 then turn camera right 1
if spacekey()=1 then move camera 5
sync
loop