Antialiasing not working in Linux

Technical support for the Linux and Mac platforms for all Trine games.
vanysha
Posts: 1
Joined: Fri Apr 22, 2011 9:11 pm

Antialiasing not working in Linux

Postby vanysha » Fri Apr 22, 2011 9:17 pm

Hello!
Thanks for the game! Its very interesting and cool. But on my Ubuntu 10.10 (Linux) antialiasing is not working so game is looking very ugly. In other games I dont have a problem with antialiasing. Is there anything that I can do to fix this? Thanks in advance!

P.S. A have ATI HD 6450 and latest proprietary drivers installed.

Xpander
Posts: 34
Joined: Fri Apr 15, 2011 5:40 am
Location: Estonia

Re: Antialiasing not working in Linux

Postby Xpander » Sun Apr 24, 2011 9:41 am

same for me. looks ugly idd :(
other native games have anti aliasing.

AMD/ATI 5770 11.4 catalyst preview drivers.
Linux Mint 13 alpha 64bit
* AMD Phenom II x4 955 BE (3,2 ghz)
* 8GB ddr3 1600mhz
* Asus GTX 560Ti DirectCU

User avatar
fb_joel
Site Admin
Posts: 2482
Joined: Fri Feb 18, 2005 2:14 pm
Location: Finland

Re: Antialiasing not working in Linux

Postby fb_joel » Sun Apr 24, 2011 9:40 pm

I'm not sure what's up with antialiasing in the Linux version - it's possible that we left it out on purpose due to some time constraints or other technical issues. I will check the situation and post back when I know better (this will happen on Tuesday/Wednesday hopefully). If we can add it easily then we'll do so, but let's see how it goes...
// Joel, Frozenbyte team

alt_tuomas
Posts: 57
Joined: Tue Apr 05, 2011 11:30 am

Re: Antialiasing not working in Linux

Postby alt_tuomas » Tue Apr 26, 2011 12:59 pm

Antialiasing should work also on the Linux versions, it was definitely not left out on purpose :wink:
However also on the Windows version antialising is a bit hard to see because it is not "real" antialising. Perhaps you could post a screenshot?
Tuomas Närväinen
Alternative Games

alt_turo
Posts: 195
Joined: Mon Dec 13, 2010 11:06 am

Re: Antialiasing not working in Linux

Postby alt_turo » Tue Apr 26, 2011 2:24 pm

For a technical explanation why Trine does not have real antialiasing see:
http://en.wikipedia.org/wiki/Deferred_s ... advantages

For a VERY technical explanation (and a solution which we unfortunately can't implement because it requires DX 10):
http://dabroz.scythe.pl/2009/09/16/expl ... ed-shading

And BTW someone might update that wikipedia list of deferred shading games and add Trine to the list.
Turo Lamminen
Alternative Games

PedsXing
Posts: 15
Joined: Wed Apr 27, 2011 1:08 am

Re: Antialiasing not working in Linux

Postby PedsXing » Wed Apr 27, 2011 1:23 am

Same thing for me using the proprietary nvidia driver 270.41.06 under ArchLinux 64bit ...
Neither enabling antialiasing in the launcher nor forcing it via nvidia-settings works.
Here are two screenshots:

http://img191.imageshack.us/img191/1319 ... 00221a.png
http://img684.imageshack.us/img684/5397 ... 00319a.png

I don't think there is any antialiasing working in these pictures.

The second picture might have some issues besides the missing antialiasing. I've compared it to Trine on Windows and noticed a couple of things:

- strange stripes in the bloom at the handrails
- missing blurriness around the pillars at the bottom
- very ugly edge on the chain left to the cursor (only if the chain is in front of a back pillar though ...)

Feel free to ask, if you need more screenshots or info on my setup.

Last but not least: A huge thanks for bringing Trine to Linux! I had bought it for Windows way back in 2010, but I just had to get the bundle for the Linux version :) ...

philh
Posts: 14
Joined: Fri Apr 15, 2011 1:54 am

Re: Antialiasing not working in Linux

Postby philh » Wed Apr 27, 2011 4:19 am

PedsXing wrote:Same thing for me using the proprietary nvidia driver 270.41.06 under ArchLinux 64bit ...
Neither enabling antialiasing in the launcher nor forcing it via nvidia-settings works.

I don't think there is any antialiasing working in these pictures.

No, there wont be, Turo has already explained why(deferred shading) there's currently no AA possible in the opengl port.
PedsXing wrote:The second picture might have some issues besides the missing antialiasing. I've compared it to Trine on Windows and noticed a couple of things:
- strange stripes in the bloom at the handrails

Ah, yes, the bloom around the player is very blocky too.

Qantourisc
Posts: 7
Joined: Wed Apr 27, 2011 8:18 am

Re: Antialiasing not working in Linux

Postby Qantourisc » Wed Apr 27, 2011 8:19 am

For me it also looks like the first screen shot.
(So also lacking AA.)

PedsXing
Posts: 15
Joined: Wed Apr 27, 2011 1:08 am

Re: Antialiasing not working in Linux

Postby PedsXing » Wed Apr 27, 2011 2:44 pm

philh wrote:No, there wont be, Turo has already explained why(deferred shading) there's currently no AA possible in the opengl port.


I'm not sure this is true. He only mentioned the difficulties of antialising in deferred renderers, but did not say it's impossible under linux. The windows version of the renderer is (afaik) purely DirectX 9, so there must be other ways that the linked DX10 solution to get antialiasing. I remember that when Trine first came out for windows that AA wasn't working out of the box and I had to use the Stalker compatibility bits to get it running. (Stalker is another DX9 renderer where AA works with those compatibility bits ...) When I installed v1.09 on windows lately AA was working out of the box. (Though that might just mean that the nvidia driver knows by now what compatibility bits to use for Trine ...)
I don't think there is something like those AA compatibility bits on linux (don't think they even apply to opengl on windows) ...

