Line anti-aliasing minibugs or related critters

For developmental things relating to the graphics of the game.
Post Reply
User avatar
n54
MVP
Posts: 1587
Joined: Sun Dec 21, 2003 12:40 pm

Line anti-aliasing minibugs or related critters

Post by n54 »

I might be pushing things a bit by posting this as I'm sure you all have more important stuff on your hands but I've been wondering a bit about it and it might be something to look into at a later time.

I took a screenshot with line anti-aliasing and polygon anti-aliasing on and highlighted/enlarged some areas where it doesn't seem to work (top left to right, then bottom left to right):
- floor/wall intersection without any kind of anti-aliasing
- trail start, note how the top line away from you is anti-aliased while the top line/trail intersection towards you is not
- trail example of the same, notice how one gets these small transparent areas when having line anti-aliasing on
- another trail example of the same
- floor/trail intersection without any kind of anti-aliasing
- hud meter line - anti-aliased!

I hope the picture can help some for anyone thinking about looking at the code in the future as you can see where it works as intended and where it doesn't.
Attachments
A collection of anti-aliasing challenges
A collection of anti-aliasing challenges
User avatar
Z-Man
God & Project Admin
Posts: 11710
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

Yes, this is pushing things a tiny bit :)
The antialiasing that can be enabled this way is by nature very hard to control and to get right. It's not the FSAA you just turn on and it works, you have to tell it exactly what edges to antialias. If you turn it on at the wrong edges, objects get translucent. For example, the intersection between the grid floor and the rim wall can't be antialiased because the black background would shine through ( the same problem that does exist at the top of your trail ). The bottom of a cycle trail, OTOH, could be antialiased without problems. To antialias the cycles, you would need to analyze the outline and only antialias the edges seen as edges from your perspective, a process that will easily consume more CPU power than turning on real FSAA would eat GPU power.
I'd consider removing the poly antialiasing option altogether because it's impossible to get it right anyway. The line problems ( the top of your trail ) may be fixable, though.
User avatar
Jonathan
A Brave Victim
Posts: 3391
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Post by Jonathan »

The lines can be improved by changing drawing order depending on the cam's z.

Many cards don't do polygon antialiasing btw.
ˌɑrməˈɡɛˌtrɑn
User avatar
n54
MVP
Posts: 1587
Joined: Sun Dec 21, 2003 12:40 pm

Post by n54 »

ok i'll push a bit in the opposite direction then :D

the screenshot was taken at 640x480 resolution to show the "artifacts" clearer. since:
- there's probably very few (if any) running the program at this resolution
- it gets less and less noticeable at higher resolution
- isn't too important in the first place
- it's a tricky thing to fix requiring tons and tons of effort
let's not think more about it.

sorry, just poking the developers, err... game :mrgreen:
User avatar
Lucifer
Project Developer
Posts: 8743
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Post by Lucifer »

n54 wrote: the screenshot was taken at 640x480 resolution to show the "artifacts" clearer. since:
- there's probably very few (if any) running the program at this resolution
Actually, you'll be surprised n54. I'm running at that resolution, and there are numerous players with older machines like me running there and even lower. :)

(It's the old browser conversation, I think there's few people using IE5 because I never hear about it, but it's not true, is it?)
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
n54
MVP
Posts: 1587
Joined: Sun Dec 21, 2003 12:40 pm

Post by n54 »

Lucifer wrote:
n54 wrote: the screenshot was taken at 640x480 resolution to show the "artifacts" clearer. since:
- there's probably very few (if any) running the program at this resolution
Actually, you'll be surprised n54. I'm running at that resolution, and there are numerous players with older machines like me running there and even lower. :)

(It's the old browser conversation, I think there's few people using IE5 because I never hear about it, but it's not true, is it?)
it's the opposite, from my web-interest i know that the majority of computers in the world run using 800x600 pixels (the number is diminishing constantly although the arrival of lcd displays slowed it a while)

why do you run in 640x480? it's not because of your screen or graphics card right? most screens (as well as screen controllers/gfx cards) that had a max of 640x480 died years ago of old age so i guess you run armagetron windowed? (the last working one i saw was a green/black terminal screen we used to turn on for fun static blasts :D) and if you do you get the quality of your screen setting rather than your window size, the screenshot was not from a window.
User avatar
Lucifer
Project Developer
Posts: 8743
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Post by Lucifer »

n54 wrote: it's the opposite, from my web-interest i know that the majority of computers in the world run using 800x600 pixels (the number is diminishing constantly although the arrival of lcd displays slowed it a while)

why do you run in 640x480? it's not because of your screen or graphics card right? most screens (as well as screen controllers/gfx cards) that had a max of 640x480 died years ago of old age so i guess you run armagetron windowed? (the last working one i saw was a green/black terminal screen we used to turn on for fun static blasts :D) and if you do you get the quality of your screen setting rather than your window size, the screenshot was not from a window.
OS resolution is different, I run my desktop at 1kx768 (1064, right?). I run aa at 640x480 because that gives me the most fps with the best clarity. I can get 150fps by running it at a lower resolution, but then I can't see shit. And when you turn on fullscreen mode, aa changes the whole screen to the resolution you've set it at, in my case 640x480. (I play windowed more often than not, these days)

(for the record, I use an LCD display too :) )
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
n54
MVP
Posts: 1587
Joined: Sun Dec 21, 2003 12:40 pm

Post by n54 »

1K = 1024 in binary, 1024x768 is common.
Post Reply