Quake3World.com Forums
     Level Editing & Modeling
        Glass shader to tone down the skybox light?


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: Glass shader to tone down the skybox light?

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 12-07-2009 04:41 AM           Profile Send private message  E-mail  Edit post Reply with quote


Alas, I just cannot figure "shader logic", on how to make a glass shader that will do the following:

  • That will actually respect surfaceparm alphashadow and tone down the light passing through a glass shader.
  • And reflect a "fake" environment via tcGen environment.

Present - not working shader:
Code:
textures/aedm7/glass
{
   qer_editorimage textures/aedm7/dsiglass.tga
   qer_trans 0.7            // Was 0.5, 0.7 is darker, less transparent.
   surfaceparm alphashadow      // Testing ceiling glass, change skylight on floor?!
   surfaceparm nolightmap
   //surfaceparm nonsolid      // Glass is solid?!
   surfaceparm trans
//   cull disable            // Turn on culling for 2-sided glass!
   {
      map textures/aedm7/dsitinfx_alpha.tga
      blendfunc blend
      //rgbGen identity
//      tcGen environment
      alphagen const 0.5      // .25 Defines window transparency was .4 (.35 = more transparent)
   }
}


  • Quite fundamentally I do not seem to understand how to manipulate the textures.
  • I added an alpha channel to id's dsitinfx.tga, that has 50% opacity of the RGB channel (named dsitinfx_alpha.tga; saved as 32bit tga), but surfaceparm alphashadow ignores thos, so does actually cutting transparent "holes" into the image.

Can it be that you can cast shadows via 100% transparent areas in a texture (tga), and that the shadows are either "on" or "off"? All light compiles would completely block lighting of the glass once I use surfaceparm alphashadow.

(Will try using a completely different shader POM vines where alphashadows at least work).




Top
                 

The Afflicted
The Afflicted
Joined: 27 Mar 2002
Posts: 792
PostPosted: 12-07-2009 05:21 AM           Profile Send private message  E-mail  Edit post Reply with quote


The texture with the alpha channel will need to be the texture referenced in qer_editorimage not the 'map' texture.


You might be right about alphashadow being a binary on/off. (Its been a while since I experimented with it.) But you can definatly replace alphashadow with lightfilter on a black/white image to get the desired result.

Light filter multiples the brightness of the light passing through the surface with the colour value of the texture at the point it passes through. So if light tries to pass through a black pixel the light will be stopped; but light will not be affected by a pure white pixel. All values in between give appropriate effects, you can even use colour to emulate light coming through a stain glass window.




Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 12-07-2009 05:57 AM           Profile Send private message  E-mail  Edit post Reply with quote


$NulL,
... /me weeps quietly... this is the first time I have been made aware that qer_editorimage is actually used for anything other but in-editor preview. Explains why I was changing things but nothing was happening. Info that really should be mentioned in the shader manual: alphashadow, IMO.

Will try your light filter idea.

Update: Sorry $NulL but manipulating the qer_editorimage image instead does not not anything for me. As I had expected it would not, why should it, concerning lighting. I created a checked tga 24bit texture: black, white, gray, and black 50% transparent, and put it in this shader:
Code:
textures/aedm7/glass
{
   qer_editorimage textures/aedm7/dsiglass_checker.tga
   qer_trans 0.7            // Was 0.5, 0.7 is darker, less transparent.
   surfaceparm lightfilter      // Use texture's RGB and alpha channels to generate colored alpha shadows in the lightmap.
   surfaceparm alphashadow      // Testing ceiling glass, change skylight on floor?!
   surfaceparm nolightmap
   surfaceparm trans
   {
      map textures/aedm7/dsiglass_checker.tga
      blendfunc blend
      //rgbGen identity
   }
}

And is just does not "shine" through or filter the light at all.

Obviously I don't get the fundamentals of the lighting shader code required, and I don't seem to be able to find a shader that uses surfaceparm lightfilter. Trial and error is a waste of my time... giving up. It was a nice idea.




Top
                 

Warrior
Warrior
Joined: 07 Sep 2006
Posts: 82
PostPosted: 12-07-2009 09:08 AM           Profile Send private message  E-mail  Edit post Reply with quote


