Issue with light-changin effect


(murka) #1

LOOK BELOW as PPPPPPPS-s
vid showing issue:Vid(x264 codec)
lightmaps:here

So, as i tried to make shutters in a small room that will open/close and cause the shaders in the room to be remapshadered with ones with different lightmaps(i precompiled the lightmaps, every time i rotated the shutters a bit and renamed the created lightmap to my folder).
I even did a search and looked for tuts and found one, but it didn’t help either.
In-game the shaders just don’t change(i tried all the shaders out and they work in-game, but just don’t remapshader).
What may be the issue here?
Shader:

textures/prisonbreak_tj/concrete_floor
{
	{
		map textures/prisonbreak_tj/concrete_floor.jpg
	}
}

textures/prisonbreak_tj/concrete_wall
{
	{
		map textures/prisonbreak_tj/concrete_wall.jpg
	}
}

textures/prisonbreak_tj/concrete_wall_1
{
	qer_editorimage textures/prisonbreak_tj/concrete_wall.jpg
	{
		map $lightmap
		rgbGen identity
	}
	{
		map textures/prisonbreak_tj/concrete_wall.jpg
		blendFunc GL_DST_COLOR GL_ZERO
		rgbGen identity
	}
}

textures/prisonbreak_tj/concrete_wall_2
{
	qer_editorimage textures/prisonbreak_tj/concrete_wall.jpg
	{
		map textures/prisonbreak_tj/stages/stage1.tga
		rgbGen identity
		tcgen lightmap
	}
	{
		map textures/prisonbreak_tj/concrete_wall.jpg
		blendFunc GL_DST_COLOR GL_ZERO
		rgbGen identity
	}
}

textures/prisonbreak_tj/concrete_wall_3
{
	qer_editorimage textures/prisonbreak_tj/concrete_wall.jpg
	{
		map textures/prisonbreak_tj/stages/stage2.tga
		rgbGen identity
		tcgen lightmap
	}
	{
		map textures/prisonbreak_tj/concrete_wall.jpg
		blendFunc GL_DST_COLOR GL_ZERO
		rgbGen identity
	}
}

textures/prisonbreak_tj/concrete_wall_4
{
	qer_editorimage textures/prisonbreak_tj/concrete_wall.jpg
	{
		map textures/prisonbreak_tj/stages/stage3.tga
		rgbGen identity
		tcgen lightmap
	}
	{
		map textures/prisonbreak_tj/concrete_wall.jpg
		blendFunc GL_DST_COLOR GL_ZERO
		rgbGen identity
	}
}

textures/prisonbreak_tj/concrete_wall_5
{
	qer_editorimage textures/prisonbreak_tj/concrete_wall.jpg
	{
		map textures/prisonbreak_tj/stages/stage4.tga
		rgbGen identity
		tcgen lightmap
	}
	{
		map textures/prisonbreak_tj/concrete_wall.jpg
		blendFunc GL_DST_COLOR GL_ZERO
		rgbGen identity
	}
}

textures/prisonbreak_tj/concrete_wall_6
{
	qer_editorimage textures/prisonbreak_tj/concrete_wall.jpg
	{
		map textures/prisonbreak_tj/stages/stage5.tga
		rgbGen identity
		tcgen lightmap
	}
	{
		map textures/prisonbreak_tj/concrete_wall.jpg
		blendFunc GL_DST_COLOR GL_ZERO
		rgbGen identity
	}
}

textures/prisonbreak_tj/concrete_wall_7
{
	qer_editorimage textures/prisonbreak_tj/concrete_wall.jpg
	{
		map textures/prisonbreak_tj/stages/stage6.tga
		rgbGen identity
		tcgen lightmap
	}
	{
		map textures/prisonbreak_tj/concrete_wall.jpg
		blendFunc GL_DST_COLOR GL_ZERO
		rgbGen identity
	}
}

textures/prisonbreak_tj/concrete_wall_8
{
	qer_editorimage textures/prisonbreak_tj/concrete_wall.jpg
	{
		map textures/prisonbreak_tj/stages/stage7.tga
		rgbGen identity
		tcgen lightmap
	}
	{
		map textures/prisonbreak_tj/concrete_wall.jpg
		blendFunc GL_DST_COLOR GL_ZERO
		rgbGen identity
	}
}

textures/prisonbreak_tj/concrete_wall_9
{
	qer_editorimage textures/prisonbreak_tj/concrete_wall.jpg
	{
		map textures/prisonbreak_tj/stages/stage8.tga
		rgbGen identity
		tcgen lightmap
	}
	{
		map textures/prisonbreak_tj/concrete_wall.jpg
		blendFunc GL_DST_COLOR GL_ZERO
		rgbGen identity
	}
}

Mapscript:

game_manager
{
	spawn
	{
		wait 50
		wm_axis_respawntime 1
		wm_allied_respawntime 1
		wm_set_round_timelimit 1337
		wm_set_defending_team 0
		wm_setwinner 0
		wait 10000
		trigger self the_works
	}
	
	trigger the_works
	{
		remapshader textures/prisonbreak_tj/concrete_wall_1 textures/prisonbreak_tj/concrete_wall_2
		remapshaderflush
		wait 100
		remapshader textures/prisonbreak_tj/concrete_wall_1 textures/prisonbreak_tj/concrete_wall_3
		remapshaderflush
		wait 100
		remapshader textures/prisonbreak_tj/concrete_wall_1 textures/prisonbreak_tj/concrete_wall_4
		remapshaderflush
		wait 100
		remapshader textures/prisonbreak_tj/concrete_wall_1 textures/prisonbreak_tj/concrete_wall_5
		remapshaderflush
		wait 100
		remapshader textures/prisonbreak_tj/concrete_wall_1 textures/prisonbreak_tj/concrete_wall_6
		remapshaderflush
		wait 100
		remapshader textures/prisonbreak_tj/concrete_wall_1 textures/prisonbreak_tj/concrete_wall_7
		remapshaderflush
		wait 100
		remapshader textures/prisonbreak_tj/concrete_wall_1 textures/prisonbreak_tj/concrete_wall_8
		remapshaderflush
		wait 100
		remapshader textures/prisonbreak_tj/concrete_wall_1 textures/prisonbreak_tj/concrete_wall_9
		remapshaderflush
		wait 100
		remapshader textures/prisonbreak_tj/concrete_wall_1 textures/prisonbreak_tj/concrete_floor	//debug
		remapshaderflush
		wait 1000
		trigger self the_works
	}
}

g_scriptdebug come up with everything working…
compiled each lightmap with:
BSP: -meta -v
Light: -light -fast -filter -nocollapse -bounce 8 -external -lightmapsize 256 -samples 2

Thanks in advance.

P.S. Will upload lightmaps if needed.

P.P.S Had a little typo, so a slightly different issue:
The remapshadered textures come out black, and the debug line works and gives me a nice floor texture, but i really want this effect(promised a working example for a test).

P.P.P.S Oh my god, had another typo(thats what you get for 30hrs of no sleep)
now only one issue remains, the lightmap looks like it has wrong co-ords as sth, because the effect doesn’t look realistic(looking at lightmaps, i can see some piece locations moving, why so?)