Quake1 with stencil shadow volumes & perpixel lighting

I would really appreciate a reliable mirror. It seems that the main site is not coping well with its newfound popularity.

Pentagram, I have two suggestions to make tenebrae even better:

Perhaps you should make GL_LINEAR_MIPMAP_LINEAR default, it looks ten times better than GL_LINEAR_MIPMAP_NEAREST.

Another suggestion is interpolated animation, some of the other q1 mods have that, and it shouldn’t take very long to implement.

On gf3 it uses linear_mipmap_linear by default on other cards you can enable it by using “gl_texturemode linear_mipmap_linear”
or maybe “gl_texturemode gl_linear_mipmap_linear”.
Interpolation is already in for the next version (looks nice ) my main concern for the first version was the speed but it is now actually faster with than wihtout interpolation. (Heh a little bit of volume caching can do wonders.)

Nice job, Pentagram!

Once upon time I was doing something like that, but with precomputed occlusion maps: http://www.cc.jyu.fi/~pturchy/dlt/
I have to admit that your approach gives more impressive results. But my is faster (screens were done on GF2)

[This message has been edited by h2 (edited 09-02-2002).]

I was thinking of how to do specular on generic hardware with GL_ARB_texture_env_combine in one pass and I have an idea for a solution. The function f(x) = (clamp[(x-0.77)*4])^2 seems to be a quite nice approximation of the x^16 function and it can be easily calculated with tex_env_combiners and destination alpha. Calculating (x-0.77)*4 wastes one texture unit but if you don’t need the normalization cube map, you should be able to get nice specular intensity even on 2-texture hardware in one pass

LaBasX2

and never forget the blendsquare glBlendFunc(GL_SRC_COLOR,GL_ONE) to power it up again…

two passes should be enough, including correct specular… in the rc’s… on a gf1… how much passes does the gf2mx here do again? per light?

The advantage of the function I hacked out in a function plotter today is that you don’t need RCs only TextureEnvCombine. I have implemented it using three texture units and it is looking great. Pentagram could use it in his Tenebrae to reduce the number of passes of the generic renderer from 9 to 6.

LaBasX2

This is the way coolest thing Ive seen since Quake 1 replaced Duke Nukem 3D…

Im all over the code trying to learn,
and I just LOVE the MatrixAffineInverse() function.

Originally posted by LaBasX2:
[b]The advantage of the function I hacked out in a function plotter today is that you don’t need RCs only TextureEnvCombine. I have implemented it using three texture units and it is looking great. Pentagram could use it in his Tenebrae to reduce the number of passes of the generic renderer from 9 to 6.

LaBasX2 [/b]

i think your hack should work with two general register combiners, in one pass. depending on the inputdata, thats where the problem is… but no more than two passes needed, for sure…

Great!, Im looking forward to testing the new version.

In other circles I am known as Phoenix (fenix@io.com). I was the one who implemented the animation interpolation that which everyone seems to use (probably because I came out with it 2 days after the source was released).

I was surprised that Tanebrae did not use it, but then I thought that it may complicate silouette determinations.

The animation interpolation was not that hard, I only had to change code in a few places, it was the movement interpolation which was really hard because there where several unrelated pieces of code that needed changing.

Actually, if you put in movement interpolation, it has a bigger effect on making things look smooth than animation interpolation. I really could not even tell that the animation was interpolated until I got the movement interpolated. It’s because the models jump so far when they move it has a bigger effect in making them look choppy then the 10fps animation.

The nicest thing about it was that when I got it working, some of the monsters made me jump like they did way back when I first played. It was like they had come alive again.

I was really impressed with how good Q1 looked with animation (and movement) interpolation.
However I cant remember the name of the mod I ran.

On the movement interpolation:
so the enemies moved in fixed steps?
I always thought that were the animated mesh moving…

Hello

Hmm the pass saving idea for the generic version is wellcome as it is rather slow. I do 3 alpha square passes to archieve x^16.
Someone else mailed me with some info on using the EXT_blend_color extension to cut another pass on geforce2 hardware, I never really read about it here so it may be of interest to you: http://talika.fie.us.es/~titan/articles/blendcolor.html
Another one mailed me on doing interpolation in the register combiners instead of with textures.
(If enough people keep mailing me I might be able to do it in one pass on a geforce2 soon )
The only interpolation code I used from someone else was from quakeforge to determine the two frames to blend between. All the rest is “different” from the other quake blending codes. (It is all put into caches since doing 5 passes and blendng vertices every times would be “slow”.) Shadow volumes are done by interpolating the plane equatations and then doing the normal stuff, tangent space is also blended between frames.
I also blend at about 40fps instead of full speed so that I can cache between frames if we go faster.
If you don’t move your head too much everything comes out of caches most of the time.
I got 45 fps with this (public version is 33) but now it’s 15 again since I added reflective-transparent water. (This will be off by default.)
Hmm movement interpolation, I suppose they are moved at the rate the server sends packets to the client. Wasn’t there movement interpolation in QuakeWorld? It should be possible to lift it out of that.

Charles

Ok, strangely I have never noticed that Q1 lacks movement interpolation, probably because Ive only played it over LAN.

The lack of movement interpolation shouldn’t be visible in SP because Q1’s server runs at the same rate as the client when playing SP, right?