Page 1 of 1

Textures with Alpha Channel and GTKradiant 1.6.4?

Posted: Tue Dec 30, 2014 11:52 pm
by AEon
I started to look into the grate textures from Sock's Industrial Texture Set and used my AEdm7 (eX) shader for them... the images are 32bit TGA, so have an alpha channel, but neither in the texture window of GTKradiant 1.6.4 do they show the alpha transparency, nor in the 3D camera view. Here is the shader I am using on them:

Code: Select all

textures/aeindus/met_grate1_b
{
	qer_editorimage textures/aeindus/met_grate1_b.tga
	surfaceparm	metalsteps
	surfaceparm trans
	surfaceparm alphashadow
	surfaceparm nomarks
//	cull none					// We don't really want them BOTH sided!
	nopicmip
	{
		map textures/aeindus/met_grate1_b.tga // (1)
		blendFunc GL_ONE GL_ZERO
		alphaFunc GE128
		depthWrite
		rgbGen identity
	}
	{
		map $lightmap
		rgbGen identity
		blendFunc GL_DST_COLOR GL_ZERO
		depthFunc equal
	}
}
For AEdm7 I created another texture (not sure what I did) at (1) to make this work apparently. Since I am starting from scratch it would be nice to know how to properly have grates, i.e. texture with alpha, work in GTKradiant and also in-game. I also ask because from my shader notes I recall there were issues between the different Radiant versions, i.e. 1.2.13, 1.4 and 1.5...

E.g. I think the texture preview in Radiant never showed alpha transparency... but I really hope to see it in the Camera (3D) view. If I need to "hack" together a special editor version of those texture, that would not be great, but I'd do it.

Thanks.

Re: Textures with Alpha Channel and GTKradiant 1.6.4?

Posted: Wed Dec 31, 2014 12:08 am
by KittenIgnition
The only current "qer_" shader parm (that I know of) that affects transparency is 1/0 - works the same as alphaFunc GE128. It's called "qer_alphafunc greater 0.5", basically every pixel with an alpha value over 128 or .5 or w/e will be drawn.

Re: Textures with Alpha Channel and GTKradiant 1.6.4?

Posted: Wed Dec 31, 2014 5:36 pm
by obsidian

Re: Textures with Alpha Channel and GTKradiant 1.6.4?

Posted: Wed Dec 31, 2014 5:36 pm
by AEon
Alas
  • qer_alphafunc greater 0.5
seems to do nothing, at least not that I noted in GTKradiant 1.6.4 (since it apparently only works in GTKradiant v1.5).

I added
  • qer_trans 0.99
to the grate shaders, and that at least seems to do the job in the 3D Camera view. Though using 0.5 instead, also does not make any difference. Strange.

Update: Now let us see if obsidians link confirms the above. Thanks obsidian. Ha, actually guessed/remembered reading that info way back. Added the shader manual to my accessible links to let me quickly look up the info.

Re: Textures with Alpha Channel and GTKradiant 1.6.4?

Posted: Thu Jan 01, 2015 12:22 am
by KittenIgnition
AEon wrote:Alas
  • qer_alphafunc greater 0.5
seems to do nothing, at least not that I noted in GTKradiant 1.6.4 (since it apparently only works in GTKradiant v1.5).
That sucks, it's a really nice feature to have. I guess NetRadiant is still better than 1.6 ;)

Re: Textures with Alpha Channel and GTKradiant 1.6.4?

Posted: Thu Jan 01, 2015 12:40 am
by AEon
Hmm... never tried NetRadiant... might be something to try... or was it based on v1.5? It was, and probably get this version:

http://ingar.satgnu.net/gtkradiant/

I liked 1.5 because it lets you place models so easily and without "hacking numbers". No longer remember the interface changes to 1.4 or 1.6.

Re: Textures with Alpha Channel and GTKradiant 1.6.4?

Posted: Thu Jan 01, 2015 5:37 am
by KittenIgnition
NetRadiant is a really nice fork of 1.5, but the latest version (from 2012 I think) has a really annoying bug that causes a black square to appear in the middle of every view sometimes. And the texture list becomes invisible (you need to open the console then switch back to the texture browser, and it will work). These two bugs are really annoying, but it's still way better than 1.6.4 for me; it still has less bugs, and less influential bugs.