Jump to content

Light material question


spamclark15

Recommended Posts

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...