This wiki is archived and useful information is being migrated to the main bzflag.org website
Difference between revisions of "Skybox"
(→working skybox now) |
|||
Line 21: | Line 21: | ||
{| | {| | ||
| | | | ||
− | world | + | world |
− | name SkyboxMaterialTest | + | name SkyboxMaterialTest |
− | size 230 | + | size 230 |
− | end | + | end |
− | options | + | options |
− | -set _drawCelestial 0 | + | -set _drawCelestial 0 |
− | -set _drawClouds 0 | + | -set _drawClouds 0 |
− | -set _drawGround | + | -set _drawGround 1 |
− | -set _drawGroundLights 0 | + | -set _drawGroundLights 0 |
− | -set _drawMountains 0 | + | -set _drawMountains 0 |
− | -set _wallHeight 0 | + | -set _wallHeight 0 |
− | + | end | |
− | + | # For reference, Include the other two "Magic" Material names. | |
− | end | + | # TeleMaterial will be available in BZFlag version 3.0 |
− | + | # teleporter texture | |
− | # For reference, Include the other two "Magic" Material names. | + | material |
− | # TeleMaterial will be available in BZFlag version 3.0 | + | name LinkMaterial |
− | # teleporter texture | + | addtexture http://cbg.bzflag.org/images/Panzer/borg/blackholes/nebula4.PNG |
− | + | end | |
− | material | + | # -set _drawGround 0 will disable the GroundMaterial |
− | name GroundMaterial | + | material |
− | + | name GroundMaterial | |
− | end | + | addtexture http://cbg.bzflag.org/images/Panzer/borg/blackholes/nebula4.PNG |
− | + | end | |
− | + | #Space Skybox | |
− | material | + | material |
− | name LeftSkyboxMaterial | + | name skyboxBase |
− | texture http:// | + | color 1 1 .99999999 |
− | + | end | |
− | end | + | material |
− | + | name LeftSkyboxMaterial | |
− | material | + | matref skyboxBase |
− | name FrontSkyboxMaterial | + | texture http://cbg.bzflag.org/images/Panzer/borg/borgskybox/skybox1.png |
− | texture http:// | + | diffuse red |
− | + | end | |
− | end | + | material |
− | + | name FrontSkyboxMaterial | |
− | material | + | matref skyboxBase |
− | name RightSkyboxMaterial | + | texture http://cbg.bzflag.org/images/Panzer/borg/borgskybox/skybox2.png |
− | texture http:// | + | diffuse yellow |
− | + | end | |
− | end | + | material |
− | + | name RightSkyboxMaterial | |
− | material | + | matref skyboxBase |
− | name BackSkyboxMaterial | + | texture http://cbg.bzflag.org/images/Panzer/borg/borgskybox/skybox4.png |
− | texture http:// | + | diffuse green |
− | + | end | |
− | end | + | material |
− | + | name BackSkyboxMaterial | |
− | material | + | matref skyboxBase |
− | name TopSkyboxMaterial | + | texture http://cbg.bzflag.org/images/Panzer/borg/borgskybox/skybox5.png |
− | texture http:// | + | diffuse blue |
− | + | end | |
− | end | + | material |
− | + | name TopSkyboxMaterial | |
− | material | + | matref skyboxBase |
− | name BottomSkyboxMaterial | + | texture http://cbg.bzflag.org/images/Panzer/borg/borgskybox/skybox3.png |
− | texture http:// | + | diffuse purple |
− | + | end | |
− | end | + | material |
− | + | name BottomSkyboxMaterial | |
− | #End Space Skybox | + | matref skyboxBase |
+ | texture http://cbg.bzflag.org/images/Panzer/borg/borgskybox/skybox6.png | ||
+ | diffuse white | ||
+ | end | ||
+ | #End Space Skybox | ||
|} | |} |
Revision as of 23:08, 7 February 2011
Skyboxes replace the normal scenery of BZFlag.
The material names needed to create a skybox are:
- LeftSkyboxMaterial
- RightSkyboxMaterial
- TopSkyboxMaterial
- BottomSkyboxMaterial
- FrontSkyboxMaterial
- BackSyboxMaterial
Working with Skyboxes.
Unless all six images load correctly, no skybox will be displayed. For this reason it is recommended to start with a working skybox, and change one texture at a time, testing each image one at a time. Colors are applied to this test world to assist in identifying left/right and front/back materials. Image size will be automatically scaled to fit. Maximum default image size for clients is 1024 by 1024 pixels. Power-of-two pixel dimensions are recommended, but not required. You will notice a thin black line in the corners, this is a bug. This thin black line is not seen on GNU/Linux. It may only be on Mac OSX.
It is important to have 6 _different_ materials. Even if they all should look the same make them differ using for example the ambient or shader properties.
Code
world name SkyboxMaterialTest size 230 end options -set _drawCelestial 0 -set _drawClouds 0 -set _drawGround 1 -set _drawGroundLights 0 -set _drawMountains 0 -set _wallHeight 0 end # For reference, Include the other two "Magic" Material names. # TeleMaterial will be available in BZFlag version 3.0 # teleporter texture material name LinkMaterial addtexture http://cbg.bzflag.org/images/Panzer/borg/blackholes/nebula4.PNG end # -set _drawGround 0 will disable the GroundMaterial material name GroundMaterial addtexture http://cbg.bzflag.org/images/Panzer/borg/blackholes/nebula4.PNG end #Space Skybox material name skyboxBase color 1 1 .99999999 end material name LeftSkyboxMaterial matref skyboxBase texture http://cbg.bzflag.org/images/Panzer/borg/borgskybox/skybox1.png diffuse red end material name FrontSkyboxMaterial matref skyboxBase texture http://cbg.bzflag.org/images/Panzer/borg/borgskybox/skybox2.png diffuse yellow end material name RightSkyboxMaterial matref skyboxBase texture http://cbg.bzflag.org/images/Panzer/borg/borgskybox/skybox4.png diffuse green end material name BackSkyboxMaterial matref skyboxBase texture http://cbg.bzflag.org/images/Panzer/borg/borgskybox/skybox5.png diffuse blue end material name TopSkyboxMaterial matref skyboxBase texture http://cbg.bzflag.org/images/Panzer/borg/borgskybox/skybox3.png diffuse purple end material name BottomSkyboxMaterial matref skyboxBase texture http://cbg.bzflag.org/images/Panzer/borg/borgskybox/skybox6.png diffuse white end #End Space Skybox |