alt_turo
Posts: 195
Joined: Mon Dec 13, 2010 11:06 am

Re: Antialiasing not working in Linux

Postby alt_turo » Wed Apr 27, 2011 4:05 pm

PedsXing wrote:He only mentioned the difficulties of antialising in deferred renderers, but did not say it's impossible under linux. The windows version of the renderer is (afaik) purely DirectX 9, so there must be other ways that the linked DX10 solution to get antialiasing.

Theoretically OpenGL lets me access the necessary features but it would also require tinkering with non-system specific code and figuring out all the render targets. This is very hard, time-consuming and error-prone so I'm not going to do it. And I think Cg shaders don't support it on ATI cards so I'd have to add some GLSL code to the mix to support them.

(Though that might just mean that the nvidia driver knows by now what compatibility bits to use for Trine ...)
I don't think there is something like those AA compatibility bits on linux (don't think they even apply to opengl on windows) ...

The Windows drivers do all kinds of stupid stuff to make specific games look good. I don't think there's any way to get the Linux drivers to do the same.
Turo Lamminen
Alternative Games

PedsXing
Posts: 15
Joined: Wed Apr 27, 2011 1:08 am

Re: Antialiasing not working in Linux

Postby PedsXing » Wed Apr 27, 2011 5:11 pm

alt_turo wrote:This is very hard, time-consuming and error-prone so I'm not going to do it.


So no AA under linux is officially confirmed? Doesn't make much sense to have selectable in the launcher then :mrgreen: ...

Qantourisc
Posts: 7
Joined: Wed Apr 27, 2011 8:18 am

Re: Antialiasing not working in Linux

Postby Qantourisc » Wed Apr 27, 2011 7:36 pm

If you don't want to implement AA, consider implementing supersampeling instead.
( Render at a higher resolution, and at the end, downsample it. )
It will be more power hungry, but it will provide nice AA :)
And some of us do have the GPU power to run it :) (I don't think I'm one of them, but o well )

alt_turo
Posts: 195
Joined: Mon Dec 13, 2010 11:06 am

Re: Antialiasing not working in Linux

Postby alt_turo » Thu Apr 28, 2011 11:12 am

Qantourisc wrote:( Render at a higher resolution, and at the end, downsample it. )

That's almost exactly what the current code does. When AA is enabled the G-buffers are bigger than the screen. The problem is that it's 1) expensive 2) not good enough.
Turo Lamminen
Alternative Games