I'm not sure if there is a better (optimized) way to do this, but this code seems to work.

Three stages:
1) Env map for shiny effect
2) Glass texture with alpha channel
3) depthFunc for transparency

For lighting, I recommend relying on your skybox light (both skyLight & sunExt) in combination with the window's shader emitted surfacelight, similar to the one below. You can use the backSplash & lightmapFilterRadius to create a soft ambient light above the glass that will filter light through, and illuminate the area around the window. Still doing some testing, but it looks like skybox & shader surfacelight provide good results.

Code:
textures/name/glassStain
{
   qer_editorimage textures/name/glassStain.tga

   surfaceparm alphashadow
   surfaceparm lightfilter

   q3map_lightmapFilterRadius 0 32
   q3map_backSplash .5 -16
   q3map_surfacelight 150

   {
      map textures/effects/envmapligh.tga
      tcGen environment
      tcmod scale 2 2
      rgbGen identity
      blendFunc GL_DST_COLOR GL_ONE
   }
   {
      map textures/name/glassStain.tga
      blendFunc GL_DST_COLOR GL_ZERO
      rgbGen identity
   }
   {
      map $lightmap
      rgbGen identity
      blendFunc GL_DST_COLOR GL_ZERO
      depthFunc equal
   }
}




Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12304
PostPosted: 12-07-2009 09:25 AM           Profile Send private message  E-mail  Edit post Reply with quote


It's already pretty clear in the manual that qer_ directives are editor only:
Quote:
Editor Specific Shader Keywords

These instructions only affect the texture when it is seen in the Radiant editor. They should be grouped with the surface parameters but ahead of them in sequence.



alphashadow is indeed binary, it takes the alpha channel of the texture and uses it as a mask for casting shadows. Examples are like shadows cast by tattered banners, plant leaves, window frames (but not the glass). It doesn't sound like this is what you want. It doesn't work well with fine-lined details since the lightmap resolution is usually much lower than texture resolution.

lightfilter takes the colour and alpha information of the texture to produce coloured "shadows". So if you have stained glass, it will take those colours and project them as coloured shadows.

Try just this:

Code:
textures/aedm7/glass
{
   qer_editorimage textures/aedm7/dsiglass_checker.tga
   qer_trans 0.7            // Was 0.5, 0.7 is darker, less transparent.
   surfaceparm lightfilter      // Use texture's RGB and alpha channels to generate colored alpha shadows in the lightmap.
   //COMMENTED OUT - surfaceparm alphashadow      // Testing ceiling glass, change skylight on floor?!
   surfaceparm nolightmap
   surfaceparm trans
   {
      map textures/aedm7/dsiglass_checker.tga
      blendfunc blend
      //rgbGen identity
   }
}



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

btw cocks
btw cocks
Joined: 16 Aug 2003
Posts: 3216
PostPosted: 12-07-2009 09:52 AM           Profile Send private message  E-mail  Edit post Reply with quote


lightfilter is definitely what you want




Top
                 

This is not Æon!
This is not Æon!
Joined: 20 Jan 2002
Posts: 2162
PostPosted: 12-07-2009 10:12 AM           Profile Send private message  E-mail  Edit post Reply with quote


obsidian wrote:
It's already pretty clear in the manual that qer_ directives are editor only:


I've said it before, qer_editorimage, effects the bounce light.
Maybe I'm doing something wrong, but I'm 100% it does. That's why if I have a editor image that looks totally different from the real texture, I always specify a lightimage.



_________________
Q3Map2 2516 -> http://www.zfight.com/misc/files/q3/q3map_2.5.16_win32_x86.zip
Q3Map2 FS_20g -> http://www.zfight.com/misc/files/q3/q3map2_fs_20g.rar
GtkRadiant 140 -> http://www.zfight.com/misc/files/q3/GtkRadiantSetup-1.4.0-Q3RTCWET.exe


Top
                 

The Afflicted
The Afflicted
Joined: 27 Mar 2002
Posts: 792
PostPosted: 12-07-2009 10:34 AM           Profile Send private message  E-mail  Edit post Reply with quote


I could have sworn that in the absence of q3map_lightimage, q3map2 will look at the qer_editorimage.

