Posted 09 October 2007 - 03:19 PM
I'm working on Elite clone for a school project, with Opengl and Glut.
How can i make a static background with star?
I have thought to use a skybox, but i have some questions.
I have found some images for texture, for example: http://img409.images.../starsbknh1.jpg
- The size of box around the camera.
- The size and the numbers of texture (the same texture for all face or one different texture for every face).
- The box must be transparent (How?).
- How can i obtain an lighting effect of the star?
Too many questions, sorry :-(!
Posted 10 October 2007 - 11:07 AM
Since the position coordinates are homogenous, you can set the w value of the position to 0, which will send it to infinity.
Then after you multiply the position by WVP matrix, you need to set the the z and w coordinates so that z/w will be between 0 and 1.
I never tried this, so I am not sure if it will work exactly this way.
Posted 10 October 2007 - 04:04 PM
I'm not sure what you mean by making it transparent. Surely you don't want to see "through" the blackness of space to something behind it?
As for the textures, for star textures you can probably get away with using the same one for all six cube faces, unless you want there to appear a nebula or galaxy or something like that in the distance.
Posted 12 October 2007 - 08:57 AM
I have positioned the camera in (0,0,0), then i have made a box around the camera, the box size is 2x2x2 (i've turned off the depth test) . I have applied the texture, the same texture for all face, but the result is not very nice...
I've made the texture with GIMP, black background and "SuperNova" filter with radius 1.
- The problem is the texture?
Posted 12 October 2007 - 09:44 AM
So I'd probably do some kind of space cloud thingy with the skybox and would drop in several hundred particles for the stars etc.
Posted 16 October 2007 - 05:11 PM
Posted 16 October 2007 - 06:15 PM
In my mind i wanted to obtain a similar effect to this: http://oolite.aegidi.../oolite_002.jpg
I would use some real reference pictures instead. Searching for nasa starfield on images.google.com give some pretty good results.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users