Need some lightning on a lightning problem


(stephanbay) #1

Hello fellas,

I have a problem when compiling with -light : all the textures are messed up with lot of black spots and the map is just too ugly.

compiled : bsp -meta -vis - light -fast -filter

ambiant : 10

when i compile with bsp -meta, the texture are good but no lights as you know.

any idea what could be the problem ?


(Loffy) #2

Hi!
Same problem in the map both outside and inside, e.g. in corridors with a single light source?
Do you have a sky? What does the shader look like for that sky?
Did this problem appear suddenly (have you done maps before with good light and this just happened on this new map)?
//Loffy


(nUllSkillZ) #3

I think it’s because your terrain is flat.
You have to move the vertices up or down a little bit.


(carnage) #4

just a surgestion. brush cleanup?

otherwise post ur sky shader and your terrain shader


(kamikazee) #5

I’m also wondering: can you do a -meta and a -light at the same time?
Normally, these stages are executed seperately.


(stephanbay) #6

The terrain isnt flat. that was the first time i compile with the light. and yes this is my first map (so go easy with me :P)

i use battery sky here are the shaders info for the terrain and the sky:

textures/skies/sd_batterysky
{
	nocompress
	qer_editorimage textures/skies/topclouds.tga
	q3map_lightrgb 0.8 0.9 1.0
	q3map_sun 1 .96 .87 140 140 8
	q3map_skylight 60 3
	q3map_nofog
	
	surfaceparm noimpact
	surfaceparm nolightmap
	surfaceparm nodlight
	surfaceparm sky
	
	skyparms textures/skies_sd/wurzburg_env/sky 512 -
 
	sunshader textures/skies_sd/batterysunfog
 
	
	{	fog off
		map textures/skies_sd/battery_clouds.tga
		tcMod scale 2.5 2.5
		tcMod scroll 0.0015 -0.003
		rgbGen identityLighting
	}

	{
		fog off
		clampmap textures/skies_sd/battery_mask_ydnar.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		tcMod scale 0.956 0.956
		tcMod transform 1 0 0 1 -1 -1
		// rgbGen identityLighting
		//rgbGen const ( 0.6 0.6 0.6 ) 
		rgbGen const ( 0.4 0.4 0.4 ) 
	}
}