It worked correctly with this shader:
Code:
textures/null_urt1/glass_clear
{
   qer_editorimage textures/null_urt1/glass_shadow.tga
   surfaceparm nolightmap
   surfaceparm trans
   surfaceparm lightfilter
   cull disable
   qer_trans 0.5
   {
      map textures/null_urt1/chrome.tga
      blendfunc add
      tcGen environment
      rgbgen const ( 1 0 0 )
   }
}




Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12304
PostPosted: 12-07-2009 11:43 AM           Profile Send private message  E-mail  Edit post Reply with quote


Hipshot wrote:
obsidian wrote:
It's already pretty clear in the manual that qer_ directives are editor only:


I've said it before, qer_editorimage, effects the bounce light.
Maybe I'm doing something wrong, but I'm 100% it does. That's why if I have a editor image that looks totally different from the real texture, I always specify a lightimage.


Err... yes, except for that. It uses that as a fallback feature for radiosity if lightRGB and lightImage are absent. But as far as what it actually does and what AEon thought, qer_ directives don't actually affect the appearance of the shader itself.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

Mercenary
Mercenary
Joined: 24 Mar 2008
Posts: 223
PostPosted: 12-07-2009 12:04 PM           Profile Send private message  E-mail  Edit post Reply with quote


Another thing the qer_editorimage is used for is at exporting ASE models. It writes the qer_editorimage instead of the shader. It makes no sense to me that it does, but it does. In netradiant's q3map2 you can add -shaderasbitmap so it writes the shader names instead.




Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 12-07-2009 01:21 PM           Profile Send private message  E-mail  Edit post Reply with quote


obsidian wrote:
lightfilter takes the colour and alpha information of the texture to produce coloured "shadows". So if you have stained glass, it will take those colours and project them as coloured shadows.


I don't know why I kept reading to use alphashadow and lightfilter in the same shader, but removing the former *finally* shows some results on the lightmapped floor (lightmapscale 0.125)... thanks.

As was mentioned the "black" part blocks all light, but interestingly so does the black texture that was using 50% opacity (set in PS)... "white" lets all light pass and the grey looks really nice, taking off that "edge" of the very brilliant skylight. The latter is pretty much what I was looking for, though I might use the use the dsifx or the dsiglass texture to actually give the floor a slight irregularity, plus toning down the light intensity.

After finalizing the glass, I'll give the decals (i.e. those Tabun created another try)... would be nifty if the color actually lit the floor. I just need to color-invert them... hopefully.

Quack,
will test your shader... and see if I can get the windows set up the way I want them. Though I started "miss-using" windows as a light source, in this case I'd prefer not to (maybe later, your idea of the greenish tint).

Thanks everyone for not giving up on me. If I get this to work it should really look cool. Especially the contrast between toned-down glass, and broken out pieces of glass (full intensity) should really look nice. Hmm... "godrays" for the broken out areas might be nifty.


Update: $NulL was right... qer_editorimage does actually define the lightfilter image - here the checked pattern - whereas the dsitinfx.tga is only seen in-game as environment mapping.
Code:
textures/aedm7/glass
{
   qer_editorimage textures/aedm7/dsiglass_checker.tga
   qer_trans 0.7
   surfaceparm lightfilter      // Use texture's RGB and alpha channels to generate colored alpha shadows in the lightmap.
   surfaceparm nolightmap
   surfaceparm trans
   {
      map textures/aedm7/dsitinfx.tga
      blendfunc blend
      tcGen environment
      alphagen const 0.5   // .25 Defines window transparency was .4 (.35 = more transparent)
   }
}

Nice...




Top
                 

btw cocks
btw cocks
Joined: 16 Aug 2003
Posts: 3216
PostPosted: 12-07-2009 03:55 PM           Profile Send private message  E-mail  Edit post Reply with quote


if you set dsitinfx as your lightimage then you should be able to use dsiglass_checker as your editorimage without issue?

or maybe I'm misunderstanding, it's literally been 5+ years since I wrote a Q3 shader




Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 12-08-2009 03:15 AM           Profile Send private message  E-mail  Edit post Reply with quote


