Here is a little idea I had. It almost works like using brushes in an art program. It chooses a random position and brush size and then affect that area of the sphere. The moving around on the sphere works collision wise but the rotation is messed up. I think it might need EZRotate.
set display mode 1024,768,32
sync on
sync rate 0
sync
text 0,0,"LOADING..."
sync
set normalization on
randomize timer()
GeneratePlanet()
make object sphere 3,2.0
color object 3,rgb(255,0,0)
make mesh from object 1,3
add limb 3,1,1
delete mesh 1
color limb 3,1,rgb(0,0,255)
scale limb 3,1,50.0,200.0,50.0
scale object 3,100.0,10.0,100.0
hide light 0
set ambient light 0
make light 1
AngX#=-90.0
AngY#=0.0
PosX#=0.0
PosY#=101.0
PosZ#=0.0
sync on
sync rate 60
do
if upkey()=1
AngX#=AngX#+1.0
endif
if downkey()=1
AngX#=AngX#-1.0
endif
if rightkey()=1
AngY#=AngY#+1.0
endif
if leftkey()=1
AngY#=AngY#+1.0
endif
PosX#=sin(AngY#)*cos(AngX#)*200.0
PosY#=-sin(AngX#)*200.0
PosZ#=cos(AngY#)*cos(AngX#)*200.0
i#=intersect object(1,PosX#,PosY#,PosZ#,0.0,0.0,0.0)
if i#>0.0
Distance#=202.0-i#
if Distance#<102.0
Distance#=102.0
endif
PosX#=sin(AngY#)*cos(AngX#)*Distance#
PosY#=-sin(AngX#)*Distance#
PosZ#=cos(AngY#)*cos(AngX#)*Distance#
endif
position object 3,PosX#,PosY#,PosZ#
rotate object 3,AngX#+90.0,AngY#,0.0
position camera PosX#,PosY#,PosZ#
rotate camera AngX#+135.0,AngY#,0.0
move camera -10
set point light 1,camera position x(),camera position y(),camera position z()
sync
loop
function GeneratePlanet()
make object sphere 1,200.0,32,64
color object 1,rgb(64,164,64)
make object sphere 2,202.0,32,64
color object 2,rgb(0,164,255)
v=make vector3(1)
lock vertexdata for limb 1,0
NumberOfVertices=get vertexdata index count()-1
NumberOfHills=10+rnd(20)
for h=1 to NumberOfHills
ax#=rnd(360)
ay#=rnd(360)
hx#=sin(ay#)*cos(ax#)*105.0
hy#=-sin(ax#)*105.0
hz#=cos(ay#)*cos(ax#)*105.0
s#=200+rnd(600)
s#=s#/10.0
for v=0 to NumberOfVertices
x#=get vertexdata position x(v)
y#=get vertexdata position y(v)
z#=get vertexdata position z(v)
xdif#=x#-hx#
ydif#=y#-hy#
zdif#=z#-hz#
set vector3 1,xdif#,ydif#,zdif#
r#=length vector3(1)
if r#<s#
nx#=get vertexdata normals x(v)
ny#=get vertexdata normals y(v)
nz#=get vertexdata normals z(v)
percentage#=(s#-r#)/r#
x#=x#+(percentage#*nx#)
y#=y#+(percentage#*ny#)
z#=z#+(percentage#*nz#)
endif
set vertexdata position v,x#,y#,z#
next v
next h
unlock vertexdata
v=delete vector3(1)
set object normals 1
set object smoothing 1,100
endfunction
