Page 1 of 1

Maps have no Texture

Posted: Mon May 09, 2011 4:47 pm
by whinis
Image

thats what I see when I load any map whether Campaign or skimish

Re: Maps have no Texture

Posted: Sun May 15, 2011 3:43 pm
by zuzuf
Can you post your hardware specs (OS, video card, video driver,...), the TA3D version you use and your game settings (the ~/.ta3d/ta3d.cfg file) ?

Re: Maps have no Texture

Posted: Sun May 15, 2011 4:23 pm
by whinis
I have found it is the result of too high of a water texture, which is odd since setting it to normal fixes it on maps with water and maps without water it doesn't affect. However it odd that it destroys all textures rather than just water.

Another problem I have is the slow mouse, and setting the cpu level of ta3d higher does fix it somewhat however this is still massive lag in between my real mouse and the ta3d mouse.

Re: Maps have no Texture

Posted: Sun May 15, 2011 4:36 pm
by zuzuf
Compositing is likely to slow down things and increase input latency. You can try to disable your compositing manager or limit TA3D's frame rate.
Playing in fullscreen mode can help too (compositing managers may bypass the compositing pass and allow TA3D to render directly to the screen).

There are a few commands you can play with from the game console (toggled with '°'):
toggle.fullscreen()
setFpsLimit(fps)

the game console supports TAB-completion.

Re: Maps have no Texture

Posted: Mon May 16, 2011 3:12 am
by whinis
Well I am running the new ubuntu 11.04 with unity so shutting down compositing is not likely to help my case for other task. However fullscreen is even worse than windowed mode and the mouse seems to follow perfectly until it changed direction then it seemingly loses it place. I have a g51j-a1 laptop with a nvidia 260m graphics card as far as specs run with a intel I7 2.6 zgh - 3.2

When I tried to use the console on the menu screen it would not come up, however in game the shift key would not work so I got setFpsLimit and then could not type the brackets. I average about 134 fps in TA3D. is their any particular reason the mouse lags on TA3D however not on other opengl games like warzone 2100

Re: Maps have no Texture

Posted: Mon May 16, 2011 4:57 pm
by zuzuf
I guess the (mouse) input event loop in TA3D should be running in its own thread to prevent lag but it's not easy to change yet.

