   Deep Space -> How to give it that "something" special?
  Hello allI am writing this space strategy game, somewhere, but not quite, in the likes of Master of Orion.I have this nice looking starmap with lots of colored stars inside a "skybox" (should be called "starbox"?) which i am creating in the following way: (the starbox, not the user-selectable stars, wich are just sprites)I create a cubeI generate 6 256x256 star bitmaps (black bitmaps with white dots)I then generate, using perlin noise, procedural "nebulas" (much like the clouds in that famous thread in these forums)I alpha blend the nebulas on the star bitmapsI then proceed to applying the bitmaps as textures on the starbox cube.All looks nice, and even looks like the homeworld 1 space backgrounds, but i want to consider other ideas, as this was the first one that sprung to my mind, and i can''t think of other ways to do it. Its one of those cases where, after you had an idea, every time you try to look for an alternative, your original idea always pops up.Since i always like to hear other/different ideas for problems, i would like to know how you are doing your deep space backgrounds, or any ideas on improving my method.I hope i got your attention,Thank you very much for your time,Joao Correia 
  Well, the skybox should be definately be used, but I have a suggestion that you could use to improve the look of the whole thing. First of all, I''ll warn you, this is going to be a mildly taxing method, but it should produce results that will make you very pleased (plus, since you''re doing deep space, you don''t have to worry too much about massive levels taking up some processing/GPU power, so you definately have CPU/GPU cycles to spare.What I''m going to suggest is that, on top of the skybox, you create a little "layer" of actual models to represent stars (simple spheres will work; they don''t even need to be highly tesselated. You can give each model a set color, brightness and what-not, which is a very trivial thing to do. Now, what I''m going to suggest is that you implement a sort of "glow" to all the stars (or, maybe, to just about everything that gives off a lot of light), similar to the one that Tron 2.0 does. This will give your whole universe a sort of "surreal" feel to it. You could also implement a slight motion blur, to enhance the effect.I''m not sure how it would look in practice, but I''m just a big fan of the glow. ^_^   Trent Polackwww.polycat.netThe Best Blog in the Universetrent@polycat.netAuthor of Focus on 3D Terrain Programming;  I am already using the glow in my stars . Not on the background ones, but on the ones user-selectable. I think that perphaps adding glow to the background would make it a bit hard to tell bakcground from foreground objects and be confusing to the player. After all, i want it to be gorgeous, but not get in the way of the fun factor . If the player has to think about what objects he can click and wich are just for show off, then i did something wrong somewhere. By the way, the stars with the glow effect work really well. Ill post some screenshots later on.Thank you for your time,Joao Correia ;  Like i said before, here are some screenshots for you to look at. Its still in an early stage, and some graphics were borrowed from somewhere in the net for these early test versions.http://irc.ubi.pt/~ui/The nebulas in the back are alpha blended into the bitmap which is then used as texture for the skybox faces.Dont bash please. Its my first "serious" project.Also, when running the program, you have full control over the camera (zoom, move, pan) and it is very smooth.Notice the glow on the stars, and that it is additive when several stars are viewed "on-top" of each others.Only the colored stars are user selectable, the white ones are background.Thank you for your time,Joao Correia   [edited by - joaocorreia123 on February 17, 2004 2:25:12 PM];  good idea to use the nebulae, i missed that when making my screen saver i have a question - why do u use 256x256 textures, why not 16x16 or 8x8 if the star is only a dot in the bitmap?and what do both of you mean by glow? how do you create that glow - like a flare or what?thanks, hope this will be useful to both of us ;  The nebulas look really cool but the glow of the stars is a little too strong and their colors are also way to well.. err.. colorful / sharp / bright . If you take a look at the sky, or some pics from space you''ll see that the stars are dimmer and their colors are more faded. As mittens suggested you could make some motion blur - try leaving some trails for the stars using lines with an alpha gradient with a variable width, or even use billboards.  ;quote:Original post by vic_semionov  i have a question - why do u use 256x256 textures, why not 16x16 or 8x8 if the star is only a dot in the bitmap?and what do both of you mean by glow? how do you create that glow - like a flare or what? I use larger textures like this:I create an "empty" (ie all black) bitmap 256x256Place a random amount of white dots at random locations in itI don''t use one texture per white dot  I use the 256x256 bitmap as a texture.The glow is achieved thru a renderstate mode like this:.RenderState.AlphaBlendEnable = true;.RenderState.SourceBlend = Blend.SourceAlpha;.RenderState.DestinationBlend = Blend.One;(c# w/ Directx)Then, in places where the star bitmap (and here i mean the foreground stars, ie the ones selectable, NOT the white dots in the background) alpha component is near opaque, it "glows". I do believe i got lucky when i found this, as i was just trying around different renderstates to get nice looking effects on another part of my program, the particle system, and i stumbled across this glow effect.Note that the bitmaps i use for the foreground stars are opaque in the center and have a gradual faloff to fully transparent on the edges.Thank you for your time,Joao Correia ;quote:Original post by Ilici  The nebulas look really cool but the glow of the stars is a little too strong and their colors are also way to well.. err.. colorful / sharp / bright . If you take a look at the sky, or some pics from space you''ll see that the stars are dimmer and their colors are more faded.  This is by design.It serves as visual cues to the type of star. Different colors mean different star types which will in turn have different types of planets orbiting them. Its much like the Master of Orion style, wich had the same way to differentiate star types. Still, I will tone down the glow, as i agree with you, its too strong.Thank you for your time,Joao Correia;  I like the nebulaes, especially the red one in the second screenshot and the blue/green one in the third screen shot.Would you like showing the algorithm used for generating these nebulaes?I think you need to adjust your background stars a little. First of all, they are too bright, you need to make them smaller than 1 pixel and draw them using anti-aliasing. You also need to make the random position of the stars less homogeneous. If you are in outer space but still in a galaxy you would see the stars in the galaxy concentrated in a band around you. Also, I think you need a lot more stars.Take a look at the following image as an illustration of what I mean:http://www.oera.net/How2/PlanetTexs/StarsMap_2500x1250.jpg(from Texture maps by Tor Oera)- Andreas   www.AngelCode.com;  I would just like to say congrats.  Looks really nice, and I actually like the coloring, I can see how it would come in as useful for the gameplay.Good luck, and make sure to post it when your done, I''d like to try it. 