Texture transparency
Texture transparency
How would one make a simple semi-transparent texture, say, with an opacity of 50%?
Re: Texture transparency
Grey alpha channel and appropriate shader script
Re: Texture transparency
It must be easier than that?!
I added 'qer_trans 0.5' in the shader and the result is that the relative texture is 50% transparent in the editor.. However, I am aftering it being 50% transparent in-game.
Is there a simple command for the shader than can make it transparent in the game like in the editor?.. 'surfaceparm trans 0.5'?!
I added 'qer_trans 0.5' in the shader and the result is that the relative texture is 50% transparent in the editor.. However, I am aftering it being 50% transparent in-game.
Is there a simple command for the shader than can make it transparent in the game like in the editor?.. 'surfaceparm trans 0.5'?!
Re: Texture transparency
qer_trans 0.5 is a strictly GTKradiant relevant command, the game ignores it.
IIRC, you have to create the appropriate 32bit tga file for a 50% transparency. Obsidian would know this more precisely.
IIRC, you have to create the appropriate 32bit tga file for a 50% transparency. Obsidian would know this more precisely.
Re: Texture transparency
No need to actually make the alpha channel, I think. You can just use any old JPG and add: alphaGen const 0.5 to get 50%/grey alpha.
[size=85][url=http://www.tabun.nl]www.tabun.nl[/url][/size]
Re: Texture transparency
Ding ding ding! Assuming you want the ENTIRE texture to be 50% opaque.Tabun wrote:No need to actually make the alpha channel, I think. You can just use any old JPG and add: alphaGen const 0.5 to get 50%/grey alpha.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
Re: Texture transparency
Yeah, I was the entire texture 50% opaque.
Re: Texture transparency
Not working... Here is my shader:
textures/bla/bla
{
{
map textures/bla/bla.jpg
alphaGen const 0.5
}
}
textures/bla/bla
{
{
map textures/bla/bla.jpg
alphaGen const 0.5
}
}
Re: Texture transparency
It's a general shader directive, q3map_alphaGen const
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
Re: Texture transparency
Is still not working; has actually made it worse.. The texture is not loading now.
Here is the shader I used:
textures/bla/bla
{
{
map textures/bla/bla.jpg
q3map_alphaGen const
}
}
Here is the shader I used:
textures/bla/bla
{
{
map textures/bla/bla.jpg
q3map_alphaGen const
}
}
Re: Texture transparency
textures/bla/bla
{
{
map textures/bla/bla.jpg
alphaGen const 0.5
blendfunc blend
}
}
I think should work.
{
{
map textures/bla/bla.jpg
alphaGen const 0.5
blendfunc blend
}
}
I think should work.
Re: Texture transparency
Hey man!
Awesome, it worked!
Thanks allot for that!
Awesome, it worked!
Thanks allot for that!
Re: Texture transparency
May need to remember this for the glass I use in AEcantw2...
Re: Texture transparency
Hey I was out the door earlier on today when I verified transparency, but now that I have taken the time to look at it properly I have discovered that although it is transparent, a texture behind it that is scrolling does not show through it... Anyone know what could be causing this?!
Re: Texture transparency
Some of my template_ae textures were/are showing this issue as well. It might be best for you to copy/paste the primary "glass" shader plus the shader that is not shown into this thread. That way everyone could take a closer look. A screenshot may also help.