Pages: [1]
  Print  
Author Topic: Stencil shadows  (Read 13920 times)
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« on: June 17, 2010, 10:51:00 AM »

Hello everybody. Some weeks ago (I don't remeber in which thread) we talked about stencil shadows, and someone (maybe fromhell?) told me that they were disabled in OpenArena cause of its models have more polygons than the original Q3 ones, but that maybe they could be enabled again, since they aren't really heavy for the hardware.

Well, I'd like to go deeper inside the situation and then, I hope, to have you guys re-enable them for the next release.

Recap: if you read DO NOT LINK[/b]) h t t p s : / / openarena . wikia . com/wiki/FAQ#The_game_isn.27t_as_pretty_as_the_screenshots_:.28]here, it is told that one can enable them with \cg_shadows 2 and \r_stencilbits 8.
If you launch OpenArena 0.8.5, enter a match and set cg_shadows different from 0 (no shadow under characters) or 1 (simple circular shadows under characters), that value will be reverted to 1.

I tried with some old Q3A mod under OpenArena, like DO NOT LINK[/b]) h t t p s : / / openarena . wikia . com/wiki/ModCompat/Alternate_Fire]AlternateFire, and there is a way to see stencil shadows there, using cg_shadows 3, it seems independently from what I set for r_stencilbits. You can see that in the screenshot. I read here (but I don't know how much that page, about Q3A console, is accurate) that "2 = stencil buffered 3 = simple stencil buffered (if r_stencilebits is not=0)". I don't know what to think exactly.

So, there are some questions:
- What is \r_stencilbits, exactly? What's the best value?
- What's the difference between cg_shadows 2 and 3?
- Is is possible to re-enable stencil shadows in OpenArena?

I know that they are not perfect, but they don't seem to slow down so much; they could be nice when adding screenshot on the site; if one experiences many slowdowns in his old computer, he can disable them like he would do with bloom or asinotrphic filter; if we want to mantain a polygon limit, we could simply make it higher.

UPDATE: I tried cg_shadows directly in Q3A 1.32c... cg_shadows 3 works, cg_shadows 2 does not work for me (no shadow is shown, but, unlike OA, it does not revert to 1).

UPDATE 2: Strange... once cg_shadows 3 has worked under OA (enabled shadows, altough they were drawn for some characters and not for others -I suppose cause of the famous polygon limit). I exited from OA, tried again... and it does not work anymore... now is shifts automatically to 1. I can't figure why...
UPDATE 3: About what I told in "update 2"... it seems that if I load a map from "Single player" menu, cg_shadows 3 works... if I load a map from \map command, cg_shadows 3 is inhibited... Somebody can tell me why?
« Last Edit: June 17, 2010, 04:25:43 PM by Gig » Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
schlorri
i lurk the board index every minute!!!!
Lesser Nub


Cakes -51
Posts: 149


WWW
« Reply #1 on: June 24, 2010, 06:27:27 AM »

Hello,

this is because g_fairflags

Code:
#define FF_LOCK_CVARS_BASIC             1
...
    if(cgs.fairflags & FF_LOCK_CVARS_BASIC) {
        //Lock basic cvars.
        ...
        trap_Cvar_VariableStringBuffer("cg_shadows",rendererinfos,sizeof(rendererinfos) );
        if (atoi( rendererinfos )!=0 && atoi( rendererinfos )!=1 ) {
            trap_Cvar_Set("cg_shadows","1");
        }
    }

Just remove 1 from fairflagsbitmask and you can see the shadows again. But the shadows look bad and you can use them as a cheat, thats why its locked in oa now.
Logged

-Join #aftershock in quakenet
-Visit the statspage http://oaunofficial.exulo.de/index.php
-Visit us on sourceforge http://sourceforge.net/projects/as-fps/
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #2 on: June 24, 2010, 07:29:50 AM »

They are not completely locked, because \cg_shadows 3 sometimes works (if you start a match from menu instead of from console, or something similar, I'm not sure when).
And why cheating? Because you may see a shadow from behind a corner? If everyone had them enabled, everyone had the same behavior...
Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
schlorri
i lurk the board index every minute!!!!
Lesser Nub


Cakes -51
Posts: 149


WWW
« Reply #3 on: June 24, 2010, 09:47:47 AM »

Fairflags is disabled on localhost, thats why its working on singleplayer.
You can see the volumetric shadows through walls sometimes, like a little wallhack  Smiley

Code:
if(cgs.gametype == GT_SINGLE_PLAYER) {
        trap_Cvar_VariableStringBuffer("r_vertexlight",rendererinfos,sizeof(rendererinfos) );
        if(cg_autovertex.integer && atoi( rendererinfos ) == 0 ) {
            trap_Cvar_Set("r_vertexlight","1");
            vid_restart_required = qtrue;
        }
        return; //Don't do anything in single player
    }

Edit: btw, do you play with 85 fps?


Logged

-Join #aftershock in quakenet
-Visit the statspage http://oaunofficial.exulo.de/index.php
-Visit us on sourceforge http://sourceforge.net/projects/as-fps/
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #4 on: June 24, 2010, 10:24:16 AM »

Fairflags is disabled on localhost, thats why its working on singleplayer.

Edit: btw, do you play with 85 fps?

Remember you are talking with someone who doesn't know what "fairflags" are.

Anyway... 85fps is around the default (DO NOT LINK[/b]) h t t p s : / / openarena . wikia . com/wiki/Manual/Graphic_options#Framerate]more or less), isn't it? Is it too low? Too high?
And it was not the PC where I usually play... I usually play with a 2001 PC, and having 85 fps as standard is only a dream... (oa is a bit slower than q3a)

PS: Can you tell me the difference of cg_shadows "2" and "3", and why one does not work even in singleplayer and the other does?
Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #5 on: July 06, 2010, 04:28:07 PM »

Let's recap:

I did some other try with Quake 3 Arena v1.32c:
- cg_shadows 0 - Shadows disabled
- cg_shadows 1 - Simple semi-transparent "disc" shadow under yourself and under the other players; no shadow under powerups
- cg_shadows 2 - Semi-transparent grey "stencil" shadow under the other players and under the powerups; for some reason no shadow under yourself, unless you enable cg_thirdperson. It needs r_stencilbits <> 0.
- cg_shadows 3 - Non-transparent black "stencil" shadow under yourself and under the other players; no shadow under powerups

It works the same way when working offline and when playing online.

In OpenArena, both 2 and 3 values are disabled (both in skirmish and multiplayer, exept for g_gametype 2), reverting back to 1, by 0.8.5 servers, and enabled with 0.8.1 servers... (and when working, they look like in Q3A; I noticed some strange behavior with some objects shadows with 2, but with 3 the situation seems better, probably because powerups simply don't have shadows in this way)... And if stencil shadows are enabled, if a character model has more than "X" polygons, its shadow is not shown (you can see only the shadow of its weapon), right?

I propose to make that "X" polygon limit higher, and, if you guys really don't want to re-enable them in multiplayer modes, at least re-enable them in skirmish modes.

Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #6 on: July 09, 2010, 06:28:58 AM »

I found some previous posts with Fromhell:
I wrote here that the function did not work (I talked about value 2, since I dind't remember there were also option 3). I did not know that since 0.8.5 it works only in "singleplayer" (g_gametype 2) mode... and it seems that even Fromhell did not remember about this: he did not mention this, but told Me about using r_stencilbits 24 or 32 should be better than 8 (anyway, I still don't understand exactly what is r_stenciblits and I don't see great difference) and about the polygon limit that "skips" to render a shadow... and he did not anSwered to my last questions....

Then I created this thread.
« Last Edit: September 23, 2010, 03:19:20 PM by Gig » Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
Pages: [1]
  Print  
 
Jump to: