qbismSuper8 builds
Re: qbismSuper8 builds
Tried spans code from engoo. Quite fast, and the concept of long horizontal runs w/o intensity recalc works with fog. One idea is to diff z with old z, and recalc if the delta is enough. Thereby edges keep sharp.
Regarding 32 levels/ slices of fog, that's all the palette can handle unless intermediate layers are dithered.
Rendering in slices, could be done with another Z-buffer that just tracks slice 0 to 31?
I'm finding pseudo-random dithering to be expensive, even with look-up tables, because it must be applied to each pixel (or very small grouping) to look good.
Regarding 32 levels/ slices of fog, that's all the palette can handle unless intermediate layers are dithered.
Rendering in slices, could be done with another Z-buffer that just tracks slice 0 to 31?
I'm finding pseudo-random dithering to be expensive, even with look-up tables, because it must be applied to each pixel (or very small grouping) to look good.
Re: qbismSuper8 builds
This is 256 'fake' fog levels obtained by dithering the 32 'real' levels in two axis: a two-steps-forward-and-one-step-back foglevel lookup table and a noise table to jitter the banding pattern. Computed every pixel but all lookup tables. Variable 'noise' is a byte so it just keeps looping over, cheap reproduceable pseudo-random with moire pattern side effect in smooth dark areas. The sequence must be the same every frame or the ants will be crawling.
I tried to speed this up by computing foglevel only at large differences in z. Therefore edges remain distinct. But the conditional statement and math canceled the gain.
The results are faster and prettier than where it started but still at least 20% FPS cost at high resolution. A lot of that is simply the price of looping through the buffers.
Code: Select all
void FogLevelInit(void)
{
int i, j;
for (i=0; i<32; i++)
{
j = (int)(i * (1.01-fog_density)*2.5);
foglevel[i*8 + 0] = bound(0, j-1 , 31) * 256;
foglevel[i*8 + 1] = bound(0, j-2 , 31) * 256;
foglevel[i*8 + 2] = bound(0, j-1 , 31) * 256;
foglevel[i*8 + 3] = bound(0, j , 31) * 256;
foglevel[i*8 + 4] = bound(0, j+1 , 31) * 256;
foglevel[i*8 + 5] = bound(0, j+2 , 31) * 256;
foglevel[i*8 + 6] = bound(0, j+1 , 31) * 256;
foglevel[i*8 + 7] = bound(0, j , 31) * 256;
}
for (i=0; i<256; i++)
{
j+=7;
fognoise[i]=((i*6+j)%9);
}
}
.
.
.
...in R_RenderView...
if (fog_density && r_fog.value)
{
if(previous_fog_density != fog_density)
FogLevelInit(); //dither includes density factor, so regenerate when it changes
previous_fog_density = fog_density;
fogindex = 32*256 + palmapnofb[(int)(fog_red*164)>>3][(int)(fog_green*164) >>3][(int)(fog_blue*164)>>3];
vidfog = vid.colormap+fogindex;
for (yref=r_refdef.vrect.y ; yref<(r_refdef.vrect.height+r_refdef.vrect.y); yref++)
{
pbuf = r_warpbuffer + d_scantable[yref];
pz = d_pzbuffer + (d_zwidth * yref);
for (xref=r_refdef.vrect.x; xref<(r_refdef.vrect.width+r_refdef.vrect.x); xref++)
{
level = *(pz++);
if (level && level<248)
*pbuf = fogmap[*pbuf + vidfog[foglevel[level + fognoise[noise++]]]*256];
pbuf++;
}
noise += 13;
}
Re: qbismSuper8 builds
Just moved this to FlipScreen, that maddening burner of clock cycles. Because FlipScreen already loops through every pixel, it is big savings for per-pixel fog to just ride that train. The FPS cost drops to <10%.
Re: qbismSuper8 builds
so i downloaded the latest build and i cant seem to see the entire controls menu o.O also for modders it would be cool to add a text file you can edit or something so that in the options menu you can change the name of the guns.
Re: qbismSuper8 builds
Already implemented. Makaqu's PAK10.PAK file even uses this.ceriux wrote:for modders it would be cool to add a text file you can edit or something so that in the options menu you can change the name of the guns.
Re: qbismSuper8 builds
Oops, it's something that should change due to the menu scaling. Not hard to do, will pick it up for next release. Also noticed- mouse focused is released in menu mode (intentionally BTW), which means "mouse1" and "mouse2" can't be set from the meus unless fullscreen. Also the crosshair selection menu is out of alignment.ceriux wrote:so i downloaded the latest build and i cant seem to see the entire controls menu o.O also for modders it would be cool to add a text file you can edit or something so that in the options menu you can change the name of the guns.
Re: qbismSuper8 builds
New release. Nearly finished with this project. Might even call it a 'beta'.
http://youtu.be/U5sTRO31UCA
[edit] Download the newer one below...
Latest changes-
Faster/ better fog.
Bigger/better/ faster underwater warp from Mankrip tutorial.
Easy installer (or still get the zip if preferred).
Multi-threaded waterwarp, fog, and video buffer processing. Possible speed increase depending on the CPU.
Bugfix: video capture now picks up palette color shifts like power-ups and underwater tint.
Various minor fixes – HUD, colored lights, menu, video modes.
http://youtu.be/U5sTRO31UCA
[edit] Download the newer one below...
Latest changes-
Faster/ better fog.
Bigger/better/ faster underwater warp from Mankrip tutorial.
Easy installer (or still get the zip if preferred).
Multi-threaded waterwarp, fog, and video buffer processing. Possible speed increase depending on the CPU.
Bugfix: video capture now picks up palette color shifts like power-ups and underwater tint.
Various minor fixes – HUD, colored lights, menu, video modes.
Last edited by qbism on Mon Jul 15, 2013 2:24 am, edited 2 times in total.
Re: qbismSuper8 builds
i have to say your engine is probably my favorite. although i wish it could do a few things fte and dp can do. qbism just makes quake look even more awesome!
Re: qbismSuper8 builds
Thanks for the feedback, especially since the forum is in a slow time... what would you add?
S8 supports a few extra DP extensions, but if it can play maps/mods geared to BJQ or FQ I'm happy. Beyond that I'd play DP or FTE with gl_nearest_mipmap_nearest
Another refinement: qbism Super8 v159 setup.exe
zip install and older versions: https://sourceforge.net/projects/qbism/files/
> Added ‘status bar scale’ to video setup menu.
> Added help text to cvars. Only a few are done so far. Type “chase_active” in the console for an example.
> Moved super8 files to /super8 mod directory to reduce clutter and reduce screwing-up of other engines that might inadvertently use pak88. The engine will sandwich super8 between id1 and any other mod in precidence. So if you're playing warpspasm, the stack is:
warpspasm
quoth
super8
id1
> Added colored lighting for original ID levels to pak88 for convenience, “THE MH UNOFFICIAL 2009 ID1 LIT FILE PACK”.
S8 supports a few extra DP extensions, but if it can play maps/mods geared to BJQ or FQ I'm happy. Beyond that I'd play DP or FTE with gl_nearest_mipmap_nearest
Another refinement: qbism Super8 v159 setup.exe
zip install and older versions: https://sourceforge.net/projects/qbism/files/
> Added ‘status bar scale’ to video setup menu.
> Added help text to cvars. Only a few are done so far. Type “chase_active” in the console for an example.
> Moved super8 files to /super8 mod directory to reduce clutter and reduce screwing-up of other engines that might inadvertently use pak88. The engine will sandwich super8 between id1 and any other mod in precidence. So if you're playing warpspasm, the stack is:
warpspasm
quoth
super8
id1
> Added colored lighting for original ID levels to pak88 for convenience, “THE MH UNOFFICIAL 2009 ID1 LIT FILE PACK”.
Re: qbismSuper8 builds
things only those engines have mainly just frik_file and csqc. i feel like they should be essential to all engines though. they allow for modders / game makers to do some real custom stuff with quake.
-
- Posts: 2126
- Joined: Sat Nov 25, 2006 1:49 pm
Re: qbismSuper8 builds
I'd also suggest the string manipulation builtins, although I suspect people consider those as part of FRIK_FILE anyway.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC (LordHavoc)
Re: qbismSuper8 builds
Super8 has the LH/QIP string commands inherited from Makaqu, and FRIK_FILE thanks to MH. csqc is not in the scope at this point. If anything, I'd lean toward moderate changes like more qc extensions and scripted menus/ effects.
Most super8 users play it as an alternative to glquake engines for existing mods and maps. One func_msg mapper mentioned using super8 as a preference but within the realm of FQ compatibility.
Most super8 users play it as an alternative to glquake engines for existing mods and maps. One func_msg mapper mentioned using super8 as a preference but within the realm of FQ compatibility.
-
- Posts: 268
- Joined: Tue Nov 24, 2009 2:20 am
- Contact:
Re: qbismSuper8 builds
Get off my lawn!Ken Thompson wrote:One of my most productive days was throwing away 1000 lines of code.
Re: qbismSuper8 builds
Looks good, dread. Maybe try getting a few brighter highlights in there - lighten the top range a little more. I'd also suggest adding some noise to the palette to get some 'grit' into solid color areas, especially solid black.