Which version of TA3D (0.5.4 or 0.6) do you use ? (very important since they don't rely on the same library for keyboard/mouse inputs)
Do you use the nouveau driver or NVidia's proprietary one ?

Re: Maps have no Texture

Posted: Mon May 16, 2011 7:33 pm
by whinis
I am using 5.4 using the Nvidia proprietary drivers.

When I tried 6.0 I got the error "Couldn't find matching GLX visual"

[Mon May 16 15:41:34 2011][ta3d][warns] [gfx] SDL_SetVideoMode failed : Couldn't find matching GLX visual
[Mon May 16 15:41:34 2011][ta3d][warns] [gfx] retrying with GL_DEPTH_SIZE = 16
[Mon May 16 15:41:34 2011][ta3d][warns] [gfx] SDL_SetVideoMode failed : Couldn't find matching GLX visual
[Mon May 16 15:41:34 2011][ta3d][warns] [gfx] retrying with GL_DEPTH_SIZE = 24 and current color depth
[Mon May 16 15:41:34 2011][ta3d][warns] [gfx] SDL_SetVideoMode failed : Couldn't find matching GLX visual
[Mon May 16 15:41:34 2011][ta3d][warns] [gfx] retrying with GL_DEPTH_SIZE = 16 and current color depth
[Mon May 16 15:41:34 2011][ta3d][error] [gfx] Impossible to set OpenGL video mode!
[Mon May 16 15:41:34 2011][ta3d][error] [gfx] SDL_GetError() = Couldn't find matching GLX visual
Impossible to set OpenGL video mode! SDL_GetError() = 'Couldn't find matching GLX visual'

Re: Maps have no Texture

Posted: Mon May 16, 2011 8:12 pm
by zuzuf
This really shouldn't happen with NVidia's driver (I am running a 64bits Natty with nvidia's driver without issues).
Can you post here your ~/.ta3d/ta3d.cfg file ?

Re: Maps have no Texture

Posted: Mon May 16, 2011 11:04 pm
by whinis

Code: Select all

// TA3D Settings
// Auto-generated by ta3d: [Mon May 16 15:33:52 2011] 

[TA3D]
{
                FPS Limit = -1; // <= 0 means `unlimited`
                 Shadow R = 0.02;
              Time Factor = 1;
           Shadow Quality = 7; // 0..100
           Priority Level = 0; // 0, 1, 2
                     FSAA = 8;
                 Language = 0;
            Water Quality = 2; // 0..5
             Screen Width = 1680;
            Screen Height = 1050;
              Color Depth = 32;
                 Show FPS = true;
           Show Wireframe = false;
           Show particles = true;
 Show explosion particles = true;
               Show Waves = true;
             Show Shadows = true;
        Show Height Lines = false;
          Show FullScreen = false;
           Detail Texture = false;
     Draw Console Loading = false;
              Last Script = scripts/annihilation.lua;
                 Last Map = maps/metal isles.tnt;
                 Last FOW = 3;
                 Last MOD = ;
              Player name = Whinis;
         Camera Zoom Mode = 0;
     Camera Default Angle = 63.44;
    Camera Default Height = 200;
        Camera Zoom Speed = 1;
                     Skin = ;
        Use Texture Cache = false;
               Net Server = netserver.ta3d.org; // default: netserver.ta3d.org
               Render Sky = true;
       Low Definition Map = false;
  Use Texture Compression = true;
        Underwater Bright = false;
             Disable GLSL = false;
    Right Click Interface = true;
      Orthographic Camera = true;
}
I renamed the ta3d.cfg to ta3d.bak and ta3d 6.0 ran fine. so there must be some difference between the config files and that needs to be checked on first run. Also in 6.0 the mouse problem is completely gone so the update did fix it. If I can make one suggestion either allow the shortcut to change from fullscreen to windowed or allow alt-tabing

Re: Maps have no Texture

Posted: Mon May 16, 2011 11:15 pm
by whinis
This derseved another post. After trying to load a map on extreme water quality ta3d crashed

Code: Select all

received signal Segmentation fault
Obtained 3 stack frames.
/usr/games/ta3d(_Z17backtrace_handleri+0x362) [0x5a5d32]
/lib/x86_64-linux-gnu/libc.so.6(+0x33d80) [0x7f1ce8ba9d80]
/usr/lib/nvidia-current/libGL.so.1(+0x2e9889) [0x7f1ce8b53889]
When trying to restart I got the error previsou glx error. Deleting the premade config file allows ta3d to start again.

Re: Maps have no Texture

Posted: Tue May 17, 2011 5:34 pm
by zuzuf
Shadow quality = 7 is too high (only 0-3 are valid in TA3D 0.6 but I am not sure it has exactly the same meaning in 0.5.4).
FSAA = 8 may be the root of your problems, try to lower it to 4 or even disable it.
With an nvidia card and nvidia's driver you can safely enable texture caching.

Re: Maps have no Texture

Posted: Tue May 17, 2011 7:39 pm
by whinis
Still crashing even with everything set to low

console error

Code: Select all

Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Operation not permitted.
[Tue May 17 15:31:06 2011][ta3d][debug] [Mesh] Loading `objects3d\corkrog.3do`
[Tue May 17 15:31:06 2011][ta3d][debug] [Mesh] Loading `objects3d\armsptk.3do`
[Tue May 17 15:31:06 2011][ta3d][debug] [Mesh] Loading `objects3d\armfdrag.3do`
received signal Segmentation fault
Obtained 3 stack frames.
ta3d(_Z17backtrace_handleri+0x362) [0x5a5d32]
/lib/x86_64-linux-gnu/libc.so.6(+0x33d80) [0x7fe39e697d80]
/usr/lib/nvidia-current/libGL.so.1(+0x2e9889) [0x7fe39e641889]
An error has occured.
Debugging information have been logged to:
/home/john/.ta3d/log/backtrace.txt
Please report to our forums (http://www.ta3d.org/)
and keep this file, it'll help us debugging.
after attempting to run as root I got this instead

Code: Select all

thread id = 10
thread id = 9
thread id = 8
thread id = 7
thread id = 6
thread id = 5
thread id = 4
thread id = 3
thread id = 2
thread id = 1

backtrace.txt

Code: Select all

received signal Segmentation fault
Obtained 3 stack frames.
/usr/games/ta3d(_Z17backtrace_handleri+0x362) [0x5a5d32]
/lib/x86_64-linux-gnu/libc.so.6(+0x33d80) [0x7f5c9e3c0d80]
/usr/lib/nvidia-current/libGL.so.1(+0x2e9889) [0x7f5c9e36a889]
config

Code: Select all

// TA3D Settings

[TA3D]
{
                  Version = 0.6;
                FPS Limit = -1.000000; // <= 0 means `unlimited`
              Time Factor = 1.000000;
           Shadow Quality = 2; // 0 -> none, 1 -> low (shadow volumes), 2 -> normal (shadow maps), 3 -> high (shadow maps)
           ShadowMap Size = 2; // 0 -> lower (256²), 1 -> low (512²), 2 -> normal (1024²), 3 -> high (2048²)
           Priority Level = 0; // 0, 1, 2
                     FSAA = 0;
               Anisotropy = 1;
                 Language = english;
            Water Quality = 1; // 0..5
             Screen Width = 1440;
            Screen Height = 900;
              Color Depth = 32;
                 Show FPS = false;
           Show Wireframe = false;
           Show particles = true;
 Show explosion particles = true;
               Show Waves = false;
        Show Height Lines = false;
          Show FullScreen = false;
           Detail Texture = true;
     Draw Console Loading = false;
                Game Data = 2000,maps\gasplant plain.tnt,scripts\game\default.lua,,0,2,player,ARM,0,[C] EASY,10000,10000,1,computer,CORE,2,[C] EASY,10000,10000,2,;
                 Last MOD = ;
              Player name = player;
         Camera Zoom Mode = 0;
     Camera Default Angle = 63.439999;
    Camera Default Height = 200.000000;
        Camera Zoom Speed = 1.000000;
   Interface Transparency = 0.000000; // 0 -> fully opaque, 1 -> fully transparent, default : 0
                     Skin = ;
        Use Texture Cache = true;
               Net Server = netserver.ta3d.org; // default: netserver.ta3d.org
               Render Sky = true;
       Low Definition Map = false;
  Use Texture Compression = false;
        Underwater Bright = false;
             Disable GLSL = false;
    Right Click Interface = false;
      Orthographic Camera = false;
        Mouse Sensitivity = 1.000000;
                Far Sight = true;
             Sound Volume = 128;
             Music Volume = 128;
              Grab Inputs = false;
               7z command = 7z;
           Resource Paths = ;
                 Tooltips = false;
           Developer Mode = false;
          Texture Quality = 3;
}

Re: Maps have no Texture

Posted: Tue May 17, 2011 8:11 pm
by zuzuf
Never run something that is not a system service as root, it can only make things get worse by changing file permissions!
Does it show a bug report window ? (won't work if ran inside GDB)

Re: Maps have no Texture

Posted: Tue May 17, 2011 8:20 pm
by whinis
I ran it in a sandbox so it was safe, the only window I get is the window that says report this backtrace log.

Re: Maps have no Texture

Posted: Tue May 17, 2011 8:29 pm
by zuzuf
Do you have GDB installed ?

Re: Maps have no Texture

Posted: Tue May 17, 2011 8:31 pm
by whinis
after running in gdb I get

Code: Select all

[New Thread 0x7fffee13d700 (LWP 4369)]
[New Thread 0x7fffebc6c700 (LWP 4370)]
[New Thread 0x7fffddf9b700 (LWP 4371)]
[New Thread 0x7fffdd79a700 (LWP 4372)]
[New Thread 0x7fffdcf99700 (LWP 4373)]
[New Thread 0x7fffdc798700 (LWP 4374)]
[New Thread 0x7fffdbf97700 (LWP 4375)]
[Tue May 17 16:32:40 2011][ta3d][debug] [Mesh] Loading `objects3d\armmine3.3do`
[Tue May 17 16:32:40 2011][ta3d][debug] [Mesh] Loading `objects3d\corlevlr_dead.3do`
[Tue May 17 16:32:40 2011][ta3d][debug] [Mesh] Loading `objects3d\corfus.3do`
[Tue May 17 16:32:40 2011][ta3d][debug] [Mesh] Loading `objects3d\armtide.3do`
[Tue May 17 16:32:40 2011][ta3d][debug] [Mesh] Loading `objects3d\armzeus.3do`
[Tue May 17 16:32:40 2011][ta3d][debug] [Mesh] Loading `objects3d\short-tree-tree05.3dm`
[Tue May 17 16:32:40 2011][ta3d][debug] [Mesh] Loading `objects3d\drymetal-metalb03.3dm`
[Tue May 17 16:32:40 2011][ta3d][debug] [Mesh] Loading `objects3d\armsnipe.3do`

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffee13d700 (LWP 4369)]
0x00007ffff576e889 in glGenTextures () from /usr/lib/nvidia-current/libGL.so.1
and another at

Code: Select all

[Tue May 17 16:33:44 2011][ta3d][debug] [Mesh] Loading `objects3d\corrl.3do`
[Thread 0x7fffed464700 (LWP 4185) exited]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff576e889 in glGenTextures () from /usr/lib/nvidia-current/libGL.so.1

Re: Maps have no Texture

Posted: Tue May 17, 2011 8:47 pm
by zuzuf
Ok, I found what was preventing the crash reporter from working: Ubuntu's default policy for ptrace has changed, by default a child process is no more allowed to attach to its parent which is what TA3D was doing when calling GDB to get a stack trace :evil:

This can be temporarily (until next boot) disabled with the following command:

Code: Select all

sudo sh -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope"
then run TA3D, it should show up the crash reporter with a stack trace of all running threads which should be helpful.

You can enable the ptrace security policy with (if you don't want to reboot):

Code: Select all

sudo sh -c "echo 1 > /proc/sys/kernel/yama/ptrace_scope"

Re: Maps have no Texture

Posted: Tue May 17, 2011 10:53 pm
by whinis
sudo sh -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope"

to allow and
sudo sh -c "echo 1 > /proc/sys/kernel/yama/ptrace_scope"

to disallow?

Re: Maps have no Texture

Posted: Wed May 18, 2011 2:37 am
by whinis

Code: Select all

[Thread 0x7fffd7fff700 (LWP 10077) exited]
[Thread 0x7fffdc802700 (LWP 10076) exited]
[Thread 0x7fffdd003700 (LWP 10075) exited]
[Thread 0x7fffdd804700 (LWP 10074) exited]
[Thread 0x7fffde005700 (LWP 10073) exited]
[Thread 0x7fffde806700 (LWP 10072) exited]
[Thread 0x7fffdf007700 (LWP 10071) exited]

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.

Re: Maps have no Texture

Posted: Sat May 21, 2011 10:39 pm
by zuzuf
Ok, this has been continued on IRC and is now fixed.
The problem was due to a threading issue, you can work around it by setting the OMP_NUM_THREADS environment variable to 1 (may 4 works too depending on the resource files you use, it's also faster to load if you have a multi-core CPU):

Code: Select all

export OMP_NUM_THREADS=1
./ta3d