GtkRadiant/建立天空著色器
外觀
如果您已經嘗試過遊戲附帶的一些天空,但沒有一個適合您的地圖,或者您只是想為了好玩而建立自己的天空,您將需要建立一個天空著色器以及六張影像。
讓我們從影像開始,因為它們更難建立。如前所述,天空盒由六張影像組成,每張影像對應一個方向,例如 **後面**、**前面**、**左邊** 和 **右邊**,以及一張 **上面** 和一張 **下面** 影像。我不會詳細介紹如何製作這些影像,因為我不擅長做這些事情,但基本上,您需要確保 *後面*、*前面*、*左邊* 和 *右邊* 影像相互對齊,如果您不想在角落出現一些難看的線條。
還要確保 *上面* 影像與所有其他影像對齊,否則也會出現一些難看的線條。通常,*下面* 影像不需要很好,因為您想避免看到它,因為它會讓地圖看起來像是“漂浮”的。如果您確保看不到下面影像,您可以將其製作成單色或其他顏色…無論如何,當您製作完所有這些影像後,將它們命名為:*nameofsky_bk*、*nameofsky_ft*、*nameofsky_rt*、*nameofsky_lf*、*nameofsky_up* 和 *nameofsky_dn*,您可以將 *nameofsky* 更改為您喜歡的任何名稱。檔案格式可以是 *jpg*(非漸進式)或 *tga*(有些遊戲也支援 *png*)。
著色器應如下所示
textures/mapname/nameofsky
{
qer_editorimage textures/skies/sky.tga //path of the image that shows up in Radiant
skyparms textures/mapname/nameofsky 1024 - //farbox cloudheight nearbox
q3map_sunExt 1 0.86 0.67 350 -102 40 2 16 //red green blue intensity degrees elevation deviance samples
q3map_lightmapFilterRadius 0 160 //self other
q3map_skyLight 300 3 //amount iterations
surfaceparm sky //tells the game it's a sky
surfaceparm noimpact //no projectiles impact here
surfaceparm nolightmap //no shadows on this surface
surfaceparm nomarks //no burn marks
}
要新增滾動雲層,您必須在主體之後新增一個紋理階段,如下所示
textures/mapname/nameofsky
{
qer_editorimage textures/skies/sky.tga
skyparms textures/mapname/nameofsky 1024 -
q3map_sunExt 1 0.86 0.67 350 -102 40 2 16
q3map_lightmapFilterRadius 0 160
q3map_skyLight 300 3
surfaceparm sky
surfaceparm noimpact
surfaceparm nolightmap
surfaceparm nomarks
{
map textures/skies/cloudlayer1.tga //the map of the clouds, put an alpha channel into the texture for best results
blendFunc blend //to make it so you can see the skybox behind the cloudlayer
tcMod scale 3 3 //this makes the texture repeat more often, in this case, 3x as much in each direction, play around with the values as you like
tcMod scroll 0.2 0.1 //this makes it move. play around with the values here until they are to your liking
}
}
注意:如果您有多個層,您將收到錯誤,因為遊戲無法處理它。如果您收到任何錯誤,請刪除雲層階段。