textures/pha/terrain_0
{
	q3map_baseshader textures/pha/terrain_base
	qer_editorimage textures/temperate_sd/dirt3.tga
	surfaceparm landmine
	surfaceparm grasssteps
	{
		map textures/temperate_sd/dirt3.tga
		tcMod scale 0.167 0.167
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/pha/terrain_1
{
	q3map_baseshader textures/pha/terrain_base
	qer_editorimage textures/temperate_sd/rock_ugly_brown.tga
	surfaceparm landmine
	surfaceparm grasssteps
	{
		map textures/temperate_sd/rock_ugly_brown.tga
		tcMod scale 0.167 0.167
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/pha/terrain_2
{
	q3map_baseshader textures/pha/terrain_base
	qer_editorimage textures/temperate_sd/master_grass_dirt3.tga
	surfaceparm landmine
	surfaceparm grasssteps
	{
		map textures/temperate_sd/master_grass_dirt3.tga
		tcMod scale 0.167 0.167
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/pha/terrain_0to1
{
	q3map_baseshader textures/pha/terrain_base
	qer_editorimage textures/temperate_sd/dirt3.tga
	surfaceparm landmine
	surfaceparm grasssteps
	{
		map textures/temperate_sd/dirt3.tga
		tcMod scale 0.167 0.167
	}
	{
		map textures/temperate_sd/rock_ugly_brown.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
		tcMod scale 0.167 0.167
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/pha/terrain_0to2
{
	q3map_baseshader textures/pha/terrain_base
	qer_editorimage textures/temperate_sd/dirt3.tga
	surfaceparm landmine
	surfaceparm grasssteps
	{
		map textures/temperate_sd/dirt3.tga
		tcMod scale 0.167 0.167
	}
	{
		map textures/temperate_sd/master_grass_dirt3.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
		tcMod scale 0.167 0.167
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/pha/terrain_1to2
{
	q3map_baseshader textures/pha/terrain_base
	qer_editorimage textures/temperate_sd/rock_ugly_brown.tga
	surfaceparm landmine
	surfaceparm grasssteps
	{
		map textures/temperate_sd/rock_ugly_brown.tga
		tcMod scale 0.167 0.167
	}
	{
		map textures/temperate_sd/master_grass_dirt3.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
		tcMod scale 0.167 0.167
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/pha/terrain_base
{
	nopicmips
	q3map_lightmapaxis z
	q3map_lightmapmergable
	q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
}
textures/skies/sd_batterysky
{
	nocompress
	qer_editorimage textures/skies/topclouds.tga
	q3map_lightrgb 0.8 0.9 1.0
	q3map_sun 1 .96 .87 140 140 8
	q3map_skylight 60 3
	q3map_nofog
	
	surfaceparm noimpact
	surfaceparm nolightmap
	surfaceparm nodlight
	surfaceparm sky
	
	skyparms textures/skies_sd/wurzburg_env/sky 512 -
 
	sunshader textures/skies_sd/batterysunfog
 
	
	{	fog off
		map textures/skies_sd/battery_clouds.tga
		tcMod scale 2.5 2.5
		tcMod scroll 0.0015 -0.003
		rgbGen identityLighting
	}

	{
		fog off
		clampmap textures/skies_sd/battery_mask_ydnar.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		tcMod scale 0.956 0.956
		tcMod transform 1 0 0 1 -1 -1
		// rgbGen identityLighting
		//rgbGen const ( 0.6 0.6 0.6 ) 
		rgbGen const ( 0.4 0.4 0.4 ) 
	}
}



textures/pha/terrain_0
{
	q3map_baseshader textures/pha/terrain_base
	qer_editorimage textures/temperate_sd/dirt3.tga
	surfaceparm landmine
	surfaceparm grasssteps
	{
		map textures/temperate_sd/dirt3.tga
		tcMod scale 0.167 0.167
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/pha/terrain_1
{
	q3map_baseshader textures/pha/terrain_base
	qer_editorimage textures/temperate_sd/rock_ugly_brown.tga
	surfaceparm landmine
	surfaceparm grasssteps
	{
		map textures/temperate_sd/rock_ugly_brown.tga
		tcMod scale 0.167 0.167
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/pha/terrain_2
{
	q3map_baseshader textures/pha/terrain_base
	qer_editorimage textures/temperate_sd/master_grass_dirt3.tga
	surfaceparm landmine
	surfaceparm grasssteps
	{
		map textures/temperate_sd/master_grass_dirt3.tga
		tcMod scale 0.167 0.167
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/pha/terrain_0to1
{
	q3map_baseshader textures/pha/terrain_base
	qer_editorimage textures/temperate_sd/dirt3.tga
	surfaceparm landmine
	surfaceparm grasssteps
	{
		map textures/temperate_sd/dirt3.tga
		tcMod scale 0.167 0.167
	}
	{
		map textures/temperate_sd/rock_ugly_brown.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
		tcMod scale 0.167 0.167
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/pha/terrain_0to2
{
	q3map_baseshader textures/pha/terrain_base
	qer_editorimage textures/temperate_sd/dirt3.tga
	surfaceparm landmine
	surfaceparm grasssteps
	{
		map textures/temperate_sd/dirt3.tga
		tcMod scale 0.167 0.167
	}
	{
		map textures/temperate_sd/master_grass_dirt3.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
		tcMod scale 0.167 0.167
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/pha/terrain_1to2
{
	q3map_baseshader textures/pha/terrain_base
	qer_editorimage textures/temperate_sd/rock_ugly_brown.tga
	surfaceparm landmine
	surfaceparm grasssteps
	{
		map textures/temperate_sd/rock_ugly_brown.tga
		tcMod scale 0.167 0.167
	}
	{
		map textures/temperate_sd/master_grass_dirt3.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
		tcMod scale 0.167 0.167
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/pha/terrain_base
{
	nopicmips
	q3map_lightmapaxis z
	q3map_lightmapmergable
	q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
}

(]UBC[ McNite) #7

First: next time u post a screenie, plz brighten it up with some graphics program, so we can see something.
Also plz do describe what you did when it broke and what you tried to fix it, because that helps us alot with helping you.

Then: for a compile, maybe get q3map2build (search for it on the forum, I must ve posted the link to it several times). That will enable you to do compiles with different switches very easy, and give a u a lot of control over your compiles. (Also you ll see which switches are possible in which stage, and there will be no confusion about them anymore.)

Also: plz do use the CODE button when you post shaders or script snippets. That makes it a lot easier for us to get a quick grasp of what you are posting.

About your weird problem: This reminds me of fog trouble I once had. Question: are you using any fog? If so, where do you (worldspawn, multi-volume, skyshader)? Make sure the path to the fog-shader is correct. That fucked it up for me once, and it looked similiar.


(stephanbay) #8

I did nothing, i just compiled with the lightning for the first time and get this uglyness.
No, i dont use any fog. here are new screenies :


(Magic) #9

Have you done this terrain with Fate?
Fate can generate double layered terrain wich you have to remove.

Do you select only the face when you put on your textures?


(stephanbay) #10

ok problem solved. i used the Mcnite advice about compiling on another post
meta -v
vis: -v
light -v

and it worked fine.

Thank you for your help

PROBLEM SOLVED. next !


(obsidian) #11

My guess as to what was causing the problem.


(]UBC[ McNite) #12

Maybe one thing about the water: don’t use the siwawater textures, they r not made for outdoors water.

@ obsidian: Why should ambient cause any trouble? It never did for me anyways. Don’t know though what happens when you use it without the _color settings.


(stephanbay) #13

ok quoted

thanks


(obsidian) #14

I’m not sure the exact reason, but I’ve seen problems where adding ambient caused weird black lighting issues. I’m pretty sure it only happens when ambient is used in conjunction with something else. I haven’t been able to reproduce the problem, but other people have fixed it by tossing out ambient.

I can’t tell from the screenshot whether the black splotches are indeed lightmap issues or missing polys, but if the former, ambient is something to take a look into.


(Flippy) #15

i think when you use ambient without _color you get a different color lighting (on the player model, especially noticeable on the your own gun) everywher… a bit like you are walking on the skybox of a map, you get the same effect there


(stephanbay) #16

I have recompiled the map with no ambient and still had the same problem. so i may not think that ambient was the problem in this case.


(CooperHawkes) #17

it looks to me like ET is using the wrong lightmaps… are you sure that bsp -meta, bsp -vis, and bsp -light -fast compiles without any errors?

bsp -meta -vis - light -fast -filter (from the radiant menu) does all these 3 steps for you… if it stops at any of these stages, please post the log. my first guess is that you have a leak or something like that and that you are loading an old version of the map with different light maps.

you can also have a look at the file dates of yourmap.bsp and the lightmaps in the folder yourmap*.tga… the tga-s should have a slightly newer file date than the bsp.

BTW: you really should use q3map_lightmapMergable for terrain… it saves you a lot of texture space.

EDIT: one more thing: did you build a .pk3 for your map recently? in this case the bsp from the pk3 is taken… which of course does not match with your new lightmaps… therefore, (re)move this pk3.

EDIT2: oh, i see, that you already placed lightmapMergable in your base shader… ok, then forget about that… but AFAIR you have to place the base shader on top of all other terrain shaders… so just move the last shader to the top of your shader file.