|
Posted by Baker on 2012/06/29 11:38:17 |
I wasn't planning on doing this mini-project, it started as an effort to address some Fitzquake issues, fix them the right way up to Fitzquake standards (i.e. do it right, once and properly versus continual releases) and donate it back.
FitzQuake Mark V Download:
http://quake-1.com/docs/utils/fitzquake_mark_v.zip
Short version: Eliminated most issues in FitzQuake thread, most issues I can even remember hearing of ever and marked every single one clearly with a very minimal implementation.
It may be the case that only metlslime and Quakespasm and engine coders may find this engine upgrade of interest.
Features: 5 button mouse support, single pass video mode, external mdl textures, alpha textures (like RMQ), record demo at any time, rotation support, video capture (bind "capturevideo toggle"), console to clipboard, screenshot to clipboard, entities to clipboard, tool_texturepointer, tool_inspector (change weapons to see different info), clock fix, contrast support, fov does not affect gun, gun displays onscreen, Quakespasm wrong content protection, external ent support, session-to-session history and .. (see readme). |
|
|
Audio Nerd Tangent..
#1201 posted by ericw on 2016/09/27 08:32:39
re: resampling algorithms: nearest-neighbour is terrible for audio, but so are linear and cubic. Upsampling 11kHz audio is unforgiving because with the nyquist frequency at 5.5kHz, the distortion let through above 5.5kHz by a poor resampler is right in the sensitive area of human hearing (an ideal upsampler for 11kHz audio is a brickwall lowpass filter at ~5.5kHz).
You got me curious about what kind of filtering vintage cards had, and I turned up this thread: https://www.vogons.org/viewtopic.php?f=32&t=49802
The SB16 is pretty impressive, it's certainly not just using linear interpolation based on those measurements.
So IMHO something like libspeex-resample (windowed-sinc FIR filter) should be used for any audio resampling unless you specifically want the distortion of a bad resampler.
About fixing ResampleSfx.. I did try making a version using libspeex-resample, and still ran into 2 problems:
- When the mixer is running at 11kHz, quake can get away with cutting off and restarting sounds without fading in/out. The upsampling smooths out the discontinuities, and limits the glitching to be below 5.5kHz which prevents it from being too annoying. If the mixer is running at 44 or 48kHz you lose this safety net. Particularly: holding down fire with the nailgun creates really annoying high-frequency glitches when the nail firing sample is cut off midway through and restarted. This distracts me whenever I use DarkPlaces..
- The other related problem is Quake sfx tends to clip like crazy, especially if there is a lot of action happening. Like the previous point, clipping at 11kHz is no big deal because the upsampling limits the damage to below 5.5kHz, so you almost get a limiter/softclipper for free. Whereas at 44/48kHz clipping sounds awful and must be avoided at all costs.
I tried working around both of those, by making the mixer fade in/out when interrupting samples, and adding a limiter/softclipper, but couldn't get something I was happy with. So, for QS, ended up with a 11kHz->44kHz resampler (FIR filter) after the sfx mixer, before mixing in music.
Upgrading to a resampler that can do 48kHz, supporting float output, and moving to floats internally would be nice improvements for sure.
Gunter
#1202 posted by ericw on 2016/09/27 08:47:05
idea: try installing ffdshow, this should add support for many other codecs to DirectShow. It might replace the mp3 decoder and magically fix your issue. Not sure if MarkV will play other formats like OGG/flac if DirectShow is capable of it, but that could be worth a try too.
#1203 posted by Gunter on 2016/09/27 20:50:58
Thanks, those are some good troubleshooting ideas, but...
I disabled the Wifi adapter, no change.
Installed ffdshow, no change.
I have no anti-virus running.
It seems to be an issue with the encoding/decoding.
And I'm getting some really strange results that I can't explain.
I'm using CDex 1.77 (just updated from a slightly older version) to rip directly from the Quake CD with various encoding options.
The default encoder is set to "Lame MP3 Encoder 1.32," and if I leave it on the default settings (a range of 128 - 320 kbps with auto sample rate), it outputs a 256 kbps 44100 Hz, 11 meg file.
Mark V loads that file in 7 seconds...
If I only alter the option to lock the rate to 64 or 56 kbps, the file size drops to about 3.8 meg, but the MP3 then takes 11 seconds to load in Mark V. What's up with that??
Locking the rate at 256 kbsp makes a 15 meg file that only takes 9 seconds to load....
If I allow a variable rate from 48-96, it encodes at 96, but it then takes 16 seconds to load....
If I alter the Hz down to 32000 sometimes I can get it back down to a 7 second load time with other altered settings....
Eh, I just can't come up with any one thing that's affecting it in a predictable way.
Well, I have better luck changing the encoder in CDex to "Windows MP3 Codec" which says it's "Fraunhofer IIS MPEG Layer-3 Codec." It is much more limited, offering a max of 56 kbps, 22050 Hz, but the MP3 comes out at around 3.32 meg and only takes about 4.5 seconds to load.
If I change some things around and encode with the same settings using Lame, the file seems virtually identical at 3.31 meg, but takes 7 seconds to load. There are some other options in the Lame encoder, like "VBR method" which I have no clue about....
I've tried making sure I don't include ID3 tags, and that seems to make no difference.
Well, I think I've hit a wall with my testing. The "Windows MP3 Codec" will have to do, and I don't think I'm going to get a better result without using a drastically lower audio quality.
It's just... weird.
#1204 posted by ericw on 2016/09/27 21:56:47
Did you check memory usage during the freeze, and whether any disk swapping is happening in Task Manager?
tbh I would just format/reinstall Windows at this point, but I have low patience for troubleshooting and it's not always practical
#1205 posted by Baker on 2016/09/27 22:21:28
Maybe one last idea ... is hardware acceleration on?
Almost all hardware has the ability to decode mp3 (mp3 is part of the MPEG-2 standard).
https://www.pixelmetrics.com/Tips/VidBlank/MediaPlayer.php
Even thought the option says "video", audio is part of video.
Worth a last try maybe ...
#1206 posted by Gunter on 2016/09/28 01:08:37
I tried altering the hardware acceleration settings in WMP, but got no difference (I use the file that causes the 17 second delay for testing, because the delay is very close to 17 seconds every time, like clockwork, though I did also try my newly-encoded file that only causes a 4.5 second delay, but any difference in that one would probably be small).
Watching the tack manager, when I'm just sitting with Quake running in a window, it says Mark V's memory usage is right around 215,920 K. CPU usage hovers around 50% (I get around 0% just watching this web page without Quake running, though it can spike up to 50% when I'm dragging windows around a lot).
When I switch on External Sounds in Mark V, while I'm experiencing the 17-second delay, Mem Usage jumps up to 222,100 or so (and my second processor seems to show slightly less usage on the graph, probably because the video in Quake is frozen).
Then after the 17 seconds, when the music starts playing, the Men Usage goes to around 221,956 K.
Turning the music off again drops me back to the original 215,920 K.
These numbers are pretty consistent.
At any point in the process I can easily switch around to other windows, and it does not feel bogged down or like it's out of memory or anything.... The page file seems to stay pretty constant too. Right now it's around 437 MB while I'm not playing Quake. Running DX Mark V makes it go up to about 888. It goes to around 895 when I enable the music (during and after the 17 second freeze), and right back down to 889 when I disable the music.
Yeahhh, I'm not gonna try to re-install Windows, heh.
And again, only in Mark V do I get this bizarre delay (well, and in DirectQ, which I tried earlier). Using WMP or VLC or Winamp, the MP3 starts up instantly, after the program loads. *shrug*
#1207 posted by Baker on 2016/09/28 11:09:24
DirectShow mp3 playback in Quake engines is not new. Mark V was nowhere near the first engine to use it.
FitzQuake 0.85 + mp3 support --- November 11, 2009 http://celephais.net/board/view_thread.php?id=60306&start=275
ProQuake with mp3 playback --- July 2010
http://quakeone.com/forums/quake-help/quake-clients/5698-mp3-option-proquake-4-36-a.html
DirectQ - A post from 2012 where someone is asking about mp3 and MH states that DirectQ has had mp3 playback for "about 3 years".
http://quakeone.com/forums/quake-help/quake-clients/7412-directq-1-8-8-a-3.html#post106070
Engine X - September 2010
http://quakeone.com/forums/quake-help/quake-clients/5942-engine-x-4-61-beta.html
Reckless (now known as Revelator) used DirectShow playback for his Realm engine (2010ish?)
And none of these engines were anywhere near the first to use it, probably an ancient MHQuake engine from 2003-2005 was.
#1208 posted by mh on 2016/09/28 12:27:21
I'm pretty sure that I wrote the DirectShow code for DirectQ because I had this idea that I wanted to use DirectX components for everything. Older versions would have used the Windows Media Player SDK. You can also use MCI which is a little cleaner and more "C-like".
Unfortunately I'm in a similar situation to Baker and just don't have the time to put together experimental code to test all of this out.
#1209 posted by Gunter on 2016/09/29 07:41:54
Well I tried Glpro438 just to be thorough, and the MP3 loading delay is the same.
On to other things, I saw the "smooth text" option in DirectQ, and that looked really nice. Mark V could benefit form that.
Also, r_waterripple is neat, but it moves too fast. If the "waves" moved much slower, it would look better.
Uhh, I was trying to make use of the Copy command today, but it failed me... I mean, for some reason, it did not copy the link someone had posted just prior to me issuing the "copy" in order to grab the link. Then I waited a moment and did "copy" again, and it still omitted the link (which was visible in my console), in addition to the thing that was said just prior to the "copy" command again (which was just some chat text).... I can't seem to reproduce it now. I'll mess with it when there are people on the server again....
Here's the section in question. There may have been other things happening in the console farther up, so I don't know if there were any weird characters or what...
------------
Gunter: what the link again?
Sgt-PieFace: cobalt PMed you on the forum
Sgt-PieFace: for this server I think
]copy
Copied console to clipboard
Sgt-PieFace: wana stop by RN? me and cobalt are there
]copy
---------------
There was text in both the blank spaces in my console. I'll try to do more testing.
#1210 posted by Baker on 2016/09/29 10:48:24
1) "copy" copies the context of the console --- like "You've got nails" "Host Error" ... whatever.
Maybe I described what it does poorly.
But if you need some of the text in the console -- it copies the whole thing and you can paste it into notepad.
Fine tuning the copy ability further would be a PITA.
2) Smooth text.
Smooth text is for scenarios that would cause stretching and the make the console look terrible.
ProQuake uses it when the someone is using an odd combination of resolution + "2d resolution".
At some point Mark V will likely have smooth text.
Notice that ProQuake has the very superior "console width" option in the discrete "advanced settings" menu.
Well, that knocks the snot out of every other Quake engine because the
a) setting is easy to use
b) offers a few different choices easily
c) and the text looks good every time
(* DirectQ might have had a similar feature, I can't recall. Even if it did, I wrote my mine first ;) Haha )
But yeah, Mark V doesn't have that option -- solely because there were bigger fish to catch.
3) r_waterripple is neat. I forgot about that feature. It probably is a bit too fast and lacks customization. Mark V has a few experimental things like that which are defaulted off which are like that.
R_waterripple
#1211 posted by mh on 2016/09/29 11:24:24
For this kind of thing I always prefer to see it controlled by a fractional value of the cvar rather than adding an extra cvar. So maybe r_waterripple 0.5 for half speed, or would that make more sense for height of the ripple?
r_waterripple really depends on water surfaces being subdivided too (and is sensitive to the value of gl_subdividesize).
#1212 posted by Baker on 2016/09/29 11:28:19
I don't know if you have seen this, but as someone who maintains a QuakeC code base, you may find this interesting ...
Type "tool_inspector" in the console. Type impulse 9 to give all weapons.
Change the information seen by selecting a different gun.
Examining map issues or QuakeC problems under some circumstances becomes far more convenient.
#1213 posted by Baker on 2016/09/29 11:39:10
And one last thought since you do coop,
Mark V has a per player coop scoreboard if Mark V is the server. Defaults on. It's one of the sv_ options.
#1214 posted by Gunter on 2016/09/29 20:08:21
Yeah, I understand how the Copy command works -- I was fine with copying the entire console to be able to also grab the link. The problem was, the Copy command left blank spaces in what it copied, and I didn't get the link....
In regard to that "console width" slider in Proquake, Quakespasm does it better with that nice "scale" slider. It seems to adjust all the things that I am setting manually in Mark V:
scr_sbarscale 1.55
scr_conscale 1.55
scr_menuscale 1.55
But yeah, that tends to make the text a bit jaggedy.
I think we already get the full scoreboard like that in FvF, because it runs in kind of a hybrid Deathmatch+Coop mode (it's kind of like team Deatmatch against the monsters). Well, FvF can be voted into regular Deathmatch mode, but people seem to prefer the Quest mode.
Wow! I like that undocumented tool_inspector thing. I think I will definitely have use for that.
#1215 posted by metlslime on 2016/09/29 21:39:41
i would recommend scale values that are whole numbers like 1,2,3, etc. Much clearer looking text.
#1216 posted by Baker on 2016/09/29 23:12:57
@gunter - A one-factor master scale cannot adequately address a four-factor scaling problem.
It'll just offer a lot of different ways for most of the possible settings to get jaggy text and scrunched 2D graphics.
LordHavoc and R00k were both on a server one time talking about engine development topics and got into a long conversation about 2D scaling challenges. I didn't even know how compile a Quake engine at the time, and stopped playing to listen to their fascinating engine conversations.
The 2D scaling conversation was the conversation that really drew me in -- at one point in the future I took what LordHavoc and R00k said the problems were and drafted up a blueprint to address each bullet point in ProQuake -- I had to rewrite all of the 2D rendering mechanics in ProQuake, the text renders smoothly with any setting.
---
Co-op scoreboard. I meant for use with things like releases like Travail or Quoth or Arcane Dimensions or the Mission Packs and such.
Coop-oriented mods like FvF or RQuake already have that taken care of. ;-)
Back On Fog
#1217 posted by Gunter on 2016/09/30 03:57:52
Hmm, I have another interesting note about the fog in the DX version. If I turn gl_overbight off, I seem to get 2X the number of fog bands on lighted areas of the wall. This makes it look better because it's a smoother gradient... but it's weird that it does not show up on unlit areas of the wall. He's a screen comparison, again with gamma ramped way up and in an area that makes the fog look extra ugly:
http://imgur.com/BAyPhy2
In (my older version of) GL Mark V, I do not see the same thing happen when toggling the setting. Ah hah! That's one reason why the GL version fog looks better -- it ALWAYS has those extra bands on the lit areas of the wall. They are just really hard to see because they make a much smoother gradient... but I see them now that I'm looking for them.
In summary:
GL version has 2X the number of fog bands on lit areas of the wall, always.
DX version only has 2X the number of fog bands on lit areas of the wall if gl_overbright 0.
gl_overbright 1 removes the extra bands and makes the fog extra ugly due to a less gradual gradient.
Copy Command
#1218 posted by Gunter on 2016/09/30 08:11:04
Confirmed that it's the weird Quake characters that cause blank places in the COPY'ed text.
Didn't test all the various characters, but if you use the one that kind of looks like the left side of a bar, like this for your name (imagine the (= =) are the weird characters):
S(=name=)
Then anything appearing on that line after the S would be blank in the COPY'ed text.
#1219 posted by Baker on 2016/09/30 08:56:06
+1 ... Great bug report. Shouldn't happen.
Using this can you hover your mouse over the appropriate character and tell me the number.
http://www.quaketerminus.com/hosted/oqnm_4_20/oqnm_4_20.htm
I need to know the character code. My caveman-like brain can't quite imagine which specific one you refer to.
#1220 posted by Gunter on 2016/09/30 19:12:19
128 is the character in question which will blank the rest of the line after it appears.
Additionally (you didn't think I would neglect to test everything else, did you? heh), the following characters will insert a newline in the COPY text:
141
140
139
138
Also, when you get around to fixing that, please stop it from actually committing the name change every time you change one character, because my console looks like this just from using backspace and typing characters in the name field:
---------------------
Gunter's name12 renamed to Gunter's name1
Gunter's name1 renamed to Gunter's name
Gunter's name renamed to Gunter's nam
Gunter's nam renamed to Gunter's na
Gunter's na renamed to Gunter's n
Gunter's n renamed to Gunter's
Gunter's renamed to Gunter's 1
Gunter's 1 renamed to Gunter's 12
Gunter's 12 renamed to Gunter's 12n
Gunter's 12n renamed to Gunter's 12na
Gunter's 12na renamed to Gunter's 12nam
Gunter's 12nam renamed to Gunter's 12name
]copy
--------------------
#1221 posted by Baker on 2016/09/30 22:50:13
I did say you were a quality beta-tester. ;-)
At some point in the future I will refine the namemaker to commit the change "all at once", but it is better than the old system of committing the name "all at once" and having to choose "Accept" and accidentally hitting ESC and losing the name you spent a few minutes making. It's always been on the todo list to make that less spammy.
#1222 posted by Gunter on 2016/10/01 06:47:12
I don't suppose you could give me some kind of test build that would spit out some error messages when it crashes (or save it to a file)? Because it crashes a lot! Well, tonight it seemed that way.... But sometimes it goes for quite a while without crashing, seeming to run just fine. It seems to like to crash right when a map first loads, after exiting the previous map. Perhaps some maps seem to trigger it more than others, like e3m2 seems mighty prone to crashing.
Sometimes it just exits, and other times I'll get a Windows error box asking if I want to report it... and I can check more details about that, but it's mostly incomprehensible gobbeldygook.
It'd also be nice to figure out why the GL version crashes right away too...
#1223 posted by Baker on 2016/10/01 07:22:03
Well, we have back to the old catch-22.
I don't have time to commit to engine development now (engine development is extremely time consuming), nor will I have that kind of time in the near future either.
Maybe some time in the 2nd half of 2017 I will.
This engine is in beta, and is not being actively developed at the present time.
It's not the first big gap of non-development of the engine either.
Quakespasm is a stable release. There's also Qrack and such as options.
You might try FTE, it's pretty damn nice.
http://triptohell.info/moodles/win32/fteqw.exe
You can tell Spike that "nqconnect quake.shmack.net" isn't working in this build I linked :(
On 2nd thought, nevermind. I forgot you have an Intel 845, FTE is pretty big on the shaders and such, althought it does have a Direct3D version too.
http://triptohell.info/moodles/win32/fted3dqw.exe
What would Spike say? "Your mileage may vary" ;-)
Kinda Offtopic
#1224 posted by Spike on 2016/10/01 07:40:27
You can tell Spike that "nqconnect quake.shmack.net" isn't working in this build I linked :(
What would Spike say? "Your mileage may vary" ;-)
I would also say 'works for me'...
(I actually bothered to test that just now!)
(also, you can drop the 'nq' from 'nqconnect' if you want to explicitly specify the port, hurrah for nq+qw using different default ports! or just use the server browser, but whatever)
(also that first build contains both gl+d3d9 renderers, you can switch between them in the menus, and yes with basic settings it should still work without glsl, but certain features obviously will not).
See -- Spike Is On The Ball!
#1225 posted by Baker on 2016/10/01 07:52:30
Sorry, I have 10 copies of FTE in my Quake folder. I blew it, the "fteqw.exe" in my folder is out of date and quite old.
@gunter: FTE supports external textures and if you like options, compared to FTE, Qrack doesn't even have any options.
The number of features FTE has is off the charts.
And should have almost every possible feature you have ever seen.
|
|
This thread has been closed by a moderator.
|
Website copyright © 2002-2024 John Fitzgibbons. All posts are copyright their respective authors.
|
|