Trine2 on Gentoo Linux, NVidia, distorted characters

For discussion about Trine 2, released in December 2011 on Windows, Mac, Xbox, PlayStation Network and later on Linux and Wii U.
canaaerus
Posts: 3
Joined: Wed Apr 04, 2012 7:37 pm

Trine2 on Gentoo Linux, NVidia, distorted characters

Postby canaaerus » Wed Apr 04, 2012 7:50 pm

Hi,

I'm really excited about the new trine and that its finally out for linux.
Unfortunately there are still some quirks for me.
First of all it's rather slow, but with my NVidia 7600 I guess I can not expect more than the 10FPS I get now on low-settings.
What's more disturbing is that the characters are distorted.
As far as I have seen the distortion only happens to my three characters and not to anything else...
I have created some screenshots:
Image
Image
Image
Image

I would appreciate it, if you could solve this issue.

User avatar
fb_jpk
Posts: 140
Joined: Thu Jun 16, 2005 8:05 pm

Re: Trine2 on Gentoo Linux, NVidia, distorted characters

Postby fb_jpk » Thu Apr 05, 2012 12:27 pm

Performance wise, you probably have to set a pretty low resolution to get it running smoothly on GF 7600 series cards. It probably makes sense to try something like 800x600 and no antialiasing. Also, the other quality settings will probably have to be set as low as possible.

But as far as the real issue goes, the characters totally breaking up...

It seems like all of the bone animated models in the game have broken up. I'm not the rendering expert here, so I'm just going with some educated guesses here... Some possible underlaying reasons might be:

- The animation data is corrupt and thus the CPU calculates those bones incorrectly. This however, is very very unlikely, as for the animation data alone to get corrupted (and all of it to get corrupted), without any other game data corruption would be next to impossible in terms of probability. (One would have also expected some CRC errors during installation.)

- More likely, this has something to do with the vertex shaders that apply the bone transformation while rendering...
- In theory, the GF 7600 series has adequate shader support, so it should work... but...
- It could be buggy display drivers. (if your system is quite up to date, this seems unlikely)
- It could be, that the the bone shaders relying on some data format that is not available with that card.. I would expect much greater visual corruption though (basically all of the character bones to be blown up, not just some of them)

I think we still have some GF 7000 series cards in use at the office, but none in Linux use, so I cannot try to duplicate this right now. I'll point this out to our graphics programmer, he'll probably have better insight on what's causing the issue and how to fix it.

canaaerus
Posts: 3
Joined: Wed Apr 04, 2012 7:37 pm

Re: Trine2 on Gentoo Linux, NVidia, distorted characters

Postby canaaerus » Mon Apr 09, 2012 8:49 pm

thank you for your effort
here is some more information:
I am not using the very latest display drivers, but not too old ones either.
nvidia-drivers-295.20-r1 is the latest stable version for Gentoo
compared to the latest avaiable version being 295.33 that is alright I think

secondly I just played trine2 on a windows box and in comparison noticed another occurence of distortion in the linux version:
the wizards boxes have gears not only moving inside but also outside of them
I guess that is another instance of the bone models breaking up

also I'm using xinerame over two of those GF7600 cards, if that could have any influence...

User avatar
fb_jpk
Posts: 140
Joined: Thu Jun 16, 2005 8:05 pm

Re: Trine2 on Gentoo Linux, NVidia, distorted characters

Postby fb_jpk » Tue Apr 10, 2012 10:56 am

Hi,

Our graphics programmer had some theory of what might be causing this, it could be that the GF7600 (and those specific linux drivers for it) might be doing some floating point rounding differently than other hardware and drivers we've encountered so far, which might cause the bone shaders to get messed up as depicted.

We'll be doing some changes to the related shaders, which should ensure the rounding error won't occur. We will then either put that change out with some of the other fixes in the next patch, or if it seems that putting up the general patch will take too long, I will PM you directly about some quick-fix test patch to this.

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

Re: Trine2 on Gentoo Linux, NVidia, distorted characters

Postby alt_turo » Tue Apr 10, 2012 1:03 pm

This could also be an issue with the Cg library and the used vertex and fragment profiles. Trine 1 prints these in the log file, does Trine 2 do the same? The defaults are autodetected and can be overridden with environment variables. Check Cg docs. Find out what profiles GF7 uses and force those same profiles in your test environment.
Turo Lamminen
Alternative Games

User avatar
fb_jpk
Posts: 140
Joined: Thu Jun 16, 2005 8:05 pm

Re: Trine2 on Gentoo Linux, NVidia, distorted characters

Postby fb_jpk » Tue Apr 10, 2012 3:48 pm

So far we've managed to cause the same distortion present in the screenshots you provided by simulating a small "rounding error" in the related bone animation shader.

Similarly this is quite easy to compensate for, and thus fix the issue... But we're still trying to see if we can somehow actually reproduce the actual cause (by tweaking the display driver settings or such). But assuming that we can't verify the original cause for the issue, and thus cannot verify the issue has really been fixed - I might PM you canaaerus with a temporary patch to test in a day or two. And if it seems to work fine, then we'll just add it to the next patch in case some others are affected by the same issue.

canaaerus
Posts: 3
Joined: Wed Apr 04, 2012 7:37 pm

Re: Trine2 on Gentoo Linux, NVidia, distorted characters

Postby canaaerus » Tue Apr 10, 2012 11:21 pm

very well, I'll be happy to try out the patch

User avatar
fb_jpk
Posts: 140
Joined: Thu Jun 16, 2005 8:05 pm

Re: Trine2 on Gentoo Linux, NVidia, distorted characters

Postby fb_jpk » Thu Apr 12, 2012 11:15 am

The quick temporary patch for this seemed to work (thanks to canaaerus for testing it out). So I'll be posting the link to the temp-patch file here, in case anyone else is affected by the bug.

The following temporary patch fixes ONLY the character distortion bug happening on Linux with the GF7600 graphics card (and possibly some other similar cards), so unless you have this specific issue, there is no point on getting this patch. Apply this patch only if you need to. (This fix will also be added to the next official patch, once that comes out.)

Temporary patch to character breakage on Linux, on GF7600 cards - If someone has that issue, download this file and place it to the Trine2 installation directory with the filename "patch1.fbq".
http://www.frozenbyte.com/temp_humble_l ... patch1.fbq


Return to “Trine 2”

Who is online

Users browsing this forum: No registered users and 5 guests