Model shader problem - truck windows.


(MrLego) #1

I am using the model “models\mapobjects\blitz_sd\blitzbody3_s.md3” in a map.

Everything is drawn and lit correctly except the windows - they are all black.

I have tried modifying the shader or remapping to another one, but the windows are still black.

The shader file is in “models_mapobjects.shader”

Here is the window shader from that file:

models/mapobjects/blitz_sd/blitz_sd_windows_s
{
	qer_editorimage models/mapobjects/blitz_sd/blitz_sd_s.tga
	{
		map textures/effects/envmap_slate.tga
		rgbGen lightingdiffuse
		tcGen environment
	}
	{
		map models/mapobjects/blitz_sd/blitz_sd_s.tga
		blendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
		rgbgen lightingDiffuse
	}
}

The “textures/effects/envmap_slate.tga” is present and I get no errors during compiling or in the game.

Does anyone have a fix for this?

EDIT: Screenshot moved.


(FireFly) #2

I had the same problem in my v1rocket map. Asuming you used a misc_model for the truck, use a misc_gamemodel instead and the windows won’t be black anymore.
However you must include the blitzbody3_s.md3 model and these two textures ‘blitz_sd_interior.tga’ and ‘blitz_sd_s.tga’ to your pk3. Reason is that the model and textures come with radiant and are not in the pak0.pk3 file that comes with the game.
So even if the windows turned out fine when using a misc_model you still had to add those two textures to your pk3.or else people playing the map would see a black orange truck…
That is why I didn’t use this particular model for my v1rocket map: adding the textures would only increase the final size of my pk3…