Star sphere

Blitz3D Forums/Blitz3D Beginners Area/Star sphere

Aussie(Posted 2009) [#1]
Gday everyone.
I am having a go at creating my own program for building Skyboxes & Spacecubes. So far i have managed to create a box of sprites that i will use as the background stars. I have created a function that takes 6 snapshots of the scene for use as images on the final Spacecube. The problem is that when i use these images on the final Spacecube it just dosn't look quite right. I am now thinking if i could create a sphere of sprites instead of a cube it might look a bit better. I am thinking that this would be done using the sin, cos, tan & pi commands although i have no idea how to go about creating the sphere. Can anyone give me any ideas on how this would be done or point me in the right direction. Cheers :)


Matty(Posted 2009) [#2]
There are better ways of doing a 'space environment' than using spacecubes/spheres, one of which I use is to have a variety of the following:

1.Several black images with nebula like swirls and the like in various muted colours all that fit easily within the image. Also include some black images with single pixel dots for stars

2.Many different star textures (only need to be small too!)

3.A planet or two in a texture.

4.A bright sun or two in a texture.

Then create a bunch of sprites/quads, parent them to a pivot, fling them out in random directions away from the pivot (within a small range of min/max distances) and have them face the pivot (which should be in the centre of them all) and texture them, using additive blending with the textures mentioned before. Scale some of the quads for the nebula textures accordingly. Then entityorder them so that they always render behind everything and treat the pivot like a skybox, ie position at camera pos and always have a global rotation value of 0,0,0.

(Have a look at my game in the blitz showcase "Space Combat Sim" for an example).

The main problem with doing something like this with a spacecube/spacesphere is because of the high quality of the textures needed to ensure that stars don't look like grey smudges. My method looks quite nice I feel.


Aussie(Posted 2009) [#3]
Thanks Matty. Looks preety nice. I will give your way a go & see what i can come up with.


Aussie(Posted 2009) [#4]
One problem. When i use additive blending the image turns to greyscale.