Quake3World.com
https://www.quake3world.com/forum/

help with custom sky shader
https://www.quake3world.com/forum/viewtopic.php?f=10&t=52556
Page 1 of 1

Author:  Gelenkbusfahrer [ 12-10-2016 03:53 AM ]
Post subject:  help with custom sky shader

I have a problem.

I have a map in radiant. If i assign a standard QL sky shader to the sky-brush, the map is correctly illuminated (skybox will illuminate map textures)

Now, if i simply copy that shader (from QL pak00 scripts/skies.shader) to my custom mapname.shader file, and assign that shader to my skybrush, there is no illumination of the map textures. The skybox itself looks fine.

This is so weird, since it's a 1to1 copy.

It's like q3map_surfacelight 200 is simply ignored, while texture definitions, skyparms, tcMod scroll ... is all working.

So in wolfcam baseq3 i have a textures and a scripts folder for my map. I added mapname.shader to the shaderlist.txt (which is also in scripts folder). This is all set up correctly. Radiant shows all custom textures and shaders.

But no illumination when i use the direct copy of the sky shader. Illumination only for default shaders.

Any ideas? Thanks much!

Author:  CZghost [ 12-10-2016 04:44 AM ]
Post subject:  Re: help with custom sky shader

Sky shaders should not use q3map_surfacelight (which is intended for light fixtures), but q3map_sky or q3map_skyExt to generate sun brightness, direction (where is East or West in your map) and elevation (is it high noon or it's sunset or sunrise?), that should correspond to used skybox (if any is used). skyExt also implements some additional parameters to smooth out cast shadows produced by sunlight and make light refraction simulation in your map. You should not copy any assets from Steam Workshop as stated in rules for level designers, unless you have permission to do that (e.g. told in readme or online discussed with original author). If you want to use standard QL sky shader, why don't you just use that? It will work even in your own map. You don't need to copy anything, that's what Workshop strength is in. You can use standard textures and shaders from basic installation in your map without need to include it in your map and if you want to use texturepacks (like Evil Lair's or Sock's texturesets), you don't need to include it in your map for QL like it was required in Q3 to make your map running correctly. You just make some custom shaders for your own variations, that's it.

I don't map for QL, so I just post my thoughs, but it should be like that said. Important thing for you: Don't copy anything in standard QL packs, it's considered stealing and such like that is punished by banning your account...

Author:  Gelenkbusfahrer [ 12-10-2016 05:28 AM ]
Post subject:  Re: help with custom sky shader

I'm trying to make a custom sky shader. But if even a direct copy don't work (doesn't matter which standard sky shader i copy) i can't go further customizing it.

This is weird, since i followed exactly the gtk radiant manual. And the shaders do work principally, except for the illumination of my map.

Author:  CZghost [ 12-10-2016 05:49 AM ]
Post subject:  Re: help with custom sky shader

What shader did you want to test copied? Post original here (in code tag). Sky shader does not use q3map_surfacelight as this directive illuminates nearest around the shader surface, which doesn't work for sky. Sky shaders use q3map_sun (apologised for the incorrect q3map_sky) to create sunlight (or moonlight, it depends on sun light settings). You set light color, light intensity, light direction angle <0;360> and elevation angle <0;90>... Not surface light...

Author:  sst13 [ 12-10-2016 08:34 AM ]
Post subject:  Re: help with custom sky shader

CZghost wrote:
Sky shader does not use q3map_surfacelight...

Sorry, that's wrong!

@Gelenkbusfahrer:
Off course you can use q3map_surfacelight! Most of the original sky shader use this key for diffuse (non directional) lighting.

Check your shaderlist.txt again. Do not include the ".shader" suffix. Only "mapname".
Also check the listed shader files during compiling. Does your shader show up like this: "entering scripts/mapname.shader" ?

Author:  CZghost [ 12-10-2016 09:03 AM ]
Post subject:  Re: help with custom sky shader

Well I did not see sky texture with q3map_surfacelight. So apologise for misinformation :D

Author:  DaEngineer [ 02-13-2017 11:20 AM ]
Post subject:  Re: help with custom sky shader

From your nickname I assume you are German. I've written an in-depth tutorial about creating custom sky shaders. As CZghost said, q3map_surfacelight is the old and deprecated method for skybox lighting, because it will illuminate surfaces closer to the sky more than those farther away from it. Use q3map_sunExt for the direct sunlight and q3map_skylight for the indirect sky light for best results. I've explained both parameters in the tutorial.

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/