skybox shader

For all your great and interesting ideas
bestia455
Posts: 5
Joined: Fri Apr 27, 2012 6:44 am

skybox shader

Post 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.

User avatar
GanjaGuy
Posts: 29
Joined: Thu Mar 29, 2012 9:25 am

Re: skybox shader

Post by GanjaGuy »

absolutely awesome!

User avatar
johnnyenglish
Space cake
Posts: 898
Joined: Wed Aug 17, 2011 9:23 am
Location: Nottingham, England

Re: skybox shader

Post by johnnyenglish »

Yeah, really nice idea - can you upload the images you used also?

bestia455
Posts: 5
Joined: Fri Apr 27, 2012 6:44 am

Re: skybox shader

Post by bestia455 »

sure, here you are
Attachments
nitesky.jpg
nitesky.jpg (8.02 KiB) Viewed 11004 times
daysky_1.jpg
daysky_1.jpg (14.68 KiB) Viewed 11004 times
sky textures.zip
(22.56 KiB) Downloaded 374 times

User avatar
nemNEMnem
Posts: 271
Joined: Sat Aug 20, 2011 11:11 am
Location: Germany
Contact:

Re: skybox shader

Post by nemNEMnem »

THAT is crazy :)
good work dude :D
for a big tree, you need a small axe.
--Bob Marley--

User avatar
xandaxs
Posts: 959
Joined: Wed Aug 17, 2011 5:22 pm
Location: Oeiras, Portugal

Re: skybox shader

Post by xandaxs »

Perhaps you could have moving clouds on the clear sky aswell?
[12:25] <JohnnyEnglish> morning Nounou
[12:25] <JohnnyEnglish> wotcha doing?
[12:25] <Nounou> hello
[12:26] <Nounou> nothing much, i've nothing to do at work so
[12:26] <Nounou> modeling woman
[12:26] <JohnnyEnglish> woo
[12:26] <JohnnyEnglish> real women?
[12:26] <Nounou> realistic yes, on maya

Image

bestia455
Posts: 5
Joined: Fri Apr 27, 2012 6:44 am

Re: skybox shader

Post 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

User avatar
banksy
Posts: 196
Joined: Wed Mar 07, 2012 11:10 am
Location: Australia

Re: skybox shader

Post 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 :)
Image

User avatar
GanjaGuy
Posts: 29
Joined: Thu Mar 29, 2012 9:25 am

Re: skybox shader

Post 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

User avatar
banksy
Posts: 196
Joined: Wed Mar 07, 2012 11:10 am
Location: Australia

Re: skybox shader

Post 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
Image

Post Reply