User avatar
fb_joel
Site Admin
Posts: 2482
Joined: Fri Feb 18, 2005 2:14 pm
Location: Finland

Re: Antialiasing not working in Linux

Postby fb_joel » Thu Apr 28, 2011 3:17 pm

It's possible the Linux version is based on an earlier version where antialiasing was done in this "not quite so good" way. This version mixup is probably our fault so I will look into this.

We improved the antialiasing on the Windows/DirectX side in version 1.08, which features proper supersampling antialiasing - it is very expensive of course.

We'll investigate the versions.
// Joel, Frozenbyte team

User avatar
fb_juha
Posts: 71
Joined: Mon Nov 14, 2005 6:18 pm

Re: Antialiasing not working in Linux

Postby fb_juha » Thu Apr 28, 2011 3:47 pm

With deferred renderers you always end up with a form of supersampling. Even when you use hardware AA to generate g-buffers, you still have to supersample lighting.

alt_turo wrote:
Qantourisc wrote:( Render at a higher resolution, and at the end, downsample it. )

That's almost exactly what the current code does. When AA is enabled the G-buffers are bigger than the screen. The problem is that it's 1) expensive 2) not good enough.


Windows build of Trine does exactly that, it supersamples all rendertargets. While expensive, it certainly is the best option quality wise - and it requires no specific hardware/api support.

There are no quality issues in the current Windows version. Original version of Trine had a hacky "sort of aa", but we patched in a proper implementation.

PedsXing
Posts: 15
Joined: Wed Apr 27, 2011 1:08 am

Re: Antialiasing not working in Linux

Postby PedsXing » Thu Apr 28, 2011 8:07 pm

alt_turo wrote:That's almost exactly what the current code does. When AA is enabled the G-buffers are bigger than the screen. The problem is that it's 1) expensive 2) not good enough.


Interesting ...
It doesn't seem to work for me though. No matter what I select in the launcher I always end up with no AA (as seen in the screenshots).

Xpander
Posts: 34
Joined: Fri Apr 15, 2011 5:40 am
Location: Estonia

Re: Antialiasing not working in Linux

Postby Xpander » Fri Apr 29, 2011 12:26 am

looks bad idd :(
i also tried to force to supersample from catalyst, but still no effect to the game...also seems like anisotropic filtering not work. or is it just me?

Image


thx for the great game tho...its addictive :)...but could enjoy it more with better quality :P
Linux Mint 13 alpha 64bit
* AMD Phenom II x4 955 BE (3,2 ghz)
* 8GB ddr3 1600mhz
* Asus GTX 560Ti DirectCU

PedsXing
Posts: 15
Joined: Wed Apr 27, 2011 1:08 am

Re: Antialiasing not working in Linux

Postby PedsXing » Fri Apr 29, 2011 10:21 am

Xpander wrote:...also seems like anisotropic filtering not work. or is it just me?

I think AF is working in the screenshot you posted. (Although it's difficult to tell as there are no spots where it would be immediately obvious.)

alt_turo
Posts: 195
Joined: Mon Dec 13, 2010 11:06 am

Re: Antialiasing not working in Linux

Postby alt_turo » Fri Apr 29, 2011 1:49 pm

http://alternativegames.net/temp/trineU ... pdate3.zip

Unofficial update with better(?) antialiasing. Please test.

Game goes up to 8 but launcher only goes up to 4. If you want to see 5-8, edit options.txt.

If this works I'll update the launcher and push this to FB on monday.
Turo Lamminen
Alternative Games

Xpander
Posts: 34
Joined: Fri Apr 15, 2011 5:40 am
Location: Estonia

Re: Antialiasing not working in Linux

Postby Xpander » Fri Apr 29, 2011 3:50 pm

thx, much better

alltho character still doesnt seem to have AA, rest of the world seems fine now

Image

hmm..strange looks better on screenshot than when watching the game window itself :D

edit: it was the 8 sample from options.txt, what can i tell is that now anistropic defenetly worked too..i can see its sharp:D..dunno if u changed something about anisotropic also but its a lot of better now in that area also :P

edit2: fullscreen, 1280x1024, all possible settings max from launcher only (4 sample AA 8 sample AF).

WARNING 4,7MB picture
Image

it looks damn good from the picture :) .. but actual game, character still doesnt have AA, rest is fine :)
Linux Mint 13 alpha 64bit
* AMD Phenom II x4 955 BE (3,2 ghz)
* 8GB ddr3 1600mhz
* Asus GTX 560Ti DirectCU

