Aha! The answer was mipmapping,

#6
Ah geez,

I've ended up really doing a lot with this stuff...

So it turns out Som's mipmaps were not setup crumby afterall. The thing I didn't realize is mipmapping actually takes into account shear when choosing which map to sample. So even if the polygon is right in front of your face, if its turned away from you, so it's just a sliver, an extremely low, even 2x2 mipmap can be chosen. I mean technically this is what mipmaps are for, but you really never want that. So like looking up on the roofs of the houses in DD from the ground end up texturing them with a 4x4 texture which is just hideous. So you really have no choice but to also deploy anisotropic filtering. If you force on anisotropic filtering via the control panel (for your video card) that might seriously help Som, but I have not seen any signs of Som deploying anisotropic filtering.

So then once I got the universal mipmapping setup (now with anisotropic filtering, which helps with shear surfaces in general) that created (as I'd expected) a lot of problems for the imitation colorkey setup. Basically because each mipmap is a texture half the size (down sampled) from the level before it. So you get your black pixels all blurred and what's black versus transparent gets very sketchy.

So for starters, it was obvious the 1bit transparency afforded by 16bpp textures was infeasible. So with mipmapping setup ("do_mipmaps = yes" under the [Option] section of your Ex.ini file) the 16bit textures are converted to 32bit. They look the same (on level zero at least) but you have 255 possible transparency values versus 1. Also once you start blending the colours in the mipmaps you get into true colour (24bit) values, which looks cleaner as things blur into the distance. But to really make things work I relaxed the colorkey tolerance so any black pixels up to (6,6,6) is transparent, which I think may be technically correct under some circumstances when converting between 32 and 16bit colour. But anyway without that kind of tolerance you end up with weirdness like the bottom pixels of a grass texture wrapping around so they get blend up on top of the texture (making a disembodied row of pixels floating in the air)

Everything combined makes things look a lot better. The mipmapping is undetectable. I also got rid of the lines in the menus at some resolutions a couple days ago, which only show up under D3D9 when you change up some of the filters. The fix should be backportable to DX7. Just need to adjust the font dimensions for widescreen to really spruce things up.


There are just a couple lingering things that don't translate so well to D3D9 (yet) which I'm aware of. All tied to specific objects which could just be removed from the game if necessary. Basically there is a plant in the central woods in DD that has black stalks which surely should be green. And the flashing green barriers seem really slow and black out for a long time so you can see thru them. On the other hand I've seen some objects that never seemed to show up correctly before which show up now. Like some mugs in the last map of DD that were always white, that now look like glass mugs with apple cider or something in them.

Reply



Messages In This Thread
Aha! The answer was mipmapping, - by HolyDiver - 2010-08-19, 07:06 PM
Re: Aha! The answer was mipmapping, - by HolyDiver - 2010-08-21, 12:25 AM



Users browsing this thread:
1 Guest(s)