qbismSuper8 builds

Discuss programming topics for the various GPL'd game engine sources.
mankrip
Posts: 924
Joined: Fri Jul 04, 2008 3:02 am

Re: qbismSuper8 builds

Post by mankrip »

The fog looks awesome in those shots. Very grainy, but also really smooth.
Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
Dev blog / Twitter / YouTube
qbism
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am
Contact:

Re: qbismSuper8 builds

Post by qbism »

At one time I considered dropping this post-process dithered fog for Engoo fog, which is faster and more accurate to the GL density. I was too lazy to do that but recently found a new optimization in the loop. Basically part of the lookup (fogcolmap) is precomputed outside the loop.

Code: Select all

    if (fog_density && r_fog.value) //qb: fog
    {
        if(previous_fog_density != fog_density)
            FogDitherInit(); //dither includes density factor, so regenerate when it changes
        previous_fog_density = fog_density;
        //qb:  fogindex calc includes some color correction- brightness, saturation
        normalize = 240.0/(0.05+fog_red+fog_green+fog_blue);
        fogindex = 32*256 + palmapnofb[(int)(min(fog_red*normalize, 255))/4][(int)(min(fog_green*normalize,255))/4][(int)(min(fog_blue*normalize,255))/4];
        for (i=0; i<31; i++)
            fogcolmap[i] = (int)vid.colormap[fogindex+i*256]*256;

        dither = 0;
        for (yref=r_refdef.vrect.y ; yref<(r_refdef.vrect.height+r_refdef.vrect.y); yref++)
        {
            pbuf = vid.buffer + 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 = (unsigned int)(*(pz++)/4 + *(ditherfog + (dither++ % DITHER_NUMRANDS)));
                if (level < 31)
                    *pbuf = *(fogmap + *pbuf + *(fogcolmap+level));
                pbuf++;
            }
        }
    }
mankrip
Posts: 924
Joined: Fri Jul 04, 2008 3:02 am

Re: qbismSuper8 builds

Post by mankrip »

An optimization I have in mind is that fog doesn't need to be high res.

For a full 4:3 screen, a fog resolution of 160*120 may be enough. This would massively reduce the number of calculations of the pz and level variables at high resolutions. There would be a few innacuracies here and there, but it shouldn't be much of a problem since Quake's architecture isn't too detailed.
Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
Dev blog / Twitter / YouTube
qbism
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am
Contact:

Re: qbismSuper8 builds

Post by qbism »

A challenge for low-res fog is jaggedness at geometry edges between near and far objects, abrupt differences in depth buffer.
qbism
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am
Contact:

Re: qbismSuper8 builds

Post by qbism »

Added bsp2 and 2bsp support. These formats are written very cleanly in quakespasm, which made this possible after I failed at several bsp2 attempts in the past. Also added bmodel transparency and fence textures based on Makaqu and discussions here. Details and download:http://super8.qbism.com/2015/02/build-2 ... nsparency/
mankrip
Posts: 924
Joined: Fri Jul 04, 2008 3:02 am

Re: qbismSuper8 builds

Post by mankrip »

:D Nice. I'll try it.
Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
Dev blog / Twitter / YouTube
dreadlorde
Posts: 268
Joined: Tue Nov 24, 2009 2:20 am
Contact:

Re: qbismSuper8 builds

Post by dreadlorde »

I don't remember if I asked this before, but what do I need to compile this on a win7 machine? Code::Blocks, anything else?
Ken Thompson wrote:One of my most productive days was throwing away 1000 lines of code.
Get off my lawn!
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: qbismSuper8 builds

Post by revelator »

codeblocks + mingw64 or open watcom if qbism still uses it ?.

newer version of the open watcom compiler was uploaded to my site yesterday :).

codeblocks needs some initial setup because it supports a lot of different compilers, if you havent used it before its pretty easy though as it will ask which compiler you want to use.
in case you dont have mingw64 in the codeblocks directory you need to have it in C:\MinGW for it to be picked up automatically.
You can also use codeblocks with open watcom but it can be a bitch to setup correctly because its very very strict.
Productivity is a state of mind.
qbism
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am
Contact:

Re: qbismSuper8 builds

Post by qbism »

Recently I've only used CB:Advanced. That package includes all needed libs, IIRC.

History- Some range of commits in the past included an Open Watcom project, and even further back there's DOS. A thread on Vogons provides updated DOS code by a different dev. Certain versions of mingw had issues with XP and Pentium in the past and I used TDM-GCC for a while, but switched back to the included CBA compiler for latest builds.
toneddu2000
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: qbismSuper8 builds

Post by toneddu2000 »

what a wonderful mood with the paletted system. Great work qbism!
Meadow Fun!! - my first commercial game, made with FTEQW game engine
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: qbismSuper8 builds

Post by revelator »

Just posting to report a nasty little bug i discovered in the 2.25 binutils ld, it can cause the compilation to fail on large libs because of library symbol corruption.
I just applied a patch that should take care of that, hopefully it works after.
Ill upload the new binutils build as a standalone for those who dont want to download the whole thing again.
Productivity is a state of mind.
qbism
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am
Contact:

Re: qbismSuper8 builds

Post by qbism »

Howdy, still kicking with a minor update (or two or three since I last posted here). The latest source and builds were moved to https://github.com/qbism/super8

I usually play through the latest MapJam to find ways to improve large map compatibility. So far I haven't taken the time to get through jam6, but here's a fisheye shot courtesy of EricW/ Tronyn map:
Image
mankrip
Posts: 924
Joined: Fri Jul 04, 2008 3:02 am

Re: qbismSuper8 builds

Post by mankrip »

I'm going to use your source to try to finish big map compatibility, as the sources in Baker's tutorials weren't compatible enough.
Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
Dev blog / Twitter / YouTube
qbism
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am
Contact:

Re: qbismSuper8 builds

Post by qbism »

It should be fairly clean to use. I tried to comment everything, although it's not as good as Mark V commenting! The trickiest part was the network protocol and tracking down modified data types. bsp2 came recently via Quakespasm. I was amazed that it actually worked. Just don't ask about framerate or dropped polygons for the huge, unvised map above. I don't know if a vised version has been released by now.
ericw
Posts: 92
Joined: Sat Jan 18, 2014 2:11 am

Re: qbismSuper8 builds

Post by ericw »

Haha, nice, that screenshot is wild :)
Unfortunately, my attempt at vising the map failed, I gave it almost a month but no luck.

However, there's going to be a revamped version of the map hopefully later this fall, that will certainly be vised, and have better lighting and balance etc.
Post Reply