Page 1 of 2
Alpha Shaders
Posted: Mon Sep 22, 2008 10:08 pm
by Stealthzone
Hi all,
Stealth here from the TC:E community. I'm having a problem with alpha shaders.
Here is the layout by the way.
My problem is that when you look into the water you can see the skybox base. Is it possible to darken the color of the water so you can't see it? Or even make it foggy, dirty? Or even edit one of the TGA files with photoshop? Just inside the mark I made.
And when you look off into the horizon, you can see the outline of the skybox/water as well.
I've tried messing with alpha shaders but cant seem to get them to work. Or even know where to place them. If anyone here can please send me an example map of how water fades off into the skybox, and to where you can't see the bottom of the skybox in the water, that would be much appreciated.
Re: Alpha Shaders
Posted: Tue Sep 23, 2008 12:08 pm
by o'dium
What game is that?
Anyway, if your making a boat level, make a LARGE circle water surface rather than a small square/rectangle, that way it looks and fades out better. Don't worry about performance, it wont be much different, if any.
Then, add a fog light under the water to simulate depth in there, and maybe even a slight one above the water to simulate atmosphere.
That should create a fake horizon which will look good enough for what you want.
Re: Alpha Shaders
Posted: Tue Sep 23, 2008 2:13 pm
by obsidian
Assuming it's Q3-engine based and supports Q3Map2, use alphaMod volume brushes to fade the water and ground into the skybox. This assumes you are using a skybox, skyportal or hemisphere type sky, not the generic Q3 cloud skies with the massive HoM effect at the bottom (which looks better anyway).
Re: Alpha Shaders
Posted: Tue Sep 23, 2008 5:23 pm
by Stealthzone
Wow, thanks for the responses. I will try both suggestions and let you know.
About the alpha brushes. Where do I place them?
And Fog lights?
Sorry, I'm very new to this still.
Re: Alpha Shaders
Posted: Tue Sep 23, 2008 11:05 pm
by obsidian
There are no foglights in Q3.
Read this:
http://www.quake3world.com/forum/viewto ... 10&t=37504
And shader manual linked in my signature.
Re: Alpha Shaders
Posted: Tue Sep 23, 2008 11:43 pm
by Stealthzone
Its actually, WET, is that the same?
I'm more concerned with the alpha shaders. Some reason its not working. Is there a special switch during the compile that I need?
Re: Alpha Shaders
Posted: Wed Sep 24, 2008 9:48 pm
by Stealthzone
So according to the manual, the engine cant do what I want to do. What engine can? I'm going to find out.
Re: Alpha Shaders
Posted: Wed Sep 24, 2008 9:56 pm
by Kaz
Enemy Territory is quake 3 based and can do alphamod shaders. You don't need special switches, you just have to set up everything properly.
http://www.quake3world.com/forum/viewto ... 10&t=37504
edit: didn't see that obsidian posted the same link, oops...
Re: Alpha Shaders
Posted: Wed Sep 24, 2008 10:14 pm
by Stealthzone
My apologies and ignorance, but I don't see how that topic can help what I'm doing. And if it does, please don't assume that I have any knowledge on this. I'm just trying to learn. If someone can make an example map of how this is done, I would gladly pay them. Thanks.
Edit: Dont forget were dealing with two different shaders, one being a skybox, and one being water. Not land or ground. I do hope someone can help.

Re: Alpha Shaders
Posted: Thu Sep 25, 2008 1:26 am
by Stealthzone
Well, I figured it out. I eventually do he he.

Re: Alpha Shaders
Posted: Thu Sep 25, 2008 2:05 pm
by obsidian
Since this works based on vertex alpha, you may want to chop up the water geometry a bit, say radiating from the centre or something. You'll probably get better results on the blend.
Re: Alpha Shaders
Posted: Thu Sep 25, 2008 2:05 pm
by obsidian
Since this works based on vertex alpha, you may want to chop up the water geometry a bit, say radiating from the centre or something. You'll probably get better results on the blend.
Re: Alpha Shaders
Posted: Thu Sep 25, 2008 7:32 pm
by Stealthzone
In dumba$$ language please?
Re: Alpha Shaders
Posted: Fri Sep 26, 2008 5:21 am
by Stealthzone
Is this what you meant?

