By using this site, you agree to our Privacy Policy and our Terms of Use. Close
LemonSlice said:
CGI-Quality said:
Wright said:
So, is anti-aliasing the responsible for messing up some character's hairs? I don't know if you've experienced this kind of graphical problem, but the borders of certain characters in videogames tend to get messed up, creating a blurry line that does not fit either the hair or the background.

That's potentially an aliasing issue, yep. 

Isn't that a problem with transparencies?

They often are coupled. Hair and grass are notoriously problematic, as they involve lots of overlapping triangles and lots of overlapping transparencies on their edges. A short recapitulation, sorry if it's stuff you know already:

Your cleanest way to antialias would be supersampling (SSAA), that is render at a higher resolution, then downscale the image to the actual output resolution.This is expensive in fill-rate, texture processing etc.

To reduce pixelpushing, since the inner parts of textured triangles are usually already filtered, there is a nicer method called multisampling (MSAA) that focuses computation around the edges. This technique does not play well with some shader effects and another optimization called alpha-testing, and can result in edges with transparencies, such as those in hair and grasss, to not be antialiased at all by MSAA.

Enters alpha-to-coverage, a further way to treat superposition of partially transparent fragments that plays well with MSAA, is pretty fast on some hardware (the 360 is good at it when using MSAA) and thus very often used with foliage and hair. But in turn it sometimes gives some shimmering artifacts (I think that's what happened in many PS2 games such as SotC, but I'm going on a limb here).

An alternative is a pixel-level a posteriori AA, such as the morphological AA on SPUs pioneered on PS3 in GoW3, or the FXAA that Kynes described previously, where you draw everything first, then you scan the resulting image for edges you have to soften and blur them in a purely 2D fashion. The good thing is that way you can antialias all shader effects. This works surprisingly well in some cases, badly in other because if your antialias algorithm is not smart enough, it might not be able to understand which edges really need smoothing. And of course there's  a tradeoff in how much CPU/GPU power you want to spend on this recognition, so once again you can have shimmering artifacts on some edges or an overly large blurred area. And transparencies such as those in hair? Still prone to artifacts with the amount e.g. of SPU budget you have on a PS3.

So, basically, hair is hard :)



"All you need in life is ignorance and confidence; then success is sure." - Mark Twain

"..." - Gordon Freeman