rgoer wrote:
if you set dsitinfx as your lightimage then you should be able to use dsiglass_checker as your editorimage without issue?

Don't fully understand your comment, I actually did that and it works.

The present shader uses:

  • qer_editorimage (dsiglass_checker.tga) to define the image to be used as lightfilter (to filter the sun light), and cast the interesting shadows on the floor.
  • The dsitinfx.tga creates the glass surface and the environment "fake" reflex.

The problem I still see is that the glass does not actually *have* a real surface i.e. dsiglass.tga, onto which the effect dsitinfx.tga is then mapped. Presently I am changing the transparency of the glass manipulating dsitinfx.tga (via alphagen const 0.5) that tones down the effect, almost removing a glass surface.

Anyway, will test Quack's shader next...




Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12304
PostPosted: 12-08-2009 09:25 AM           Profile Send private message  E-mail  Edit post Reply with quote


Instead of changing the vertex alpha (alphaGen) try playing around with the texture's levels in Photoshop. You may be able to get a little more contrast between lighter and darker areas.

Also, most glass shaders use an additive blend. Try experimenting with that, it may look better.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

Warrior
Warrior
Joined: 07 Sep 2006
Posts: 82
PostPosted: 12-08-2009 09:46 AM           Profile Send private message  E-mail  Edit post Reply with quote


If you use lightfilter without using alphashadow, would black pixels cast shadows in the same way that alphashadow would? If the beam is a shade of light grey, it would filter that color instead of casting solid shadows like alphashadow. In the comments above I see that lightfilter uses texture's RGB and alpha channel. Would there ever be a need to use alphashadow in combination with lightfilter?

I'm thinking about metal support for a window, a simple rectangle with a steel frame & square cross in the middle. Instead of making the window frame in-game with brushes, you could use an alpha channel with alphashadow, and make the metal support any color so that it would appear to be grey & shiny, but it would effectively block light out creating solid shadows on surfaces.




Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 12-09-2009 05:58 AM           Profile Send private message  E-mail  Edit post Reply with quote


Taking this one step at a time. First off define how the lightfilter texture defined by qer_editorimage should look to give of some light dampening, to contrast enough compared to a broken out piece of glass:

    Image

    a) Top left shows the lightfilter texture used, the floor shows the shadow the glass casts with a cut out (broken out glass) corner. Here the original dsiglass texture was used. IMO, bit dark.
    b) dsiglass texture overlayed by a 50% opacity white layer. Too bright, does not contrast enough with the direct sunlight.
    c) Original dsiglass texture with +50 Contrast. Over all (even looking at the shots in 1680x) the pattern of the glass is simply to "fuzzy" to actually show significant structure on the floor. But that is OK, IMO, because I primarily want to see a darkening, for a "structure" a colored decal will be used (next set of tests). Again bit too dark like a).
    d) Upped the Brightness +20on c). Probably the best level of shading, though making a) a tad brighter would have done just as well, the since additional contrast does not show.
    e) This is how the glass on the ceiling presently looks (blend add not used yet).
    f) This is how the floor looks without any glass in the ceiling... as brightness comparison.

The floor brushes us _lightmapscale 0.125, and even with that any detail in this type of lightfilter texture, will not really show. But as mentioned a decal will be used for details. My guess is that that (texture fit) glass texture on the ceiling is simply too far away from the floor to make it possible to project a sharper shadow?

Next I'll simply use an inverted colored decal by Tabun as lightfilter "glass"... just to test how well that works. Might be funny to color the gray dsiglass, just to see how that goes.

Update II: Little fun test with colored light:

    Image

    a) Placed colored tiles (30% Opacity) on top of the above d) texture (not as a decal, yet). What do you know it actually does work with colored light :toothy:. Natedm3 had these really cool custom color glass windows that would have been nifty for a lightfilter compile.
    b) Update: Using one of Tabun's colored decals as "glass" here. Colored shadow on the floor looks quite nice, and gives the floor an interesting structure. Strange that the _lightmapscale 0.125 cannot be improved on. I tried _lightmapscale 0.05, and the result was exactly the same. Was 0.125 the lowest possible value q3map2 works with?

