Page 1 of 2

skybox shader

Posted: Fri Apr 27, 2012 7:05 am
by bestia455
I've recently gotten permission from some authors to update some old urban terror maps to run in urt 4.x. One of the mappers "MAD-HORSE" had a map called ut_blackbridge which was never finished as it had no skybox, and some unfinished models. I added 2 sky textures, then came up with this shader:

Code: Select all

textures/urban_terror/daysky_1
{
   surfaceparm noimpact
   surfaceparm nolightmap
   surfaceparm sky

   q3map_sun 1 1 1 90 45 80
   q3map_surfacelight 100
   q3map_globaltexture
   q3map_lightimage textures/urban_terror/daysky1_blend.tga
   skyparms full 512 -
   {
      map textures/urban_terror/daysky_1.tga
      depthWrite
   }
   {
        map textures/urban_terror/nitesky.tga
        depthWrite
        tcMod scroll 0.01 0
        tcMod scale 1 1
        blendFunc    GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
        alphaGen    wave sin 0.9 0.25 1 0.04
   }
}


and the result:

(added by admin)

http://www.youtube.com/watch?v=9AgRUg3L ... ature=plcp

Although the maps I updated probably are not going to see much play as they are old, and there's a lot of newer maps since the old days, it would be nice to see this type of sky in a new custom map. :)

I am not a mapper, and probably never will be, so I hope this will catch some mappers interest.

Re: skybox shader

Posted: Fri Apr 27, 2012 7:20 am
by GanjaGuy
absolutely awesome!

Re: skybox shader

Posted: Fri Apr 27, 2012 7:22 am
by johnnyenglish
Yeah, really nice idea - can you upload the images you used also?

Re: skybox shader

Posted: Fri Apr 27, 2012 7:38 am
by bestia455
sure, here you are

Re: skybox shader

Posted: Fri Apr 27, 2012 3:19 pm
by nemNEMnem
THAT is crazy :)
good work dude :D

Re: skybox shader

Posted: Fri Apr 27, 2012 7:16 pm
by xandaxs
Perhaps you could have moving clouds on the clear sky aswell?

Re: skybox shader

Posted: Fri Apr 27, 2012 8:13 pm
by bestia455
I'm pretty sure you can do that, and more. My original intention was to have the entire sky turn dark, but after a good hour of playing with the shader I stopped and figured that was good enough. I did not want to over do it.

A good thought was to somehow trigger something like thunder.wav, but as i see it you cannot use a shader to trigger a sound, I think it would have to be information in the bsp

Re: skybox shader

Posted: Sun Apr 29, 2012 9:24 am
by banksy
much better than anything I could ever do. I dont even know add a skybox or have sky in a map. SO if anyone can help me with the issue it would be greatly appreciated,

good work :)

Re: skybox shader

Posted: Sun Apr 29, 2012 9:28 am
by GanjaGuy
banksy wrote:much better than anything I could ever do. I dont even know add a skybox or have sky in a map. SO if anyone can help me with the issue it would be greatly appreciated,

good work :)


read everything on here and you should have a great jump start to your mapping..
wiki/index.php/Main_Page

to jump directly to sky boxes look at these links
wiki/index.php/Mapping:Sky
wiki/index.php/Using_the_skybox_entity

or you can also search the forums here and urbanterror.info for more info

Re: skybox shader

Posted: Sun Apr 29, 2012 10:52 am
by banksy
thanks, but i dont really understand that _skybox tutorial...
say if i put my map inside a box, and then textured the inside of that box with the sky texture, what do I do from there? because I find that way causes shadows against each side of the box, as well as there being the cracks between each brush of the box