Page 1 of 1

Anti-aliased beams ONLY?

Posted: Thu Jan 07, 2010 12:13 am
by Poro
So another trading jump, and another fire-fight. Again I saw those enticing streaks of red cutting through the space ahead of me, and just had to join the battle.

That got me thinking, for those of us whose GPU can't run shaders, the beams of distant weaponry appear as ugly dotted lines due to their aliased thiness. I know this would require code rather than an OXP, but couldn't some mild AA be applied only to laser beams viewed at a distance - so as not to bog down performance too much?

It would make them appear so much nicer without, hopefully, slowing down FPS for those of us on less specced hardware. Or am I being too picky over this one thing?

Posted: Thu Jan 07, 2010 12:43 am
by JazHaz
I agree, however antialiasing doesn't really work for single pixel width lines, as far as I know.

Posted: Thu Jan 07, 2010 2:22 am
by Poro
Yes, that's certainly true for most graphics chips (I've even seen it worsen the appearence on some single pixel lines), but it would be easy to check for the distance to the player, and make a gernerous guesstimate as to when the line should be bumped up in thickness purely for the AA pass. No?

(This would of course not increase the thickness of the collision boundaries of the beam)

Posted: Thu Jan 07, 2010 2:30 am
by JazHaz
Actually I think keeping it as it is would be best. We could say that space dust is causing the apparent gaps in the beams, blocking the light.

There must be debris and smoke floating around most systems with all the fighting thats happening.

Posted: Thu Jan 07, 2010 7:10 am
by Commander McLane
I would let it as it is. The visibility of the laser beams in itself is a good indicator of the distance to the fight. The thicker and better visible they are, the closer is the action. So it helps you to judge whether it makes sense to rush in, or the action will be over anyway until you arrive. If all beams looked the same, regardless of their distance, you couldn't tell anymore how far the fight was ahead of you.

So I think it is actually best the way it is.

Posted: Thu Jan 07, 2010 7:55 am
by JeffBTX
I second that ... that is a technique I have been using, sneaking up on firefights so that I wouldn't be noticed. "Gappy" laser beams ARE a good indicator of how close you are.

(or as Gollum would say; "sneekin")

Posted: Thu Jan 07, 2010 1:26 pm
by JensAyton
This will be fixed at some point, but there is no magic AA flag that will handle this case elegantly. It needs to be done using textures, which need to be projected in slightly fiddly ways that are made harder by certain oddities in the way Oolite’s graphics work.

Posted: Thu Jan 07, 2010 5:26 pm
by Poro
Ahruman wrote:
This will be fixed at some point, but there is no magic AA flag that will handle this case elegantly
I did actually wonder about that. My one and only time implementing AA in OpenGL allowed only ALL polygons to be AA'ed, or ALL lines. That didn't bother me at the time, but I was curious if one screen element could be singled out for a pass like that.