Jump to content

  • Log In with Google      Sign In   
  • Create Account

Suggestion on reducing jaggies edge for particular angle.


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
15 replies to this topic

#1 haxpor_2   Members   -  Reputation: 120

Like
0Likes
Like

Posted 27 May 2012 - 08:46 AM

I used DLAA over my deferred shading scene.
Even I applied the AA on the scene, there's still some jaggies on the far sight over the run way (white line in parallel). You can see it in the bottom image. Please click on the image for the full size.

Posted Image

The run way itself is as below.

Posted Image

It's clearly that there's no problem at all for some angles the camera's looking, but the angle that users will be mostly looked at is the same as the first image.

Any suggestion on ways to reduce those unpleasant glitches is very welcome!

Edited by haxpor_2, 27 May 2012 - 08:47 AM.


Sponsor:

#2 Ashaman73   Crossbones+   -  Reputation: 7573

Like
1Likes
Like

Posted 27 May 2012 - 09:13 AM

Take a look at FXAA.

#3 haxpor_2   Members   -  Reputation: 120

Like
0Likes
Like

Posted 27 May 2012 - 12:47 PM

Take a look at FXAA.


Thanks ! I will try to implement it and compare the result. Update via this post.

#4 Krzysztof Narkowicz   Members   -  Reputation: 1173

Like
2Likes
Like

Posted 27 May 2012 - 01:46 PM

FXAA, MLAA or similar algorithms won't solve this kind of temporal aliasing of small details.

You can:
1. Use temporal AA (subpixel jitter camera every frame + blend current frame with previous). There is more info about it in crysis 2 presentations. This method has it's artifacts, especially when you target 30fps.
2. Use MSAA, FSAA or similar, which are quite GPU heavy.
3. Let the texture filtering handle it - draw big chunks of terrain with final mip-mapped texture (which contains already composed grass, asphalt, run way etc.). It will look nice, but also you will loose some runtime terrain composition flexibility.

blog | twitter | "Don't have any friends? Still a virgin? Programming is for you!"


#5 haxpor_2   Members   -  Reputation: 120

Like
0Likes
Like

Posted 28 May 2012 - 02:24 AM

I'm now trying to finish implementing FXAA following http://stackoverflow.com/questions/7680073/examples-for-using-nvidia-fxaa-shader-antialiasing-in-xna-4-0-winforms/7735547#7735547, but I have some problems possibly about blending result from buffers that i'm trying to solve.

The current result is here.

Posted Image

I believe I will try solutions from KriScg after this finishes. The result so far seems not to be better than DLAA (I understand there might be some different in environment of implementation). Although modern titles use FXAA method quite more often, I believe they combine with another methods for different distance to camera or some other settings.

If I try out KriScg's solution, or make any progress I will let you know.

Thanks again for your help!

#6 tanzanite7   Members   -  Reputation: 1305

Like
1Likes
Like

Posted 28 May 2012 - 06:25 PM

FXAA will not help with bad filtering. Are you using anisotropic filtering? ... if not then you definitely should as there is quite considerable anisotropy on the horizon.

#7 haxpor_2   Members   -  Reputation: 120

Like
0Likes
Like

Posted 29 May 2012 - 11:14 AM

tanzanite7, I used anisotropic with max 8. The result looks just like the very first image above.

#8 EsorU   Members   -  Reputation: 112

Like
0Likes
Like

Posted 29 May 2012 - 03:00 PM

Have a look at FXAA 3.11 on Timothy Lottes Blog and use the PC branch.

#9 haxpor_2   Members   -  Reputation: 120

Like
0Likes
Like

Posted 08 July 2012 - 02:44 AM

Guy, some heads up!

I've tested with FXAA 3.11 on Timothy Blog, and it's kind of similar result to DLAA (originally I have) but with less blur.
Now, I'm currently trying to make SMAA in order to resolve temporal aliasing. In fact, I'm trying for several days now.
Please see more info here http://forums.create.msdn.com/forums/t/106646.aspx.

Thanks!

#10 haxpor_2   Members   -  Reputation: 120

Like
0Likes
Like

Posted 08 July 2012 - 09:57 PM

Heads up guys, I'm able to make the result from the first pass working. The problem seems to come from Matching between vertex and pixel shader (

http://www.gamedev.net/topic/434661-fx-hlsl--semantics-problem/

), you can see the result for the first pass at my blog here (

http://haxpor.org/post/26757501785/after-several-days-sitting-duck-in-front-of

).



So currently I'm trying to make the second pass works. But after testings, it seems like second pass didn't do anything. I got not-similar result to the reference demo in https://github.com/iryoku/smaa, and always got the result just seen in the first pass. The second pass involves using stencil buffer as well and I'm trying to figure out what's the root cause.



Sorry for my quick heads up, I have to get it done quickly as possible. I believe it's because the hlsl syntax and its feature as of xna 3.1 is not so compatible with the source code seen in the link as there, it targets more on directx 10.



Any suggestions would be appreciated.



#11 LorenzoGatti   Crossbones+   -  Reputation: 2709

Like
2Likes
Like

Posted 09 July 2012 - 02:30 AM

An obvious suggestion is filtering the textures of problem areas, like the furthest runway in the first picture, correctly.
If, unsurprisingly, high quality anisotropic filtering of high contrast (white lines and dark ground) textures doesn't help, you need better mipmaps, maybe retouched by hand (with less white lines), for the highly minified and anisotropic cases: then there won't be any severe and time-varying jaggies.
Produci, consuma, crepa

#12 Hodgman   Moderators   -  Reputation: 30424

Like
1Likes
Like

Posted 09 July 2012 - 02:44 AM

tanzanite7, I used anisotropic with max 8. The result looks just like the very first image above.

Do your textures also have mip-maps, and is mip-mapping enabled for them?

As above, you can also use higher-quality mips to avoid this problem (which is texture-sample aliasing, not final screen-space aliasing that **AA will help with) -- you can either have artists touch up mips by hand, or allow artists to choose the filter used to generate mips, such as kaiser or bicubic, instead of bilinear.

#13 Waterlimon   Crossbones+   -  Reputation: 2574

Like
0Likes
Like

Posted 09 July 2012 - 03:05 AM

You could try to cover it with some fancy shader effect (for example a runway might be hot so the air is hot so it could blur and mess with the picture a bit if youre far)

o3o


#14 haxpor_2   Members   -  Reputation: 120

Like
1Likes
Like

Posted 09 July 2012 - 03:35 AM

Thanks LorenzoGatti, your suggestion leads me to find out that all of my textures are not mipmap-generated !!
Then it solves the problem quite well.

I will post the result here soon. Thanks again for all of your helps !

PS. Remember to turn on your mipmap http://blogs.msdn.com/b/shawnhar/archive/2009/09/14/texture-filtering-mipmaps.aspx.

#15 haxpor_2   Members   -  Reputation: 120

Like
0Likes
Like

Posted 09 July 2012 - 03:37 AM

Thanks Hodgman, exactly, mipmap is a key, I turned on now and it solved the problem.

Thanks Waterlimon, I thought about this similar approach as well but I would like it to be generally apply to all scenes.

#16 haxpor_2   Members   -  Reputation: 120

Like
0Likes
Like

Posted 09 July 2012 - 10:57 AM

Guys,

Posted Image



Posted Image




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS