Page 1 of 1

noob teleporter question

Posted: Sun Sep 16, 2012 1:31 am
by HateFactor
Image

http://www.youtube.com/watch?v=rOH09YrxvNI

I'm trying to build a portal that looks like the classic IHV one, pictured above. The vanilla Q3 teleporter (like the one on Q3DM7) has annoying white "fog".

Is it just a question of applying the right shader/texture to a surface? I'm a total map editing noob :tear:

Re: noob teleporter question

Posted: Sun Sep 16, 2012 3:09 am
by HateFactor
This is the best I could do with all the stock Q3 resources:

Image

Image

Re: noob teleporter question

Posted: Sun Sep 16, 2012 3:36 am
by obsidian
HateFactor wrote:Is it just a question of applying the right shader/texture to a surface? I'm a total map editing noob :tear:
You'll probably have to copy one of the existing teleporter shader scripts and use it as a base to write your own. Copy the shader, rename it to something unique and go down line by line and learn what each directive does and edit as necessary. See the shader manual in my signature below for reference. It'll probably be a bit of trial and error if you're a beginner, but most people will be able to figure it out.

If you get stuck on any particular bit of the shader, post what you have and either myself or someone else here will try to help you through it.

Re: noob teleporter question

Posted: Sun Sep 16, 2012 3:50 am
by KittenIgnition
AFAIK, the texture is just an alpha map (black = transparent, white = visible). Use the black texture (textures/common/black.tga?), and the portal view will be completely solid...

I think.

Re: noob teleporter question

Posted: Sun Sep 16, 2012 3:59 am
by obsidian
Not quite. It scales vertex alpha values depending on the player's distance from the surface (alphaGen portal) to achieve the fading effect when you approach the teleporter. However, you are right that there may be an (optional) alpha map that determines which pixels can become opaque/transparent. Whether the shader he is currently using has an alpha map, I can't tell from the screenshots.

Re: noob teleporter question

Posted: Sun Sep 16, 2012 9:44 am
by themuffinman
Here's the original shader:

Code: Select all

textures/common/portal
{
	qer_editorimage textures/common/qer_portal.tga
	portal
	surfaceparm nolightmap

	{
		map textures/common/portal.tga
		blendFunc GL_ONE GL_SRC_ALPHA
		tcMod turb 0 0.25 0 0.05
		depthMask
	}

	{
		map textures/sfx/bluegoal.tga
		blendFunc GL_ONE GL_SRC_ALPHA
		tcGen environment
		tcMod turb 0 0.25 0 0.05
	}
}
Obviously don't just copy and paste it since it'll conflict with the actual Q3A textures/common/portal shader. :up: