Call of Duty 5: Custom Skyboxes: Difference between revisions

From COD Modding & Mapping Wiki
Jump to navigation Jump to search
mNo edit summary
 
Line 14: Line 14:
[[Image:Skybox_Imp_0.JPG]]
[[Image:Skybox_Imp_0.JPG]]


;<font color="yellow">'''materialType'''</font>
;<font color="red">'''materialType'''</font>
:skybox geometry materials must have their '''materialType''' set to ''"sky noncubemap"''
:skybox geometry materials must have their '''materialType''' set to ''"sky noncubemap"''


;<font color="yellow">'''sort'''</font>
;<font color="red">'''sort'''</font>
:use one of the sky* settings. This determines the render order of the associated geometry. For example, the base skydome geometry should be rendered first(before the clouds), so set it to '''Sky''', the very first sky sort.
:use one of the sky* settings. This determines the render order of the associated geometry. For example, the base skydome geometry should be rendered first(before the clouds), so set it to '''Sky''', the very first sky sort.


;<font color="yellow">'''blendFunc'''</font>
;<font color="red">'''blendFunc'''</font>
:for the base skydome geometry material, set this to '''Replace''', so that it replaces any existing color. For anything that's on top of the base skydome(such as cloud layers), set it to '''Blend'''(if you want alpha blending)
:for the base skydome geometry material, set this to '''Replace''', so that it replaces any existing color. For anything that's on top of the base skydome(such as cloud layers), set it to '''Blend'''(if you want alpha blending)


;<font color="yellow">'''alphaTest'''</font>
;<font color="red">'''alphaTest'''</font>
:set this to '''Always*'''(effectively turning alpha test off).
:set this to '''Always*'''(effectively turning alpha test off).


;<font color="yellow">'''depthTest'''</font>
;<font color="red">'''depthTest'''</font>
:should be set to '''LessEqual*'''.
:should be set to '''LessEqual*'''.


;<font color="yellow">'''depthWrite'''</font>
;<font color="red">'''depthWrite'''</font>
:make sure this is '''off'''.
:make sure this is '''off'''.


;<font color="yellow">'''Enabling UV Texture Animation'''</font>
;<font color="red">'''Enabling UV Texture Animation'''</font>
:this is controlled by the '''uScroll''' and '''vScroll''' settings.
:this is controlled by the '''uScroll''' and '''vScroll''' settings.



Latest revision as of 08:14, 12 March 2012

This page describes how to configure a Skybox in CoDWaW, and how to get it into the game.

What Makes Up A Skybox?

The original IW engine supports a cube mapped Skybox that's built as part of the map. Our skybox is a bit different - in that it's simply an arbitrary artist-designed model from Maya. And just like any other Maya-exported xmodel, it can contain multiple pieces of geometry (including the sky dome itself), and may reference multiple materials.

Once you've exported your model from Maya, launch AssetManager, open the model_export/skybox.gdt file, and add your skybox's xmodel and materials.


Skybox Material Settings

In AssetManager, special care should be taken when adding skybox geometry materials.

materialType
skybox geometry materials must have their materialType set to "sky noncubemap"
sort
use one of the sky* settings. This determines the render order of the associated geometry. For example, the base skydome geometry should be rendered first(before the clouds), so set it to Sky, the very first sky sort.
blendFunc
for the base skydome geometry material, set this to Replace, so that it replaces any existing color. For anything that's on top of the base skydome(such as cloud layers), set it to Blend(if you want alpha blending)
alphaTest
set this to Always*(effectively turning alpha test off).
depthTest
should be set to LessEqual*.
depthWrite
make sure this is off.
Enabling UV Texture Animation
this is controlled by the uScroll and vScroll settings.

Setting a skybox for your map

Load up the map in CoD5Radiant, and add a key/value pair on the worldspawn. The key must be skyboxmodel, the value must be the name of one of the xmodels defined in model_export/skybox.gdt:


Seeing The Skybox In Game

Once you have set the worldspawn key/value pair in your map, save it and compile it. Then build the level fastfile. After this is done, you can run your map and should see the skybox.


Sources: Treyarch's Wiki