AntiAliasing and Advanced Lighting
by Lewis Bibby · in Torque 3D Professional · 07/14/2011 (6:16 pm) · 5 replies
Hey there,
A while ago I noticed that whilst in advanced lighting mode my game didn't seem to have any AA. I at first thought this was because I was merging an old version of the action adventure kit into torque 1.1 final but after using the new version it stayed the same. Then I noticed another person had posted that they were getting this in their console...
But it was at the end of a thread and so no-one had replied to it. I then checked and I get the same in mine. So is it true that AA simply doesn't work with advanced lighting? If so that seems a bit problematic since the types of machine that would be wanting to use AA are the same ones that would use advanced lighting and currently if I scale up the resolution (say running the game in 720p on my 1080p monitor) the lack of AA is noticeable to the point where I've had a play tester tell me he's been using basic lighting over advanced because it was that bad despite basic having a complete lack of shadows and shader effects. So I'm sure you can see why I would be concerned about this.
Thanks for reading,
-Lewis
A while ago I noticed that whilst in advanced lighting mode my game didn't seem to have any AA. I at first thought this was because I was merging an old version of the action adventure kit into torque 1.1 final but after using the new version it stayed the same. Then I noticed another person had posted that they were getting this in their console...
--- Resetting D3D Device --- AntiAliasing has been disabled; it is not compatible with AdvancedLighting.
But it was at the end of a thread and so no-one had replied to it. I then checked and I get the same in mine. So is it true that AA simply doesn't work with advanced lighting? If so that seems a bit problematic since the types of machine that would be wanting to use AA are the same ones that would use advanced lighting and currently if I scale up the resolution (say running the game in 720p on my 1080p monitor) the lack of AA is noticeable to the point where I've had a play tester tell me he's been using basic lighting over advanced because it was that bad despite basic having a complete lack of shadows and shader effects. So I'm sure you can see why I would be concerned about this.
Thanks for reading,
-Lewis
#2
Thanks for the information; I just had a play around turning the MLAA on and off and also comparing it to the basic lightings MSAA. The MLAA was turned on by default in my project but it just doesn't seem to achieve anywhere near the same results the basic lighting one does. Still I can also say that without it the problem is a million times worse so I am thankful for its inclusion. I guess I shall probably have to make do with what I have if it's an issue with a different ender method.
Thanks again,
-Lewis
07/14/2011 (9:02 pm)
Hey Chris,Thanks for the information; I just had a play around turning the MLAA on and off and also comparing it to the basic lightings MSAA. The MLAA was turned on by default in my project but it just doesn't seem to achieve anywhere near the same results the basic lighting one does. Still I can also say that without it the problem is a million times worse so I am thankful for its inclusion. I guess I shall probably have to make do with what I have if it's an issue with a different ender method.
Thanks again,
-Lewis
#3
07/14/2011 (10:54 pm)
There are a couple params you can tweak in MLAA.cs that might improve the results. Look for: lumaCoefficients, threshold and depthThreshold. Unfortunately I don't know enough about MLAA to offer much advice on 'optimal' values for these params. I suspect the 'best' values might be game or even scene dependent but with some tweaking hopefully you can find something that works well.
#4
07/15/2011 (9:34 am)
I've been constantly baffled by that console warning as AA clearly does work with AL. :P
#5
07/15/2011 (9:52 am)
@chris: Thanks I was able to get my game looking somewhat nicer by playing with those settings (though I left the lumaCoefficients since I wasn't sure of a good way to change those)and now I can stop worrying about that console message!
Associate Chris Haigler
Jester Dance
I'm not sure if there's an options UI hooked up to enable/disable MLAA but to test it out you can type: MLAAfx.toggle(); in the console.
The actual PostEffect script for MLAA is in the ../game/core/client/scripts/postFx/ folder (look for MLAA.cs).