Thursday, September 22, 2011

Updates for 22nd September 2011

I've been tweaking the lightmaps a little more (nothing is ever truly "concluded"), and some changes are coming through.

The ability to switch off overbrights came back. Nothing really happened to make me back off on my prior hardline stance, I just decided to put it back on a whim. While being a purist in terms of your goals can be a good thing, it's also nice to give people options.

I did in fact think of one case where having the ability to switch off overbrights can be reasonably justified (on grounds other than the mapper screwing up and not testing their map in software Quake or a modern engine) and that's where the player might want higher precision at the lower end of the scale, but the better texture formats aren't available on their hardware.

To most of use, losing that bit of precision in standard R8G8B8 texture formats is no big deal - we can't even see it. But different things drive different people nuts, and I'm willing to bet that there are people out there for whom this is important. It's all about being nice to the player.

I've switched the default format to the 10-bit per channel format I mentioned previously. Some further testing indicates that 64-bit lightmaps drop performance slightly below my comfort level. 64-bit support is still there, but is now the second choice if the 10-bit per channel format isn't available.

I've added two new lightmap formats - 16-bit greyscale and 8-bit greyscale. These are final fallbacks if no 32-bit or 64-bit format can be found. It's not necessary to use them if you're one of those people who wants coloured light disabled (r_coloredlight 0 will greyscale RGB lightmaps automatically for you, no map-reload needed, very fast) but they're there and they might run a little faster if absolute speed is your aim.

I'm going to let the player choose which lightmap format to use. This will be selectable through the video options menu (or the r_lightmapformat cvar) and won't require a restart or map reload. Only lightmap formats which are supported by your hardware (detected at startup) will be available. Or you could set it to "unknown" and let DirectQ choose for you.

I've also been doing some work on sky (details to follow) which I haven't quite cracked yet, and tightening up a handful of other things.

Other news.

I've bought a lightweight ultra-portable laptop (not quite a netbook but not too far off) for use when travelling. The cool thing about this is that it's got ATI graphics, so now I'm finally in a position to be able to cross-check OpenGL stuff on ATI myself rather than handing it over to the ATI folks on the RMQ team and hoping for the best (and occasionally having to get involved in long-distance troubleshooting - yuck).

After uninstalling all the shovelware than came with it (is it just me or is this getting worse?) I couldn't resist giving DirectQ a quick spin. After all, this was a fresh-out-of-the-box, totally clean machine, no extra software to rely on, and a great test of how well I've set DirectQ up for this kind of thing.

