Version 6 (modified by landauf, 8 years ago) (diff) |
---|
Creating a Simple Skybox
This tutorial will show you how to create a simple Skybox for Orxonox. A Skybox is a large cube with textures on the inside, representing the sky in a level. You will mainly use Blender for creating the actual Skybox and a small shell script for integrating it into Orxonox. You will probably need to run Linux for that. First, please download skybox.blend, venusmap3.jpg, venusbump2.jpg and rename.sh that are attached to this page. Put them all in the same folder. This is important, since the paths to the textures are stored in the .blend file. Otherwise, you will probably not see any textures in the sample scene.
Now open a shell and cd to the directory, where you saved the 4 files at the beginning. There should be a directory containing the 6 frames you rendered before (0001.jpg-0006.jpg). Run the shell script with the first parameter being the desired name of your Skybox and the second being the name of the directory containing the frames. For example, if you chose box as output dir and would like your Skybox to be called myskybox, then you would run:
user@linux:[dir_of_skybox_files]> ./rename.sh myskybox box
This command will rename the frames according to conventions imposed by Ogre. You will find the six renamed files of the form "myskybox_XX.jpg" in the input dir. The command also produces a material script like this:
material Orxonox/myskybox { technique { pass { lighting off depth_write off texture_unit { cubic_texture myskybox.jpg separateUV tex_address_mode clamp } } } }
Insert this into a .material file so it will be loaded when Ogre starts. [media_directory]/materials/scripts/OrxonoxSky.material is suggested, since it already contains the definitions of all other Orxonox Skyboxes. Save and exit.
Now add the the six renamed images to the archive [media_directory]/packs/skybox.zip, for example by unpacking, copying and repacking afterwards.
Finished. You have created your own Skybox. You can load into your level.oxw with:
<Skybox src="Orxonox/myskybox" />
Attachments (8)
- anim.png (3.3 KB) - added by FelixSchulthess 16 years ago.
- output.png (6.6 KB) - added by FelixSchulthess 16 years ago.
- camera.png (12.8 KB) - added by FelixSchulthess 16 years ago.
- rename.sh (647 bytes) - added by FelixSchulthess 16 years ago.
- skybox.blend (181.8 KB) - added by FelixSchulthess 16 years ago.
- venusbump2.jpg (658.5 KB) - added by FelixSchulthess 16 years ago.
- venusmap3.jpg (708.4 KB) - added by FelixSchulthess 16 years ago.
- skybox.png (159.1 KB) - added by FelixSchulthess 16 years ago.
Download all attachments as: .zip