For completeness, the present shader version (nothing much changed so far):
Code:
textures/aedm7/glass
{
   // Contrast +50, Brightness +20 (yellow, red, blue, green)
   qer_editorimage textures/aedm7/dsiglass_rygb30.tga   
   qer_trans 0.7
   surfaceparm lightfilter      // Colored alpha shadows in lightmap.
   surfaceparm nolightmap
   surfaceparm trans
   {
      map textures/aedm7/dsitinfx.tga
      blendfunc blend
      tcGen environment
      alphagen const 0.7
   }
}




Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12304
PostPosted: 12-09-2009 08:27 AM           Profile Send private message  E-mail  Edit post Reply with quote


No, _lightmapscale is not limited by the scale, but by other things, like the physical size of lightmap pages being stretched over large surfaces and other things. There are a few tricks involved, I'm trying to find the thread about it...

Edit: Aha!

viewtopic.php?t=39964

and

http://sgq3-mapping.blogspot.com/2009/0 ... htmap.html



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

Warrior
Warrior
Joined: 07 Sep 2006
Posts: 82
PostPosted: 12-14-2009 06:05 PM           Profile Send private message  E-mail  Edit post Reply with quote


Some interesting results...


1) Glass emitting averaged color value from texture
q3map_surfacelight 70

2) Skylight filling room with subtle ambient light, using averaged color value from aedm7/forest skybox
q3map_lightmapFilterRadius 0 16
q3map_skylight 175 6

3) SunExt with pure white light filtering color & shadows through glass
q3map_sunExt 1 1 1 150 240 80 1 16

4) Final result

For the glass, the texture only uses lightFilter (no alphashadow) & does not contain an alpha channel. I'm using blendFunc GL_DST_COLOR GL_ZERO with an optional "glossy" tcGen enviroment texture for the first stage. The floor/wall texture uses alphaGen lightingSpecular which is why it looks so reflective & bright. I don't know how much of a performence hit the alphaGen lightingSpecular will have, but it sure does look good. One thing I'm considering is removing the surfacelight from the glass. The number of surfaceLight depends on if you have broken pieces of glass or one whole piece. Is it 1 surfacelight per face or 1 surfacelight per triangle? Anyway, this could increase compile times if you use lots of broken pieces of glass. The other thought would be placing a spotlight above, or placing lights manually under the glass, but I had trouble getting a good result. I really want to try to use shaders for light instead of placing lights. I think that the above example works because everything shader based, there are no lights sitting in map file, it's just skybox shader & glass shader emitting light naturally.




Last edited by AEon on 12-14-2009 06:18 PM, edited 1 time in total.Reason: lvlshot'ed the image.

Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 12-14-2009 06:20 PM           Profile Send private message  E-mail  Edit post Reply with quote


Posting your final shader along with the textures and map file could probably interest quite a few folks out there. Looks great... though for me this is too much...

I'll be using a simple glass shaders that basically absorbs some light, plus a "godray" or beam for the places were the glass is broken... I my experiment with decals filtering light later though.




Top
                 

btw cocks
btw cocks
Joined: 16 Aug 2003
Posts: 3216
PostPosted: 12-14-2009 06:48 PM           Profile Send private message  E-mail  Edit post Reply with quote


does alphaGen lightingSpecular work in vq3? I thought that was something added later, like in the elite force version or something




Top
                 

This is not Æon!
This is not Æon!
Joined: 20 Jan 2002
Posts: 2162
PostPosted: 12-14-2009 11:15 PM           Profile Send private message  E-mail  Edit post Reply with quote


Quack wrote:
Some interesting results...


1) Glass emitting averaged color value from texture
q3map_surfacelight 70

2) Skylight filling room with subtle ambient light, using averaged color value from aedm7/forest skybox
q3map_lightmapFilterRadius 0 16
q3map_skylight 175 6

3) SunExt with pure white light filtering color & shadows through glass
q3map_sunExt 1 1 1 150 240 80 1 16

4) Final result

