Game Development Community

dev|Pro Game Development Curriculum

How to create space themed skyboxes for T3D

by Jeff Yaskus · 02/27/2012 (11:48 pm) · 8 comments

First, let me clarify ... I do not consider myself much of an artist. So, I always look for a procedural way to do pretty much everything.

Creating awesome skyboxes, with a space theme is no exception. No way could I make these by hand.

Luckily, someone did the hardest part for us ... we have to thank Alex Peterson.

Introducing Spacescape0.3, a free product written by Alex Peterson.
alexcpeterson.com/spacescape

--- HOW TO ---

step 1: download & install Spacescape0.3
Check it out, download it from sourceforge & install it somewhere.
sourceforge.net/projects/spacescape/

step 2: RTFM - read the manual
I know, nobody does ... and its a bit heavy, but keep it handy for reference later -
sourceforge.net/apps/mediawiki/spacescape/index.php?title=The_Spacescape_Manual

step 3: find some tutorials
note: only one I could find on google ... post them, if you find more

Try using this tutorial one;
sourceforge.net/apps/mediawiki/spacescape/index.php?title=Tutorial:_Building_a_B...

step 4: open the example xml data
Click on File -> Open , navigate to SpaceScape/save directory ... select "green-nebula-stars.xml".
or create your own using the tutorial...

step 5: now export
Click on File -> Export Skybox ... and a window pops up, navigate to where you want the files saved.

To keep things clean and orderly, I saved it to "game/art/skies/green" and named the files starting with "green". note: I created the directory first, you'll likely have to as well.

This created (6) new files under "game/art/skies/green";
  1. green_right1.png
  2. green_left2.png
  3. green_top3.png
  4. green_bottom4.png
  5. green_front5.png
  6. green_back6.png

step 6: write the code
Now some coding, lets make this super easy and let you cut n paste.

Create a file called materials.cs in the above directory.
singleton CubemapData( GreenSpaceCubemap )
{
   cubeFace[0] = "art/skies/green/green_right1.png";
   cubeFace[1] = "art/skies/green/green_left2.png";
   cubeFace[2] = "art/skies/green/green_top3.png";
   cubeFace[3] = "art/skies/green/green_bottom4.png";
   cubeFace[4] = "art/skies/green/green_front5.png";
   cubeFace[5] = "art/skies/green/green_back6.png";
};

singleton Material( GreenSpaceMat )
{
   cubemap = GreenSpaceCubemap;
}
This defines a new "Skybox" and its Material, so it loads up in T3D with no fuss.

step 7: create a test level
load of your T3D project and enter editor mode

select a new or test mission.

remove any existing Scatter Sky ...

and (optionally) the Sun as well. But its easier to just disable the Suns corona, at first ... so you still get some sunlight.

select the skybox object (add one if needed) and change its material to your new skybox.
tip: sort the materials by "un-mapped" and 25 per page, to find you skybox faster.

step 8: see it in action
If everything went well, you can now switch out of editor mode ... and see the full "Space" skybox in action.

Thats it ... hope you enjoy your new sci-fi space themed background!





About the author

Long time gamer, hacker and programmer. With dreams of making video games -


#1
02/28/2012 (12:00 am)
... I created it as a resource. Am I doing something wrong or do they
all show up as blogs first?! :O)

GG@ As usual, please move this from Blog to Resource
#2
02/28/2012 (1:32 am)
This is really cool! Thanks!
#3
02/28/2012 (4:33 am)
Yea, a cool resource! Need to play more with that:) ty Jeff.
#4
02/28/2012 (3:18 pm)
Thanks for the link to this nifty program! All of my space skyboxes up until now I've made by hand in the GIMP.
#5
02/28/2012 (7:01 pm)
here is another resource on it.
but only on scripting part.
may be some info will be helpful.
http://www.garagegames.com/community/resources/view/21216
#6
02/29/2012 (7:49 am)
Spacescape was something I came across a while back and was impressed by. Thanks for the reminder that I need to work on more space-related ideas!
#7
03/01/2012 (2:47 am)
@ Michael: I was thinking near the same. It remember at my space project to continue:)
#8
03/01/2012 (2:20 pm)
@Jeff

Yeah, I think it always starts as a blog then is moved to be a resource.