VOGONS


First post, by BetaC

User metadata
Rank Oldbie
Rank
Oldbie

So, I am in the hunt for a graphics card to go in my general purpose XP build, and am wondering if anyone knows what cards actually make the Volumetric Shadows in Jedi Knight, and Academy by extension, actually render correctly. Searching for this elsewhere leads me on a goose chase with people mostly complaining about the problem on newer hardware.

ph4ne7-99.png
g32zpm-99.png
0zuv7q-6.png
7y1bp7-6.png

Reply 1 of 18, by leileilol

User metadata
Rank l33t++
Rank
l33t++

r_stencilBits 32
cg_shadows 2

The stencilbits part is important. This applies to many (but not all) idTech 3 games.

The shadow code was originally for Quake3 which was coded mainly on Riva TNTs. Anything supporting a high enough stencil buffer should work.

Its artifacts (which there will be!) are not video card specific - it's due to how the shadow's calculated from the local model's position on the map's lightgrid. Unlike Doom3, there's no real light positions to work with. The shadows don't really have any fading falloff either. In addition to that, some idTech 3 games have a hardcoded surface vertices limit per surface and will skip drawing a shadow if the model is too complex.

apsosig.png
long live PCem

Reply 2 of 18, by BetaC

User metadata
Rank Oldbie
Rank
Oldbie

