Jump to content

Home

Custom sky, how does it appear correctly in the game?


SubL

Recommended Posts

Well, I have a sky (6 textures, .dn, .bk etc.).

 

How can I put this into the game and make it appear correctly?

 

I heard you need to place the textures somewhere and then create a shader.

 

How would I do this?

 

Thanks!

Link to comment
Share on other sites

Ahhh, well I'll go over it in short... though I can be much more complicated. :)

 

Make the following shader script (change the directories to wherever you have your textures and save the file into your custom shaderfile):

 

textures/directory/customskyname

{

qer_editorimage textures/directory/customsky_up.jpg

surfaceparm sky

surfaceparm noimpact

surfaceparm nomarks

q3map_nolightmap

q3map_novertexshadows

skyParms textures/directory/customsky 512 -

}

 

The line in skyParms should match the base routing for your 6 sky textures... for example, if you have textures/supersky/redsky_dn.jpg, etc, that line should just be skyParms textures/supersky/redsky

 

You should also make sure all six of your panels are named correctly...

 

_rt, _lf, _ft, _bk, _up, and _dn

 

If you're making the panels yourself, make sure you use a 90 degree field of view (unless you use Bryce, in which case it needs to be 112.5) and that _up and _dn are lined up with _rt

 

Further information can be found at http://www.gamasutra.com/features/visual_arts/19981023/skybox_07.htm

Link to comment
Share on other sites

OK, I did all you said and even tried different shaders out of the

skies.shader file.

 

Previously I copied the six images of a sky out of the assets0.pk3 and pasted them into my own texture folder, then I replaced one pic (_up) with a picture of a Stardestroyer in space, which I edited in Paint Shop Pro to match the size of the other 5 pics, which is 1024x1024 pixels in a .jpg format.

 

Then I created a shader, and you said that if my sky images are called SD_dn... the editor would recognize them as one hanging together.I tried numerous shaders, but the editor wouldn't give me the white square around the pic I chose as qer_editorimage

 

As that didn't work i just copied the whole 6 of the sky images into my folder to see if that woks (without my own picture) but even that wouldn't work and I just don't get why

 

Do I have to do that stuff with the angle of 90 degrees, even if I just replace one pic with another?

 

Thx for your help

 

SaM

Link to comment
Share on other sites

Nah, that's only if you're rendering your own sky. It should be 90 by default... although I will warn you that directly editing a skyshader and adding 2D objects will make it look...weird. :)

 

Well... if you want your sky to be called SD, I would do the following:

1) Create the directory textures/sdsky/ AND create a subdirectory textures/sdsky/resources

2) Add the line "sdsky" to your shaderlist.txt file

3) Put the six images (sd_dn, sd_up, sd_lf, sd_rt, sd_ft, sd_bk) into textures/sdsky/resources/

4) Create the file sdsky.shader in your shaders/ directory and enter the following:

 

textures/sdsky/sdsky

{

qer_editorimage textures/sdsky/resources/sd_up

surfaceparm sky

surfaceparm noimpact

surfaceparm nomarks

q3map_nolightmap

q3map_novertexshadows

skyParms textures/sdsky/resources/sdsky 512 -

}

 

----

 

That should be it. Apply the shader (should be called sdsky/sdsky) to all surfaces you want to reveal the sky.

 

The reason I say to put all the textures into that subdirectory is so that you can't see them when you look at the texture list (this is the same reason that Raven put all of their sky reference textures in skies/ even though (most of) the sky shaders themselves are in other directories (such as bespin/sky).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...