Page 1 of 1

Glass Texture

Posted: Wed Feb 19, 2003 12:57 am
by Innkeeper
After about 3 months of making test maps and writing a few tutorials I have finially started on my long term project. I am sure that I will run into a great many puzzels along the way. I have two to pose at the moment.

1. I wish to have a glass texture, like a window pain. Just the glass. I have been looking at the "windowframe1" shader and the "windowbroken1" shader. They are as follows:

Code: Select all

textures/general_structure/windowframe1
{
	surfaceparm glass
	qer_keyword broken
	qer_keyword window
	qer_keyword glass
//	cull none
	qer_editorimage textures/window/windowframe1.tga
	{
		map textures/test/window_env.tga
		tcgen environment
		alphagen const .2
		blendFunc blend
	}
	{
		map textures/window/windowframe1.tga
//		blendFunc blend
		depthWrite
		alphaFunc GE128
	nextbundle
		map $lightmap
	}
}

textures/general_structure/windowbroken1
{
	qer_editorimage textures/window/windowframe1.tga
	qer_keyword broken
	qer_keyword window
	qer_keyword glass
	surfaceparm fence
	surfaceparm wood
//	cull none
	{
		map textures/test/window_env.tga
		tcgen environment
		alphagen const .2
		blendFunc blend
		alphaFunc GT0
	nextbundle
		map textures/window/windowbroken1.tga
	}
	{
		map textures/window/windowframe1.tga
//		blendFunc blend
		depthWrite
		alphaFunc GE128
	nextbundle
		map $lightmap
	}
} 
surfaceparm glass I understand, when hit, we want to hear glass breaking and pieces flying.

The window_env.tga is a snow sceen with trees. OK...? :? Where does this come in? Does this have a hidden alpha map that provides something?

Once broken, it gets "alphaFunc GTO". Can some one explain the different alpha functions?

The windowframe1.tga gets used the same for broken and not. So I would assume that it is only used for the frame image only.

2. Does anyone edit .map files in a text editor? (this may be a can of worms. :? )

Posted: Wed Feb 19, 2003 7:33 am
by jv_map
window_env.tga is an environment map. You'll see the reflection of a snowy landscape in the window.

alphaFunc GT0 means 'greater than 0', GE 128 'greater than or equal to 128', which applies to the level of brightness of the alpha channel (0 - 256).

For a better explanation, go here:
http://www.ritualistic.com/games/fakk2/ ... anual.html

Posted: Wed Feb 19, 2003 12:26 pm
by Innkeeper
Thanks jv, that is exactly what I needed.

Posted: Thu Feb 20, 2003 3:45 am
by Innkeeper
Ok, what about the second issue?

Mohradiant does an exceptionally bad job of creating a clean map file. I have found that editing it clears up some of the brush conflicts seen in the game. Is there a post processor that will do the job, or shall I write one on my own? :?

Posted: Thu Feb 20, 2003 7:22 am
by jv_map
The bobtools plugin can remove any invalid faces and trace intersections. I'm not sure whether it works with Mohradiant, as I never needed it ;). Anyway, I think you can get it at http://www.quake3world.com.

If the plugin doesn't work with Mohradiant, you can always open your mohaa map in GTKRadiant, run the plugin, and paste the clean brushes back into Mohradiant. 8)