I can safely assume that the range of cards that I am looking at (Either the 6xxx or 7xxx range from Nvidia, since they natively work with Republic commando's Bumpmapping without mods) should work with it. thanks for the help.

ph4ne7-99.png
g32zpm-99.png
0zuv7q-6.png
7y1bp7-6.png

Reply 3 of 18, by Fusion

User metadata
Rank Member
Rank
Member
leileilol wrote:
r_stencilBits 32 cg_shadows 2 […]
Show full quote

r_stencilBits 32
cg_shadows 2

The stencilbits part is important. This applies to many (but not all) idTech 3 games.

The shadow code was originally for Quake3 which was coded mainly on Riva TNTs. Anything supporting a high enough stencil buffer should work.

Its artifacts (which there will be!) are not video card specific - it's due to how the shadow's calculated from the local model's position on the map's lightgrid. Unlike Doom3, there's no real light positions to work with. The shadows don't really have any fading falloff either. In addition to that, some idTech 3 games have a hardcoded surface vertices limit per surface and will skip drawing a shadow if the model is too complex.

I thought 8 was the max setting for stencilbits.

Pentium III @ 1.28Ghz - Intel SE440xBX-2 - 384MB PC100 - ATi Radeon DDR 64MB @ 200/186 - SB Live! 5.1 - Windows ME

Reply 4 of 18, by leileilol

User metadata
Rank l33t++
Rank
l33t++

IIRC it was for the sake of buggy drivers. r_depthBits 24 and r_stencilBits 8 would be the ideal cvars and I was tired when I wrote that so it could be a misremembering. I do recall some overlapping artifacts on a certain older card with it set to 8 though.... it's been a very long time since i've tried the hacky stencil shadows

Also it should be noted that JK2MP does not allow cg_shadows 2 cue to potential cheating potential from the casting. cg_shadows 3 (a solid black shadow on the floor planes only) is still allowed however. You can force cg_shadows 2 to work by setting developer to 1.

apsosig.png
long live PCem

Reply 6 of 18, by leileilol

User metadata
Rank l33t++
Rank
l33t++

you say that like it's a fake effect 🙄

shadows.png
Filename
shadows.png
File size
241.74 KiB
Views
3411 views
File license
Fair use/fair dealing exception

and here's illustration of what happens when you've got too many verts and it skips. Note the lack of shadow for the body and the drillbit

shadows2.jpg
Filename
shadows2.jpg
File size
42.27 KiB
Views
3411 views
File license
Fair use/fair dealing exception

cg_shadows 3 (seen in q3's intro video) only does flat floors, so slopes don't get shadowed

shadows3.jpg
Filename
shadows3.jpg
File size
31.78 KiB
Views
3411 views
File license
Fair use/fair dealing exception

apsosig.png
long live PCem

Reply 8 of 18, by infiniteclouds

User metadata
Rank Oldbie
Rank
Oldbie

http://www.rage3d.com/board/showthread.php?t=33612377

its not the v-card guys... i have a ti4600 same thing. i just use r_shadows 2. I think the problem is actually (ironically enough) only with the cards that support higher end shadowing effects. i dont hear these things from TNT 2 of gf1/2 owners. hmm.

Sounds like a Geforce 2 might be the fastest NVidia card that can properly display them.

Reply 9 of 18, by leileilol

User metadata
Rank l33t++
Rank
l33t++

Probably due to the r_primitives part. Overload the extensions list (which nVidia and ATI very much did then) and it won't find compiled vertex arrays and it'll be slower by default unless you set r_primitives 2. It makes me wonder how much benchmarking misinformation that detection mistake caused........

apsosig.png
long live PCem

Reply 10 of 18, by infiniteclouds

User metadata
Rank Oldbie
Rank
Oldbie

I have no idea what that means -- but when I read "by default" and "set <setting> it leads me to believe that we have have these shadows working correctly on later cards if some tweaks are made?

Reply 11 of 18, by DracoNihil

User metadata
Rank Oldbie
Rank
Oldbie

"Riva TNT"

Again I hear that card and realtime shadow usage in the same subject...

Unreal had a experimental TNT specific renderer patch to enable similar shadows, and they look really hackjob and ugly. Seeing this in the Q3 engine doesn't give me any high hopes of this being a worthwhile option to pursue given the limitations. I'll keep these CVAR's in mind if I ever get Q3A and Jedi Academy reinstalled someday.

32-bit stencil buffers still relevant these days by the way?

“I am the dragon without a name…”
― Κυνικός Δράκων

Reply 13 of 18, by Fusion

User metadata
Rank Member
Rank
Member

It looks ok in motion, but it does hit the framerate pretty hard. You will always see odd artifacts with that setting.

Pentium III @ 1.28Ghz - Intel SE440xBX-2 - 384MB PC100 - ATi Radeon DDR 64MB @ 200/186 - SB Live! 5.1 - Windows ME

Reply 14 of 18, by BetaC

User metadata
Rank Oldbie
Rank
Oldbie

Sorry to semi-necro this thread, but I am back from vacation, and have everything back in running shape. I actually have examples of what I was mentioning by the shadows looking "wrong"

This first image is most definitely an error.
untitled.PNG

While this one just shows off how they look when things aren't going that wrong.
jk2sp_2018-06-05_20-50-30-03.png

ph4ne7-99.png
g32zpm-99.png
0zuv7q-6.png
7y1bp7-6.png

Reply 15 of 18, by Scali

User metadata
Rank l33t
Rank
l33t
leileilol wrote:

Probably due to the r_primitives part. Overload the extensions list (which nVidia and ATI very much did then) and it won't find compiled vertex arrays and it'll be slower by default unless you set r_primitives 2. It makes me wonder how much benchmarking misinformation that detection mistake caused........

That's interesting actually...
Did anyone ever tried to make a 'filter' for the extensions list to circumvent this issue on newer hardware?
As in: you put a shim between the application and the OpenGL driver, and the shim filters the actual extension list down to a subset relevant to the application, so that it will not be overloaded?

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 16 of 18, by Fusion

User metadata
Rank Member
Rank
Member

That is the best you'll get BetaC. IMO, Q3 and Elite Force are the only games that you can use cg_shadows 2 and not have it look too glitchy. You'll still notice the errors sometimes but being such fast paced games it makes it easier to ignore.

Pentium III @ 1.28Ghz - Intel SE440xBX-2 - 384MB PC100 - ATi Radeon DDR 64MB @ 200/186 - SB Live! 5.1 - Windows ME

Reply 17 of 18, by infiniteclouds

User metadata
Rank Oldbie
Rank
Oldbie

By the way, I had this game when it came out... I think I was running a Geforce 3 at the time and this shadow mode was borked Day 1. I'd like to know what these shadows look like (same sceens posted) when they are not glitched... because I've never seen that.

Reply 18 of 18, by leileilol

User metadata
Rank l33t++
Rank
l33t++

You'll never see them unglitched because this is a really really really old attempt at impractical stencil shadows left in the engine since 1999. It's shadows casting from approximated light positions from models' local space on the map's precompiled lightgrid. It will never look perfect. I don't know how many times this bears repeating...

apsosig.png
long live PCem