PDA

View Full Version : hl2 AA bug solved!



saaya
08-12-2003, 05:08 PM
valve found a way to make fukll screen aa run on all cards! in an interview on this german site they also said theyll release a hl2 benchmark before they release a demo of the game itself!

http://www.3dcenter.de/artikel/2003/08-06_a.php

LORD
08-13-2003, 02:19 AM
Games....Bah! :D

Actually should be interesting to see. Hopefully will give people at least some sort of idea as to how their systems will play HL 2.

st0nedpenguin
08-13-2003, 06:48 AM
It's been a while, and my German is rusty, and the work webfilter blocks translation pages (haven't got a clue why), could anyone translate this for me? :)

saaya
08-13-2003, 06:59 AM
sure hang in there for a minute brb

saaya
08-13-2003, 07:01 AM
page1 (http://translate.google.com/translate?u=http%3A%2F%2Fwww.3dcenter.de%2Fartikel %2F2003%2F08-06_a.php&langpair=de%7Cen&hl=de&ie=UTF-8&oe=UTF-8&prev=%2Flanguage_tools)
page2 (http://translate.google.com/translate?u=http%3A%2F%2Fwww.3dcenter.de%2Fartikel %2F2003%2F08-06_a.php&langpair=de%7Cen&hl=de&ie=UTF-8&oe=UTF-8&prev=%2Flanguage_tools)

st0nedpenguin
08-13-2003, 07:03 AM
Google be blocked. :(

Seriously, you wouldn't believe what is blocked by this thing, I couldn't view Penny Arcade, because it was game related, but I haven't yet found a Flash game site I can't access.

I think they decided to try and see if 100 monkeys with 100 computers could configure a web filter, or something.

saaya
08-13-2003, 07:07 AM
The half Life 2 Multisampling anti- Aliasing problem
6. August 2003/from Demirug /page 1 of 2



Introduction

When recently valve published the first videos to its newest work half Life 2, we realized pretty quickly that anti- Aliasing was inactive on those shots. After asking valve about why they didnt use aa on the demos they had to admit that the use of Multisampling anti- Aliasing would lead to unpleasant artifacts - to be exact pixel flares at the edges of the poligones, with flashing colours.

recently Newell of valve announced that they found a possible solution and will publish two videos shortly for comparison.


The cause

The principal reason for the Multisampling anti- Aliasing problem of half Life 2 can be found in the kind of the texture administration of the game. In order to offer a larger alternation of textures in the game without beeing too demanding upon the hardware, half Life 2 stores several textures together in one gib texture.

By using this technology the number of necessary Rendering steps can be reduced for the representation of an object. Since each run gets iniciated by the CPU, above all weaker CPUs benefit from this technique. The gpus/vpus profit from it as well, but in a smaller measure. We know now that half Life 2 summarizes several textures to look great without requireing too much from the hardware.

saaya
08-13-2003, 07:09 AM
The problem for valve is now what will happen in those places where two textures meet. if the edge of the texture is positioned exactly above the edge of the poligon, problems are sure to come. The exact reason for this has to do with how Multisampling anti- Aliasing work. For each pixels there are several Sub pixels and the decision whether a pixel is covered by the polygon or not, is beeing made on this Sub pixel level by the gpu itself, or its aa algorythm to be exact.

In contrast to the Supersampling anti- Aliasing ,wich calculates the coordinates and the way the texure will be sampeled and calculates all those sampling values for each sub pixel, but only one point of the pixel, usually the exact middle of it.

using this technique it might happen that the referance point that is beeing used for the pixel shading is actually outside of that pixel. (before or behind the pixel the shader is supposed to work with) in present games this was not an issue, half life 2 however uses multiple textures stuck together as one big texture, wich now leads us the problem. here the texture coordinates can accidently slide to the next texture stucked together with the texture that should be displayed.

(we have a green and a yellow texture stuck together, we have a poligon that should get the green texture on it, but the edge is so sharp that the center of this poligon is more on the side of the yellow part than on the green part, so instead of seeing a smoother green edge before the background we see a yellow line around the green object.)

saaya
08-13-2003, 07:10 AM
Solution 1: "Centroid Sampling"

In linked to this problem we heard of the term "Centroid" pretty frequently in the last few days. "Centroid Sampling" is a technology to solve the problem of the unfavorable sample point in the middle of the poligon. The solution sounds very easy : With activated "Centroid Sampling" the sample point gets shifted to a new position where it matches the right texture, if it lies outside of the right polygons.

saaya
08-13-2003, 07:12 AM
This way its guaranteed that the texture coordinates cant accidently shift to a position ,which was not at all meant for this polygon.

according to ati its gpus/vpus are able to offer this technology already today. The problem, which valve and ATi have here, is that the DirectX9 only permits the employment of "Centroid Sampling" only in connection with pixel Shader 3,0. to be exact, its centroid sampling is a major requirement of the ps 3.0 instruction set and a card has to be able to use this technique if it wants to get the ps 3.0 certification.

Since ATi can only fulfill all pixels Shader 2,0 obligation features with its present chips, using "Centroid Sampling" by making it run with ps 3.0 is impossible.

if valve decides to activate centroid sampling only and keep the game in ps 2.0, they must find a way with ati to make a special driver for hl2. (would be bad news for nvidia ;))

To generally activate "Centroid Sampling" for all textures in the control panel of the driver is not that easy, you cant use this sampling everywhere without new bugs for example in windows menus and could result in heavy bugs in other 2d and 3d applications.

the last way out would be another new DirectX version, which enables "Centroid Sampling" for certain apps with ps 2.0 gpus. Microsoft however has not shown any interest in doing so, even if they would start a beta test of that dx version right now it would still not be ready for release when hl2 is supposed to be available.



Solution 2: Correction of the texture coordinates in the Pixelshader

Pixel Shader make allow to change the texture position before charging it into the frame buffer. pixel Shader versions 1,1 to 1,3 have very limited the options for this however, version 1.4 (used by ati only atm) instead permits already substantially more options for this repositioning of the textures. ps 2.0 offers more than enough possibilities for diferent ways to change the texture coordinates.


The disadvantage of this solution in the comparison to first is that additional cost of computation in the pixel Shader must be operated, which affects with high probability the performance. the vertex shader also gets a lot more work to do and eats up even more system performence. The advantage is however in the fact that this solution works for each pixel Shader 2,0 gpu without any fixes outside of the dx spec (like that driver for ati cards to enable centroid sampling without ps 3.0)



Solution 3: Isolating the summarized textures

This would be the most trivial and at the same time easiest way to solve the problem that makes aa in hl2 work on even old cards like the gf3/8500 cards. we just take the large textures and split them up to small textures like all engines used textures before. this would however mean that we need faster hardware to run the game with the same speed, and would mean a step backwards from this innovative engine.

This possible solution was not officially mentioned by valve at all ,so far.



Final consideration

checking the diferent fixes valve might give people who bought an expensive dx9 card a way to use aa in hl2 using ps 3.0 , for people with DirectX8-Hardware with Multisampling anti- Aliasing solution 3 would be a possibility to adress the problem. but thinking of the performence needed to run hl2 with full scene aa, it seems questionable that people with dx8 hardware would play hl2 with aa anyways.

we hope valve finds a way that helps everybody to use aa, not only the people with expensive dx9 hardware. (wtf? how will you play hl2 with a gf4/gf3 or 8500 with aa anyways? i bet valve finds a fix for dx9 cards, other cards wont be able to make use of aa anyways... the hl2presentation was running on a 9800pro with aa disabled and the guy got around 60fps... even a 9800pro would not run that game totally smooth with aa)


valve just posted a press info that they fixed full scene aa for all gpus, but so far we dont know how and if they used one fix or diferent fixes for the diferent gpus to solve the problem.

maaaaaaaaaan this googled translation is really bad... english to german works fine... well , the german language is not that easy after all.

st0nedpenguin
08-13-2003, 07:28 AM
That must have been a beach to sort out.:D

Cheers saaya!

saaya
08-13-2003, 07:44 AM
pheew im still working on it, the first two posts should make sence now :D man those translations are horrable... :p:

edit: thrid post should be ok now, lemme know if you dont understand something.

st0nedpenguin
08-13-2003, 07:56 AM
hehe, I think I got it, shame though, I was hoping this would be another blow for nVidia. ;)

saaya
08-13-2003, 08:35 AM
in some way yes, with ati cards you have 2 ways to solve the problem on the gpu/driver level using diferent gpu features. nvidias gpus lack of those extra features... ironically isnt it? wasnt it nvidia who advertised their gpus saying they support soooo many diferent techniques? :p:

st0nedpenguin
08-13-2003, 10:33 AM
And they are the ones who are trying to get all the exclusive features and stuff into games, and their "the way it's meant to be played" program.

Dontcha just love Irony. :-)