Problem with Light on Skybox


(LaggingTom) #1

I’ve searched through the forums numerous times and tried many, many answers given, but sadly, none of them work.

I’ve created a skybox with the same texture plastered on the inside 6 walls, and I’ve created a shader for it. I’ve tried loading the game with the shader both included and excluded in the pk3, both with and without a shaderlist.txt. The problem is that my map is too bright. I’ve adjusted the intensity value in q3map_sun and the q3map_surfacelight values to 0 and above many times to no avail.

Any help would be GREATLY appreaciated.

Shader:


textures/skies_night/night1
{
	qer_editorimage textures/skies_night/night1.tga
	surfaceparm noimpact
	surfaceparm nolightmap
	surfaceparm sky
	q3map_globaltexture
	q3map_lightsubdivide 256
	q3map_surfacelight 75
	q3map_sun 1.0 1.0 1.0 50 200 45
}


(badong) #2
  1. Are you doing a light compile or just a meta? You need to do a light compile to check how much light your sun and sky emit.
  2. Do you have any ambient light or minlight added to your map?

P.S. you should replace the q3map_surfacelight and q3map_sun commands with q3map_skylight and q3map_sunExt respectively because these are newer and better.


(LaggingTom) #3

I’m compiling using:
BSP -meta, -vis, -light -fast -filter -samples 2

Edit: Quick question: Do I need to include my shader in the scripts folder of the pk3 or is it put into the map?


(MadJack) #4

.script files go into the maps dir and .shader goes into script dir.

shaderlist.txt isn’t needed in the pk3, it’s only for Radiant or q3map2.

Does the sky looks like a sky or more like enormous textures on big freaking walls? :slight_smile: I ask that because it might be a spelling mistake… night instead of night1… shurgs
^^^
EDIT: Nevermind that… you’d get a big orange grid… :banghead:

oh and you should put “nomarks” in the shader too. You don’t want bullet marks on the sky right? :smiley:


(badong) #5

you don’t need to create a pk3 to test your map. All you gotta do is compile and type
/devmap <yourmap> in the console.
The reason why you see no change when you include and exclude the shader in the pk3 is because the game is probably loading your bsp and shader straight from the etmain/maps and etmain/scripts directory instead of your pk3 file.

since you say you see no change in light intensity when you make your sun and surfacelight 0 then I would assume that the light is coming from a different source.
This source can be either light entities in the map, or ambient light.
Also I’m a little curious as to why are you using a sun if your sky is a night sky. Are you using it as the moon?


(LaggingTom) #6

Yes, I am using it as a moon. I only have six light entities in the map and they are all indoors, so none of their light escapes. And I’m not using any ambient light keys.


(MindLink) #7

Pls post a screenshot of your map ingame showing the stuff.


(LaggingTom) #8

Alrighty then. Though I realize that is realistically looks like moonlight (which is what I’m trying to accomplish) it really is too bright for my purposes.

And 3 of the 6 light entities. The other 3 are in an identical building (spawn points)


(MadJack) #9

25 FPS… what kind of hardware are you running that on?


(LaggingTom) #10

I saw that question coming as soon as I posted the pictures. I’m on a TNT2. I’ll get a new video card… eventually.


(MadJack) #11

TNT2… wow… Museum artefact :wink: lol

q3map_sun R G B ->INTENSITY<- …

Intensity at 100 is considered a fairly bright sun so bring that lower… let’s say 25 instead of 50 and see what it does. You can compile -light -sunonly to only see the effect of the sun.

HTH

EDIT: darn BBS/HTML code thinking B was bold :bash:


(LaggingTom) #12

sigh I’m sad to say that it’s no good… could it be my map hates me? :disgust:


(MadJack) #13

what do you mean it’s no good? Still too much light? If so, did you try with lower? 15? 10?


(LaggingTom) #14

No good. Tried every five from 0 to 50


(MadJack) #15

Check the worldspawn if there’s anything that shouldn’t be there. _minlight _minvertexlight etc… I know you said you don’t use it but just to make sure.

Has your sky shader changed since last time you post it? If so please post the new shader.

If I were in your shoes, I’d comment most lines from my sky shader and see what it does with a -light -sunonly From there you’ll be able to, hopefully, get a hint to what is doing that overbrightening.


(LaggingTom) #16

Just the map coords and the class name in the worldspawn. As for the shader, it really didn’t change that drastically. Except for a little change in position.


textures/maze_skies/night1
{
	qer_editorimage textures/maze_skies/night1.tga
	surfaceParm noimpact
	surfaceParm nolightmap
	surfaceParm sky
	q3map_globaltexture
	q3map_skylight 15 3
	q3map_sunExt 1 1 1 25 45 45 3 16
	implicitMap -
	{
		map textures/maze_skies/night1.tga
	}
}


(MadJack) #17

Getting out of options here…

You said you had some lights entities in the map, check their values. Maybe there’s something wrong like a value3000 or whatnot. There has to be something wrong somewhere. Change the sky texture you’re using with something black, comment out your sky shader and compile -light -sunonly and if there’s still light after that well you know it’s not your sky but something else.


(LaggingTom) #18

All 6 light entities are at 250. I’ll go try the the pure black tga.


(LaggingTom) #19

I comment out the sky shader and replace it with a pure black TGA (compiling using:


@rem to use this batch file, run it from a dos window: 
@rem > compile <mapname> without the .map extension 

@set Q3MAP_PATH="C:\Program Files\GtkRadiant-1.4\q3map2.exe" 
@set ET_PATH="C:\Program Files\Wolfenstein - Enemy Territory" 
@set MAP_PATH="%1" 
@set GEN_OPTIONS=-fs_basepath "C:\Program Files\Wolfenstein - Enemy Territory" -game et 

@rem 
%Q3MAP_PATH% -meta %GEN_OPTIONS% -v %MAP_PATH% 

@rem 
%Q3MAP_PATH% %GEN_OPTIONS% %MAP_PATH% 

@rem 
%Q3MAP_PATH% -light -sunonly %GEN_OPTIONS% -v %MAP_PATH% 

@pause

) And I get a HOM. sigh I’m really starting to hate this map. I’ll burn it once it’s fixed.


(MadJack) #20

Sorry my bad about HOM. I should’ve specified to comment q3map_sun/sunext instead.

Try that:


textures/maze_skies/night1 
{ 
   qer_editorimage textures/maze_skies/night1.tga 
   nocompress
   surfaceParm noimpact 
   surfaceParm nolightmap 
   surfaceParm sky 
   q3map_skylight 10 3 
   q3map_sunExt 1 1 1 10 45 45 3 16 
} 

This should generate a very small amount of light. Try it and give me some news :slight_smile: