#3136 posted by brassbite on 2017/11/22 13:10:10
My problem is that mipmapping makes everything washed out. This is probably the obvious reason for usinge MORE pixels instead of less🙃 Duh, then Winquake look might not be my favorite...
#3137 posted by mh on 2017/11/22 13:52:59
WinQuake used mipmapping too.
And Again I Am Totally Mistaken...
#3138 posted by brassbite on 2017/11/22 16:48:49
I Should Be More Specific...
#3139 posted by mh on 2017/11/22 16:56:06
Win/Software Quake used mipmaps on world/brush surfaces; it didn't on water or MDLs. Typically Fitz/QS replicates this behaviour.
Mipmapping was specifically coupled to the lighting/surface-cache engine and 4 miplevels were stored for each texture.
There's more discussion of all of this in chapter 68 of Mike Abrash's Graphics Programming Black Book: http://www.jagregory.com/abrash-black-book/#chapter-68-quakes-lighting-model
And software Quake's mipmap code is here: https://github.com/id-Software/Quake/blob/master/WinQuake/r_surf.c
#3140 posted by Spike on 2017/11/22 17:55:03
winquake's mipmapping was based purely upon the distance (and texinfo+screensize+d_mipcap).
on the other hand, opengl decides which mipmap to use based upon the rate of change of the texcoords - or in other words surfaces that slope away from the view are considered more 'distant' and thus get significantly worse mipmaps.
you can work around that with anisotropic filtering, but that requires trilinear filtering in order to be well-defined (some drivers just bug out, some force it, some ignore it).
This is a significant issue in FTE's software-esque rendering, and for now FTE uses only 3 mip levels to avoid the worst of it.
note that the original/sw mipmaps retain their proper palette instead of being a blury mess, but this means that sloped surfaces like the side of health boxes just end up with about 4 random pixels or whatever.
there's a few ways to work around this with recent glsl versions, but I've not tried to so so yet.
tldr:
glquake and winquake have _very_ different mipmapping rules, and glquake just looks blury in about every way possible...
#3141 posted by R00k on 2017/11/22 17:57:04
i prefer GL_NEAREST and gl_texture_anisotropy 8
that way it still looks pixely but less glitter at the distance.
#3142 posted by R00k on 2017/11/22 17:59:03
doh! spike just said that while i was typing :O
Also Worth Adding...
#3143 posted by mh on 2017/11/22 18:29:07
...that in hardware accelerated versions of Quake, mipmap level selection is not normally something that the programmer has control over; this is done by fixed function components in the graphics hardware.
@ericw Video Is Blurry Sorry
#3144 posted by R00k on 2017/11/22 18:33:54
#3145 posted by R00k on 2017/11/22 18:37:46
basically the video shows
game custom
timedemo demo2
host error: progs/player.mdl not found
q{tab}
crash
reload
game custom
exec config.cfg
timedemo demo2
host error: progs/player.mdl not found
game id1
crash
#3146 posted by R00k on 2017/11/22 19:12:51
weird my other machine doesnt do it :/
Ah Good.
#3147 posted by ericw on 2017/11/22 19:56:48
I reproduced the crash here on windows with the 32 bit QS build, so it's indeed just those 2 config files that are doing it. thanks, will investigate.
#3148 posted by ericw on 2017/11/22 20:08:53
...that in hardware accelerated versions of Quake, mipmap level selection is not normally something that the programmer has control over; this is done by fixed function components in the graphics hardware.
Looks like it was first exposed to the programmer with textureLod in GLSL 1.30 / OpenGL 3?
https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/textureLod.xhtml
#3149 posted by mh on 2017/11/22 20:42:26
You could probably brute-force it on older hardware by storing each miplevel as a separate texture. Performance would be horrible though.
Speaking Of Texture Aliasing
#3150 posted by iriyap on 2017/11/29 18:59:54
Supersampling makes unfiltered textures look gorgeous and not flicker at all. Consider adding such an option.
https://imgur.com/a/jumoZ
Supersampling
#3151 posted by mh on 2017/11/29 19:03:07
Up close or far away?
The thing about far way textures sparking is that it's basic mathematics. You have one pixel on the screen, and when the texture is sampled - either via nearest or linear, doesn't matter which - you're sampling more texels than will fit in that one pixel. Then when the scene shifts a little (like with regular Quake idle movement, or water warping, or whatever) the texels being sampled jump around.
This is basic sampling theory stuff; it shouldn't be necessary to explain it, it's been mathematically proven for donkey's years.
#3152 posted by iriyap on 2017/11/29 19:10:50
The supersampling in vkQuake works both up close and far away. The far away flickering was always bothering me and I would begrudgingly turn the texture filtering back on, but with this kind of supersampling you get the best of both worlds, the textures never flicker at the distance, and at the same time don't get blurred up close. Works great even at 4x supersampling with little to no performance hit. Black magic!
#3153 posted by mh on 2017/11/29 19:38:38
Just to clarify...
Far away flickering is not caused by texture filtering or no texture filtering.
It's caused by not using mipmaps.
You can disable texture filtering and use mipmaps.
gl_texturemode GL_NEAREST_MIPMAP_NEAREST will disable texture filtering but use mipmaps, and will hugely minimize far-away flickering. This is the nearest you'll get to software Quake without custom shaders to more closely replicate it.
gl_texturemode GL_NEAREST_MIPMAP_LINEAR is slightly higher quality. It also disables texture filtering but will interpolate between miplevels, so you don't get jarring transitions between different miplevels as you move about a map.
I'd strongly encourage you to use the built-in modes properly and see if they actually do meet your requirements. It's an unfortunate piece of Quake "lore" over the past 20 years that gl_texturemode GL_NEAREST is the correct "software Quake" mode, and Quake "lore" is full of flat-out wrong bullshit like this.
#3154 posted by iriyap on 2017/11/29 19:47:46
I'm sorry that I didn't make this clear, but of course I'm using mipmaps (GL_NEAREST_MIPMAP_LINEAR). Still, it causes quite a bit of aliasing compared to GL_LINEAR_MIPMAP_LINEAR, e.g. when looking at the textures with horizontal lines (like base walls) at an angle and moving back and forth. Supersampling seems to fix this issue.
Iriyap
#3155 posted by killpixel on 2017/11/29 19:48:24
You can just enable DSR (nvida) or VSR (AMD) in your video card control panel.
#3156 posted by mh on 2017/11/29 19:59:35
I'm sorry that I didn't make this clear, but of course I'm using mipmaps...
Ah, OK, my apologies.
I guess this is one of those "different things drive different people nuts" things then. I personally accept a bit of aliasing as part of the tradeoff to achieve the crunchy pixel look, and even expect it as a feature of that look.
#3157 posted by iriyap on 2017/11/29 20:04:15
Yeah, I can understand that. WinQuake has tons of aliasing, all over the place, and maybe that's part of its charm, but having crisp sharp unfiltered textures with zero aliasing is also very, very appealing and it's something that couldn't be achieved on the hardware back then, so it feels more like an upgrade than a step back. Just my personal preference, at any rate.
Aliasing
#3158 posted by Qmaster on 2017/11/30 05:57:29
Is merely a result of using a screen with too low a resolution at too close a viewing distance (dpi vs viewing distance).
#3159 posted by metlslime on 2017/11/30 06:20:29
yeah just get a 4k display!
@mh
#3160 posted by R00k on 2017/11/30 07:03:36
thanks! GL_NEAREST_MIPMAP_LINEAR is the perfect balance i was looking for. Too long i was using gl_linear_mipmap_linear and the scene on large maps just looked blurry far away, (thought might feel like GTA-V), lol
small maps like the dm maps it looks perfect like standard true grit Quake :)
|