Quake2 ports with focus on the software renderer?

Discuss programming topics for the various GPL'd game engine sources.
Post Reply
JasonX
Posts: 422
Joined: Tue Apr 21, 2009 2:08 pm

Quake2 ports with focus on the software renderer?

Post by JasonX »

Aside from qfusion, do you guys know any other Q2 ports focused on the Software Renderer?
leileilol
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: Quake2 ports with focus on the software renderer?

Post by leileilol »

Nope.

I was going to enhance ref_soft as a contribution to r1q2 but there wasn't any interest. All I did was get software colored lighting working.

Image

Unfortunately due to how Q2BSPs are made and how the gamecode works, there isn't that much room for porting Engoo features over to Q2. No special bobbing, no autosaving, no enhanced model lighting because light entities are left behind in compiling...


Also this colored lighting attempt isn't identical to Engoo - I had to do some shifting and gammaing to get it 'on level' with a 3dfxgl player since they had high gammas, that and quake2 doesn't have a lot of dark shades in its palette.
i should not be here
qbism
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am
Contact:

Re: Quake2 ports with focus on the software renderer?

Post by qbism »

FTE rendered Q2 in software way back. IIRC last version was in 2008.

Fake software rendering, simulated with Berserker Q2 set to gl_nearest and low resolution. So this is actually hardware rendered just to be clear.
Image
Last edited by qbism on Sun Jun 22, 2014 11:01 pm, edited 1 time in total.
qbism
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am
Contact:

Re: Quake2 ports with focus on the software renderer?

Post by qbism »

AROS Q2 has a few ref_soft improvements bszili.morphos.me including waterwarp aspect correction and dithered texture smoothing. Although not implemented, the code implies there's a stereo3D ref_soft somewhere on the internet, and that a version of Q2max has ref_soft enhancements like (one of my favs) stainmap. Although stainmap and perhaps some others can also be seen in FTEQW software engine.
qbism
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am
Contact:

Re: Quake2 ports with focus on the software renderer?

Post by qbism »

Engine work in-progress, showing SMD mod.
Image

Image
[edit: fix image links}
Last edited by qbism on Sun Jun 22, 2014 11:04 pm, edited 1 time in total.
leileilol
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: Quake2 ports with focus on the software renderer?

Post by leileilol »

Unfortunately Q2's palette really fringes with overbright colored lighting. Try shifting the lightmap down to the "QUAKE2 TOO DARK!!!" levels.


Also, you might get an inspiration from SIN's software renderer. That had map-only colored lighting, but it also utilized per-level palettes with per-level color lookup tables for it. All the textures (including 2D) get converted to the level's palette on the fly (leading to some infamously long loading times)
i should not be here
jitspoe
Posts: 217
Joined: Mon Jan 17, 2005 5:27 am

Re: Quake2 ports with focus on the software renderer?

Post by jitspoe »

leileilol wrote:(leading to some infamously long loading times)
http://penny-arcade.com/comic/1998/11/18
qbism
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am
Contact:

Re: Quake2 ports with focus on the software renderer?

Post by qbism »

The fact that gamma was turned way up for the screenshot doesn't improve the appearance. But colors in dim areas always fall back to the same few dark greens and dark reds. It may be a benefit to increase minimum ambient light and/or reduce saturation of colored light at load time (perhaps with a cvar). Or increase sensitivity to color differences when building the table, cubed distortion rather than squared.
Per-map palette loading makes sense but probably, yeah, would avoid remapping every texture.
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: Quake2 ports with focus on the software renderer?

Post by Spike »

regarding gamma, would it not be possible to factor the gamma values into your blends? might seem less extreme that way.
qbism
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am
Contact:

Re: Quake2 ports with focus on the software renderer?

Post by qbism »

Spike wrote:regarding gamma, would it not be possible to factor the gamma values into your blends? might seem less extreme that way.
That is correct, and the key is distortion in the bestcolor function. Distortion is the RGB color distance taken to some power. Squared is OK, cubed is black-and-white. The pow function can take it in-between but very slow, maybe that's what Ritual did. :lol:
Wound up using

Code: Select all

distortion = dr*dr + dg*dg + db*db + dr * 5 + dg * 5 + db * 5;  //added + dr * 5 + dg * 5 + db * 5 to increase color sensitity at low brightness.
dr, db, dg is the RGB color distance vector.

Result below at gamma 1.0. Compare to previous screenshot above with much higher gamma. This shot also uses r_coloredlight = 2, a different shading mode from Leilei code, but I haven't looked at what it does yet.
Image
Last edited by qbism on Sun Jun 22, 2014 11:06 pm, edited 1 time in total.
qbism
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am
Contact:

Re: Quake2 ports with focus on the software renderer?

Post by qbism »

...here's a ref_gl (hardware opengl) render for comparison. Texturemode = gl_nearest. This screenshot was brightened to get closer to the (non-adjusted) ref_soft screenshot above.
Image
Post Reply