Game Development Community

Shadow problem.

by Denis Linardic · in Torque Game Engine · 10/25/2005 (3:30 pm) · 11 replies

Hi guys! I purchased Lightning pack today and it rocks (but you all knew that) ;)

Anyway this is a problem:

When I am inside structure (dif file) orc shadow is good
www.appcro.com/images/GG/clear1.jpg
But if I am outside on the terrain and when I move a little bit for about few seconds shadow is flickering and it looks like this:

www.appcro.com/images/GG/bad1.jpg

I have compiled latest Lightning kit, and I am running P4 2.4, 1 Gb ram, and video card is radeon 9200 (maybe the card is the issue) altough I installed new drivers recently.


Anyone have idea or maybe even a fix (a man can hope right?) ;)

Thanks in advance!

#1
10/25/2005 (3:43 pm)
I've run into this on my laptop running a Radeon 9000 mobile... I updated drivers using a new "omega" driver and it started doing this, I've seen this in a couple other cases.
#2
10/25/2005 (6:24 pm)
Hi guys,

Are the squares constant or do they randomly appear? Random dark squares are a known issues with stock TGE on some ATI drivers, though no specific combination of cards and drivers always produce the results, see these threads for details:

www.garagegames.com/mg/forums/result.thread.php?qt=21595
www.garagegames.com/mg/forums/result.thread.php?qt=22040

I've tried a number of times to track this down, but I can't produce the problem here, so it's very difficult. Out of curiosity are you running in GL or DX mode?

-John
#3
10/25/2005 (6:25 pm)
Oddly enough both of the guys that started those threads have ATI Radeon 9200s too.
#4
10/26/2005 (3:34 am)
I am running in GL mode and they appear only when I move/moving. When I stop it flickers for a few seconds and then converts in normal shadow.

However I have access to another Radeon cards (9600 & 9800 cards so I will try later tonight with that ones).

Uhh sorry I forget about that threads, one of those was started by me...
#5
10/29/2005 (2:36 pm)
Ok, now interesting thing happend.

I add Tim Aste level (from enviroment pack) and shadows are normal. Maybe it's texture thing?

www.appcro.com/images/GG/ok.jpg
#6
10/29/2005 (2:47 pm)
I get flickering shadows on players and vehicles, and I use a Radeon 9200.
#7
10/30/2005 (7:23 pm)
This happens on several drivers, and several different radeon chipsets. I've seen it on the 9000, as well as the 7500. You can "fix" it by turning off the foot puff emitters on the player, then the shadows are great. However, then you don't have puffs when you run, of course. I know it's easy to blame on drivers, but because it appears to be caused by something the footpuff code is doing, I believe it could be fixed in code. And a lot of time the "update your driver!" call simply doesn't work (seeing as most casual users don't have a clue how to do it, especially on laptops with frozen drivers).
#8
10/31/2005 (6:47 am)
Thanks Jaimi, I will disable footpuff for now (I don't realy need it anyway) ;)
#9
11/01/2005 (6:17 am)
Thanks, for the foot puff emitter info, I received similar comments recently from other people who have seen this with TGE. Not sure where you're going regarding changing the drivers, no one here is saying to change the drivers (maybe you were referring to the linked threads). The problems however is a function of the card and drivers, the solution isn't changing the drivers, but the fact is the combo is causing it.

Unfortunately I can't reproduce this problem, so it's impossible for me to resolve (I'm guessing this is why it's been a problem with TGE for such a long time). However I can offer some advice to anyone that can produce the problem and is trying to fix it:

-The problem occurs because the card/driver combo is not acting 100% gl compliant, and the state changes made for the shadowing code are not taking effect.
-The problems that are likely to produce that effect are; the shadow texture is not properly uploading into gl, bad blend mode, or bad texture blend mode.
-Also the color array may not be functioning, however the other items listed above seem more likely to cause the problem.

I hope this helps. If you have any questions just ask, I would like to see this resolved too,

-John
#10
11/01/2005 (8:49 am)
John - Sorry, I was referring to the earlier threads where this had been discussed in more depth. I would love to see this fixed - I can reproduce it 100% - but I'm not really sure where to start.

Note: sometimes the shadow draws all black, but also it sometimes appears at the wrong angles, stretched too thin, or too wide (and cut up in pieces). If this were in D3D, I would think that the texture matrix was messed up.
#11
11/01/2005 (10:14 am)
Ok, I started to dig into the code but since my C++ isn't the best Radeon 9200 cards will be obsolete till I figure out what's going on :)

Anyway, I tested with Radeon 9600 (without reinstalling drivers) and GForce 6600 and everything works fine.

And yes, when you switch to D3D mode shadows are normal. It happens only in OpenGL.