![Razz :P](./images/smilies/icon_razz.gif)
i have a pentium 3.0 GHZ and radeon 9600
indeed from different places. you can simply search in Google Images for "Large Images" for something like "Earth Texture" and so on.Midnight wrote:where did you get the textures?!?!
the answer on your question is hidden in map.dat ( this is ordinary text file ):BlindSide wrote:I just tried this its awesome. Can you share with use how you did the atmosphere cloud layer for earth? And the texture for it...
Code: Select all
...
AnimatedMesh
media/sphere.x
{
Object {
Name Earth
Rotation 90.0 0.0 23.45
Scale 0.5 0.5 0.5
}
Material {
LayerTexture media/Earth/diffuse.jpg
}
RotationAnimator {
Rotation 0.0 0.04 0.0
}
FlyCircleAnimator {
Center 0.0 0.0 0.0
Direction 0.0 1.0 0.0
Radius 500.0
Speed 0.000000199
}
}
AnimatedMesh
media/sphere.x
{
Object {
Name Earth_Clouds
Parent Earth
Scale 1.01 1.01 1.01
}
Material {
Type EMT_TRANSPARENT_ADD_COLOR
LayerTexture media/Earth/clouds.jpg
}
RotationAnimator {
Rotation 0.0 0.0 -0.02
}
}
...
Code: Select all
...
if ( event.EventType == EET_GUI_EVENT && event.GUIEvent.EventType == EGET_BUTTON_CLICKED && event.GUIEvent.Caller->getID()==111 )
{
/*FIXME*/Game.Device->closeDevice();
return true;
}
...
Code: Select all
...
case KEY_SPACE:
cam_inputreceive ^= true;
Game.Cursor->setVisible( ! cam_inputreceive );
if ( cam_inputreceive ) Game.Cursor->setPosition( 0.5f, 0.5f );
Game.Scene->getActiveCamera()->setInputReceiverEnabled( cam_inputreceive );
break;
...
yes i haveBlindSide wrote:Hey have you thought about maybe adding some bumpmapping to the planets?
Uhm. What about generating an ellipse of points, and attach asteroid meshes in random X,Y,Z to those points? Between an interval (let's say +- 5), and you should get something "nice to see". maybe not. Add random rotation to the equation too. That's how I do it.greenya wrote: also i thinking about very neccessary part of the space --- asteroid beld --- it is situated between Mars and Jupiter. details can be found here -- http://en.wikipedia.org/wiki/Asteroid_belt
Does anybody have any ideas how to implemet it ?
Code: Select all
IMesh* CreateEllipse(float a, float b)
{
SMesh* msh = new SMesh();
SMeshBuffer* mb = new SMeshBuffer();
msh->addMeshBuffer(mb);
S3DVertex t_vtx[360];
float x,y,z;
for(int i=0; i<360; i++)
{
float degInRad = i*DEG2RAD;
x = cos(degInRad)* a;
y = sin(degInRad)* b;
z = 0.0f;
t_vtx[i] = S3DVertex(vector3df(x,y,z),vector3df(0,1,0),SColor(0, 0, 0, 255),vector2df(0,0));
}
for (int l = 0; l < 360; l++)
{
mb->Vertices.push_back(t_vtx[l]);
mb->Indices.push_back(l);
}
mb->recalculateBoundingBox();
return msh;
}
Code: Select all
#define DEG2RAD (3.1415f/180.0f)
#define GAME_MAIN_BELT_RADIUS 830.0f
#define GAME_MAIN_BELT_ASTEROID_COUNT 2000
void GameAddAsteroidBelt()
{
u32 c;
SMesh* msh = new SMesh();
SMeshBuffer* mb = new SMeshBuffer();
msh->addMeshBuffer(mb);
S3DVertex t_vtx[ GAME_MAIN_BELT_ASTEROID_COUNT ];
float x,y,z;
for(int i=0; i<GAME_MAIN_BELT_ASTEROID_COUNT; i++)
{
float degInRad = i*DEG2RAD;
x = (float)cos(degInRad)* GAME_MAIN_BELT_RADIUS + ( ((float)((rand()%10000)-5000)) / 70.0f );
z = (float)sin(degInRad)* GAME_MAIN_BELT_RADIUS + ( ((float)((rand()%10000)-5000)) / 70.0f );
y = 0.0f + ( ((float)((rand()%10000)-5000)) / 250.0f );
c = 50 + (rand()%100);
t_vtx[i] = S3DVertex(vector3df(x,y,z),vector3df(0,0,1),SColor(255, c, c, c),vector2df(0,0));
}
for (int i = 0; i < GAME_MAIN_BELT_ASTEROID_COUNT; i++)
{
mb->Vertices.push_back(t_vtx[i]);
mb->Indices.push_back(i);
}
mb->recalculateBoundingBox();
ISceneNode* node = Game.Scene->addMeshSceneNode( msh );
node->addAnimator( Game.Scene->createRotationAnimator( vector3df(0.0f,0.00003f,0.0f) ) );
node->setMaterialFlag( EMF_POINTCLOUD, true );
node->setMaterialFlag( EMF_LIGHTING, false );
node->setMaterialFlag( EMF_BACK_FACE_CULLING, false );
}