Qantourisc
Posts: 7
Joined: Wed Apr 27, 2011 8:18 am

Re: Antialiasing not working in Linux

Postby Qantourisc » Fri Apr 29, 2011 8:42 pm

if you put the active_samples higher it seems to work better ... no clue why.

PedsXing
Posts: 15
Joined: Wed Apr 27, 2011 1:08 am

Re: Antialiasing not working in Linux

Postby PedsXing » Sun May 01, 2011 11:37 pm

alt_turo wrote:Unofficial update with better(?) antialiasing. Please test.


Hey, i've finally been able to test this and here are the results:

Linux Update2 (same pic as above):
http://img135.imageshack.us/img135/720/linuxupdate2.png

Linux Update3 (resized with GIMP to 1920x1080, NOT INGAME):
http://img850.imageshack.us/img850/5929 ... resize.png

Windows 1.09:
http://img862.imageshack.us/img862/9869/wint.png

When I took the update3 screenshot the file that was saved too disk was larger than 1920x1080 (I think it was 2x the size -> 4 times the pixels). So I resized it with GIMP to my screen resolution and expected to see the same as ingame. This was not the case however: The image that was resized with GIMP looks much, much better than ingame which is kind of strange. Ingame it looked more like update2 but with noticable improvements within textures (for example the bookshelf in the background right after you start to play the wizard looks much better than with update2). There are however a lot of places where there seems to be no AA at all, particularly on polygon edges like the top of the thieve's head or the tree right where the thief starts.

This is all very mysterious to me. Maybe there is something wrong with how the supersampled image is resized to monitor resolution? Thanks for your effort alt_turo. I think we are on the right track here :) ...

I've posted a screenshot of the windows version with 4xAA for comparison and it looks quite a bit better than the GIMP resized image and a lot better than everything I've seen ingame on Linux (so far ;) ...). Is it intentional, that the fog in the background looks so much different on linux? The thieve has differently colored sleeves too, which kind of surprised me. But I like the golden linux sleeves better :mrgreen: ...

Qantourisc
Posts: 7
Joined: Wed Apr 27, 2011 8:18 am

Re: Antialiasing not working in Linux

Postby Qantourisc » Mon May 02, 2011 8:46 am

Qantourisc wrote:if you put the active_samples higher it seems to work better ... no clue why.

PedsXing, if you do that looks like screenshot number #2 or #3, give it a go, and see if it also works for you ...
So in my case I have:
anisotrophy = 16
antialias_active_samples = 16
antialias_samples = 2

alt_turo
Posts: 195
Joined: Mon Dec 13, 2010 11:06 am

Re: Antialiasing not working in Linux

Postby alt_turo » Mon May 02, 2011 2:13 pm

The unofficial update has been updated with a new launcher. You can now set up to antialiasing 8x in the launcher. The game does not support any higher because this code comes from the Mac version which only goes up to 8x.

http://alternativegames.net/temp/trineU ... pdate3.zip

The launcher sets both antialias_samples and antialias_active_samples. More tester required before making this official.
Turo Lamminen
Alternative Games

Xpander
Posts: 34
Joined: Fri Apr 15, 2011 5:40 am
Location: Estonia

Re: Antialiasing not working in Linux

Postby Xpander » Mon May 02, 2011 8:30 pm

it seems good now with my setup.. alltho some objects still dont have AA, like characters and some chains etc.
but thats minor issue.
next graphical glitch to work out would be the Glow. somehow glow is really bad in linux version, it is blocky..or dunno how to describe it better...its not smooth at all.
Linux Mint 13 alpha 64bit
* AMD Phenom II x4 955 BE (3,2 ghz)
* 8GB ddr3 1600mhz
* Asus GTX 560Ti DirectCU


Return to “Trine Technical Support for Linux & Mac”

Who is online

Users browsing this forum: No registered users and 2 guests