Light material question

I've changed the color of the lights on doors for locked/unlocked but I'm noticing that, while the red image appears correctly, the green image seems to be a combination of both the "locked" and "unlocked" images. Looking through the material files, I found

textures/base_door/doorlight
{
	//noShadows
	qer_editorimage	textures/base_door/doorlight_red.tga
	bumpmap		textures/base_door/doorlight_local.tga
       	diffusemap	textures/base_door/doorlight_red.tga
	{
		if ( parm7 == 0 )
		blend 	add
		map		textures/base_door/doorlight_red.tga
		colored
	}
	{
		if ( parm7 == 1 )
		blend 	add
		map		textures/base_door/doorlight_grn.tga
		colored
	}
}

textures/base_door/doorlight_red_to_green
{
	qer_editorimage	textures/base_door/doorlight_red.tga
	bumpmap		textures/base_door/doorlight_local.tga
       	diffusemap	textures/base_door/doorlight_red.tga
		{
		if ( parm7 == 1 )
		blend 	add
		map		textures/base_door/doorlight_red.tga
		rgb		5
	}
	{
		if ( parm7 == 0 )
		blend 	add
		map		textures/base_door/doorlight_grn.tga
		rgb		5
	}
}

textures/base_door/doorlight_grn
{
	//noShadows
	qer_editorimage	textures/base_door/doorlight_grn.tga
	bumpmap		textures/base_door/doorlight_local.tga
       	diffusemap	textures/base_door/doorlight_grn.tga
	{
		blend 	add
		map		textures/base_door/doorlight_grn.tga
		colored
	}
}

Does anyone know enough about the material files who knows what needs changed to get green to appear fully opaque rather than a mixture?

 

Share this post


Link to post

First of all, are you utilizing the 'shaderparm7' '0/1' key/val for your doors? (That's what the 'if ( parm7 == 0 )' and 'if ( parm7 == 1 )' text above is referencing.) That's the proper way to switch them between red and green, not with the color values. Everything with the red/green lights is set to shaderparm7/0 (red) by default. If you're using color values on your doors it will affect any ordinary light textures on them, but it can affect the red/green lights as well.

Share this post


Link to post

I figured it out. It was an issue with how the images were being blended. Replacing blend add with blend blend prevents the green from being transparent to varying degrees on top of the red.

Share this post


Link to post

I do have another question: The soulcube viewmesh has a light on the front of it... Where is that light defined so I can make changes to it?

Share this post


Link to post

In all honesty, I've never much looked into the soul cube. My guess would be in weapons.mtr.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now