Re: Alpha Shaders
Posted: Thu Oct 02, 2008 1:15 am
by Stealthzone
Ya done with me obsidian? Oh mighty one......

Re: Alpha Shaders
Posted: Mon Oct 06, 2008 12:08 am
by $NulL
This is how I would do it:

Re: Alpha Shaders
Posted: Tue Oct 07, 2008 7:28 am
by Stealthzone
Did you actually compile that? Any screens? Part of the problem is the sky shader.
Check this tutorial out.
http://szicovii.com/modules/smartsectio ... ?itemid=20
Re: Alpha Shaders
Posted: Tue Oct 07, 2008 9:29 am
by $NulL
No I didnt compile that particular one, but the shader / medod is taken from the map ut4_mandolin which i made for urbanterror. The water and sky fade into a common colour.
[See here]
That article looks quite interesting, i just quickly scanned through it. but I guess there are a couple of things I would have done differently to him:
1. I dont see any reason to include alpha mods for 75%, 50% and 25%; as only using 100% and 0% will provide a smooth gradient transition in which all alpha values will be present.
2: The fade brushes could be made into a _skybox entity so as to not increase the size of the map. (and yes _skyboxes can be made to line up perfectly with world geometry, have a look at ut4_subterra for urban terror if you dont believe me.)
Re: Alpha Shaders
Posted: Tue Oct 07, 2008 12:00 pm
by obsidian
Was on vacation for a month. Posting here was a luxury whenever I could snag a free wifi signal. Then my laptop crapped out on me and I'll have to send it in for warranty repair.
The square bits are alpha mod 0% brushes. No need for all those extra rings like in the tutorial.

Re: Alpha Shaders
Posted: Tue Oct 07, 2008 12:36 pm
by Stealthzone
Thank you very much guys. I'm working on bumpmapping now and its not cooperating with me. LOL.
My findings and comments on this. After tweaking and several series of tests. I'm afraid I'm not happy with the results. I found that you must have little or no light. There must be a parameter I can add to my script which is below. Meanwhile, check out what I have so far. Which is not much.....
Here you see the first test

Then the second. Which I liked the most.

Here is the textured result

Here is the non-bumped angle

Here is the bumped angle

Here is the non-bumped side

here is the bumbed side
I guess I'm going to have to play with it a little more. But it is interesting if used with correct lighting and texture.
Here is my shader file.
Code: Select all
textures/re_metal/metal_13833
{
qer_editorimage textures/re_metal/metal_1383.tga
q3map_normalimage textures/re_metal/metal_1383_bump.tga
q3map_lightmapsamplesize 0.1
{
map $lightmap
rgbgen identity
}
{
map textures/re_metal/metal_1383.tga
rgbgen identity
blendFunc GL_DST_COLOR GL_ZERO
}
Re: Alpha Shaders
Posted: Tue Oct 07, 2008 1:40 pm
by o'dium
Are you running in 16bit mode...? That will really make bump maps look worse mate, try running in 32bit.
Re: Alpha Shaders
Posted: Tue Oct 07, 2008 1:50 pm
by Stealthzone
Running 32bit. I think it has to do with the creation of the bump in PS, and some parameter in the shader to obtain the right results for the lighting I have. Its a night map.
Re: Alpha Shaders
Posted: Tue Oct 07, 2008 2:58 pm
by Dark Metal
You know, when this thread loads it looks like you're mapping a phallic symbol...
Re: Alpha Shaders
Posted: Tue Oct 07, 2008 3:07 pm
by Stealthzone
ROFLMAO..... good one!

Re: Alpha Shaders
Posted: Tue Oct 07, 2008 8:22 pm
by o'dium
Stealthzone wrote:Running 32bit. I think it has to do with the creation of the bump in PS, and some parameter in the shader to obtain the right results for the lighting I have. Its a night map.
32bit...? You sure?
I only ask because those are jpegs, yet they show a hell of a lot of banding...?