For the glass, the texture only uses lightFilter (no alphashadow) & does not contain an alpha channel. I'm using blendFunc GL_DST_COLOR GL_ZERO with an optional "glossy" tcGen enviroment texture for the first stage. The floor/wall texture uses alphaGen lightingSpecular which is why it looks so reflective & bright. I don't know how much of a performence hit the alphaGen lightingSpecular will have, but it sure does look good. One thing I'm considering is removing the surfacelight from the glass. The number of surfaceLight depends on if you have broken pieces of glass or one whole piece. Is it 1 surfacelight per face or 1 surfacelight per triangle? Anyway, this could increase compile times if you use lots of broken pieces of glass. The other thought would be placing a spotlight above, or placing lights manually under the glass, but I had trouble getting a good result. I really want to try to use shaders for light instead of placing lights. I think that the above example works because everything shader based, there are no lights sitting in map file, it's just skybox shader & glass shader emitting light naturally.


Could you possibly paste you shaders here?
I'm too lazy atm =) And it looks very nice I must say, could prove to be very useful!



_________________
Q3Map2 2516 -> http://www.zfight.com/misc/files/q3/q3map_2.5.16_win32_x86.zip
Q3Map2 FS_20g -> http://www.zfight.com/misc/files/q3/q3map2_fs_20g.rar
GtkRadiant 140 -> http://www.zfight.com/misc/files/q3/GtkRadiantSetup-1.4.0-Q3RTCWET.exe


Top
                 

Mentor
Mentor
Joined: 12 Mar 2005
Posts: 3958
PostPosted: 12-15-2009 01:43 AM           Profile Send private message  E-mail  Edit post Reply with quote


rgoer wrote:
does alphaGen lightingSpecular work in vq3? I thought that was something added later, like in the elite force version or something

It's there. Might be that it was added in a point-release but it's there now.




Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12304
PostPosted: 12-15-2009 08:11 AM           Profile Send private message  E-mail  Edit post Reply with quote


alphaGen lightingSpecular is used on dynamic player and weapon models. I don't think anywhere else.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

foolproof
foolproof
Joined: 11 Jan 2001
Posts: 7927
PostPosted: 12-15-2009 08:14 AM           Profile Send private message  E-mail  Edit post Reply with quote


Very interesting thread.
I like how this 10 year old tech keeps getting reinvented :up:




Top
                 

Warrior
Warrior
Joined: 07 Sep 2006
Posts: 82
PostPosted: 12-15-2009 09:34 AM           Profile Send private message  E-mail  Edit post Reply with quote


Here is the glass texture used in the example posted above. I found that using tcGen environment with tcmod scale 4 4 created a really nice glossy effect. It also distorts what you are viewing through the glass.

Code:
textures/jungle/glassStain
{
   qer_editorimage textures/jungle/glassStainGreen.tga

   surfaceparm lightfilter
   surfaceparm trans
   surfaceparm nolightmap

   cull disable

   q3map_lightmapFilterRadius 0 16
   q3map_surfacelight 70

   {
      map textures/effects/envmapligh.tga
      tcGen environment
      tcmod scale 4 4
      rgbGen identity
      blendFunc GL_DST_COLOR GL_ONE
   }
   {
      map textures/jungle/glassStainGreen.tga
      blendFunc GL_DST_COLOR GL_ZERO
      rgbGen identity
   }
}



For the metalish floors/walls, I'm using a texture from q3 with custom shader. The texture contains an alpha channel which is used with the lightingSpecular. Added tcGen environment for greenish hue, this time tcmod scale .1 .1 because it should be a subtle shiny effect. I don't know a lot about alphaGen lightingSpecular and how to really control the reflections. The stock q3 shaders do use lightingSpecular, and I think it is used in a few maps also. Maybe q3dm12?

Code:

textures/jungle/metal
{
   qer_editorimage textures/base_wall/train1.tga
   {
      map textures/effects/envmaprail.tga
      tcGen environment
      tcmod scale .1 .1
      rgbGen identity   
   }   
   {
      map textures/base_wall/train1.tga
      blendFunc GL_ONE_MINUS_SRC_ALPHA GL_SRC_ALPHA
      alphaGen lightingSpecular
      rgbGen identity
   }
   {
      map $lightmap
      rgbgen identity
      blendFunc GL_DST_COLOR GL_ZERO
   }
}




Top
                 
Quake3World.com | Forum Index | Level Editing & Modeling


Post new topic Reply to topic


cron
Quake3World.com
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group