A quick fresh install of Quake (no configs) and DirectX upgrade (I'll still require that) and away I went!

It came up perfect at 1366x768, widescreen-aspect corrected and all. Shader Model 3, all texture formats, hardware instancing, all available to be maxed out. Everything looked good, nice and crisp and high quality, no glaring bugs or glitches, beautiful image quality, everything worked the way it should.

The ATI Mobility Radeon thing obviously can't compete with the NVIDIA in my primary system, but it was more than adequate for good gameplay. timedemo demo1 got just under 300 FPS and framerates peaked around the 600 mark.

(I've commented before about how highly I rate the Intel 945, and it's interesting to note that performance of the 945 was very competitive with the ATI - maybe only 10% to 20% slower, and despite it being a much much older software T&L chip. Polycount and fillrate seem to be bottlenecks on the ATI and I suspect that in maps like Marcher the 945 would even beat it.)

The DirectX update was all that was needed. A happy result.

So I'm going to install a full development system on it. The cramped keyboard makes any serious work or play an experience that's something less than fun, but then again it's not meant to be used for that kind of thing. It will be nice to have an option like this for when I'm away from home and need my fix though.

9 comments:

Anonymous said...

MH,
Archive.org only has the 2008 Blog.
I just wanted to solve my no music problem myself and not have to ask, if it was something stupid that I did.

In 2010 you wrote in this quakeone thread:

http://quakeone.com/forums/quake-help/general-help/5188-play-music-without-cd.html , that music for DirectQ goes in quake\id1\Music\track02 etc, but the Darkplaces page shows it where I started with: MH,
Archive.org only has 2008. In 2010 you wrote in this quakeone thread:

http://quakeone.com/forums/quake-help/general-help/5188-play-music-without-cd.html , that music for DirectQ goes in quake\id1\usic\track02.ogg, etc but the Darkplaces page shows it where I started with: quake\id1\sound\cdtracks\track02.ogg.

Darkplaces played the oggs in either locationn and also in: quake\id1\music\cdtracks\track02 Darkplaces plays the music fine in any of those locations. I also tried deleting the config and I also checked the all of the Windows sound settings and the Creative sound card settings so I am stumped. I'm amost certain that back in April and May when I played most of the great,classic.Single player maps, that music worked in DirectQ. My Quake CD is cracked but I have an ISO of it that I could have mounted as a virtual drive and hidden my main CD drive with Pr0t.St0p, but I don't think I had to jump through those hoops. Am I nuts? Is is there something obvious that I am missing? My tracks are named: track02.ogg-track11.ogg

Thanks once again,
Marty

Ron Jones said...

For what it's worth, I've only had success with playing WAV music in DirectQ. MP3, MP4 and presumably all other formats DirectShow has a filter have not worked for me, but WAV has worked just fine.

So, try WAV instead.

mhquake said...

I use MP3s and they play fine. The general rule is: if you can play it in Windows Media Player then DirectQ should also be able to play it (if it can't then it's a DirectShow bug, not DirectQ - all DirectQ does is take a file name and hand it over to DirectShow for playing).

So if you're using oggs you'll need a WMP-compatible codec first. Unless you have that oggs won't work.

Using libvorbis or whatever goes against one of the major goals of DirectQ, which is that you should be able to run it without needing any external libraries on your PC. Too many other engines use different versions of external libraries which conflict with each other. DirectQ likes to play nice and live peacefully.

You can put the files in either of "music" or "sound/cdtracks"; so far as I'm aware DarkPlaces doesn't support "music/cdtracks".

The files can be called anything you want, DirectQ doesn't enforce a naming convention. Just having them in the right order is all that's needed.

DirectQ can also stream music from the internet; create a text file with the URL of a music file in it, put it in the right place, and it will work.

DirectQ currently can't play music files contained in PAK or PK3 files.

I think that's the sum of all knowledge required regarding music files.

Anonymous said...

Thanks,
Ron and MH that was enough information to solve the problem.
Actually oggs do open for me in Windows Media Player and that may be because I have libvorbis and other codecs like ffdshow for video decoding and encoding, etc. I had oggs associted with foobar 2000 a great free audio player. when I changed the file association back to Windows Media player, the music worked fine, just like in the past, so I wasn't going nuts! Also, for the record I tested Darkplace with \sound\cdtracks\, \music\cdtracks\, \music\ and .pk3's and it worked in all cases even though lord Havoc's outdated documentation shows it only as in \sound\cdtracks\ And don't get me wrong, i understand why it is outdated because he is very good at doing the important thing, as you, to continually updating and striving to improve his Quake client. It would be of academic interest to see if Windows Media Player would play oggs without libvorbis; I susect,not.Also I hate changing that file association back to WMP, because I use, Windows Media Player /classic Home Cinema, VlC Player, Foobar 2000 and iTunes for media playback because I hate WMP and in my eye why is is so hard to incorporate a simple "open" in the menu. I use it so little, that every time I use it, it takes me time to find it in the menu. Right click, and open with, works faster, but I often forget with It.
However, getting the music to work in DirectQ to work was the goal again so that was achieved. I look forward to your next release. I love Darkplaces, but to be honest, my ancient hardware won't run it at anywhere near the framerates that DirectQ runs. Thanks for still supporting us users' who are still on older, single core processors. And I won't ask, to get the answer: "when ever it is done!"
Marty

Anonymous said...

MH, Update on sound issue:
weird, I am now able to change the ogg file association back to Foobar 2000, or Media Player Classic Home Cinema, and DirectQ still plays the music since the music was opened in Window Media Player. I haven't yet tested to see if that is persistent through a reboot. Like I may have stated, I haven't opened WMP in months in favor of better, open source solutions.
If you have any Idea why this is, it would be of academic interest as to why.
Regards,
Marty

mhquake said...

I'd guess the codec needs to be registered with WMP first, and that WMP doesn't bother with doing this until you try to open a file with it. It's only a guess though.

Very interesting turn of events all the same.

I have code somewhere that uses the native WMP interfaces (rather than DS) for playing music files, but I junked it as an idea a while back as it was slightly flaky. Slow, too.

I didn't know that DP also supports music/cdtracks; guess I'd better add support for that too.

Anonymous said...

MH,
Would having multiple installs of Quake on my second internal, two,partition drive, and several on an external USB drive have any effect on this? I do know,(I found out the hard way}, that Darkplaces stores it config files under \my documents\games\darkplaces\id1\etc., but it is effected and interacts in wierd ways if you also have an existing config in the various Quake folders. It's been to long to remember, exactly.
I think this is partially determined by %USERPROFILE% in the environmental variables of the system: I am on XP Pro, for example.
I hope this may be of some use.

Thanks, so much,

Marty Fender
Yea, like the guitar!

mhquake said...

Highly doubtful. I've 4 or 5 installs on my own main machine and DirectQ doesn't store anything outside of the Quake folder.

mhquake said...

"Thanks for still supporting us users' who are still on older, single core processors."

I need to correct this because it's not the case. If everyone was on multi-core tomorrow I'd be first out on the street celebrating.

Direct 3D itself will use multiple cores if available (it uses 4 on my i7) and I'm always on the lookout for ways to exploit the potential of multi-core.

DirectQ isn't about running on older PCs. It's about moderning the renderer to take proper advantage of newer PCs, and running well on machines that have bad OpenGL support but good D3D support.