Game Development Community

Pb with weird graphic - hints needed

by Frank Bignone · in Torque Game Engine Advanced · 06/07/2004 (6:57 am) · 24 replies

This is the kind of problem, I'm currently facing with TSE - Demo (and also my current DoP port):

link.darkhand-studio.com/misc/tse2.jpg
Moreover, demo was unable to load due to font loading problem. I solved the problem (GFont.cpp and WinFont.cpp) but still I have this weird problem. Do you have any hint, I will dig into the texture manager; but it will be nice if someone can give me some general hints where I should look.

My configuration is the following:
- Dell Precision M60
- Pentium M
- NVidia Quadro 1000 GFX + 128 Mb
- 512 Mb

BTW, here is an extract of the log file
Processor Init:
   Intel (unknown, Pentium Pro/II/III family), ~1.67 Ghz
     (timed at roughly 1.68 Ghz)
   FPU detected
   MMX detected
   SSE detected
...
Video Init:
Direct 3D device found

   Cur. D3DDevice ref count=1
   Pix version detected: 2.000000
   Vert version detected: 2.000000
Initializing GFXCardProfiler (D3D9)
   o Vendor : 'NVIDIA'
   o Card   : 'Quadro FX Go1000'
   o Version: '53.82'
   - Scanning card capabilities...
   - Loading card profiles...
      - Exec'ing profile/D3D9.cs
      - Exec'ing profile/D3D9.NVIDIA.cs
      - No profile/D3D9.NVIDIA.QuadroFXGo1000.cs
      - No profile/D3D9.NVIDIA.QuadroFXGo1000.5382.cs
Loading compiled script common/ui/defaultProfiles.cs.
Loading compiled script common/ui/GuiEditorGui.gui.
Texture Manager
   - Approx. Available VRAM:  134217728
   - Threshold VRAM:  68157440
   - Quality mode: high
...

About the author

Real programmers don't waste time recompiling; they patch the binary files... ... Real programmers don't waste time patching binary files; they patch memory.

Page «Previous 1 2
#1
06/07/2004 (8:09 am)
Woa. Serious bug for the Mobile shipset?
#2
06/07/2004 (9:26 am)
Try getting newer drivers.
#3
06/07/2004 (2:54 pm)
It is the newer drivers from the dell site (release 6.14.10.5382). NVIDIA website do not have Fx Go1000 drivers.
#4
06/08/2004 (5:50 am)
It seems to be a problem related with texture and memory management. I have tried 'light' GUI and it works fine. I'm digging into it but... (i may need a powerful memory checking tool).
BTW, do not have this kind of problem with other 3D software (Halo game, TGE, ...)
#5
06/08/2004 (8:29 am)
It's too bad NVIDIA doesn't support there GO cards like any of their other cards.

When I had a Geforce 4 GO I had a heck of a time finding drivers that ever worked right.
#6
06/08/2004 (9:26 am)
ATI Mobility owners suffer from the same issue. I have an Radeon 9000 Mobile version and ATI won't make new drivers for it. They tell me to get drivers from the manufacturer of my laptop. Unfortunatly there hasn't been a new driver since July 2003. Fortunatly there is someone that tweaks at least the ATI drivers to install properly with mobile chipsets. http://www.omegacorner.com I hope this helps anyone with a mobile video card.
#7
06/08/2004 (3:27 pm)
I'm surprised it's barfing in the startup screen, there aren't even any shaders running yet!
#8
06/08/2004 (5:01 pm)
I think it is heavely related with some font problems and texture management. Yesterday night, I dig in it until 1:00 AM, and I find very strange behaviour concerning font display (sometimes work, sometimes very slow and sometimes did not work at all). I will go further in my investigation; but do you have any #define that I can trigger in order to have more logs to help my debug?
#9
06/08/2004 (9:50 pm)
What sort of logs do you need?
#10
06/08/2004 (10:10 pm)
At the moment, I have corrected another problem with the font system I think. It seems my problem is linked with the texture management and some weird memory 'corruption' or bad handling inside DX of the texture. I have uncommented some of the trace you put (create texture, kill, ...); but it's not enough to help to debug. I will try to add (if not existing) some utilities functions (save of DX buffer into file, know when a texture is cache, destroy, reallocated, restored, ...). Still on the way and really not done currently ;)

One question about the font system, for each font you create one .png file and another one (pack image) with _x.png extension before. Can you send me one example of those images for Arial 12 font for example to see if it's correct what I have now.
#11
06/09/2004 (4:54 am)
I found it!
It's the automatic mipmap generation which is 'bugged' with my video-drivers it seems. When I switch it off in gfxD3DTextureManager.cpp, i's fine in the 2D screenshots and shown down. However, I have some trouble in the 3D scene (as shown also in the next screenshot). I'm adding software mipmapping support for the texture and hope it will solved all my problems (of course a quick and dirty way to solve it is to create texture with no mipmap :) )

2D Screens (no problem)
link.darkhand-studio.com/misc/tse2a.JPG
3D Scene (problem)
link.darkhand-studio.com/misc/tse2b.JPG
#12
06/09/2004 (8:02 am)
Yup... Wild! Well, glad you got it tracked down. If the changes aren't too painful, it might be worth it to make "software mipmap generation" an option in TSE.
#13
06/09/2004 (4:28 pm)
@Ben: I'm on the way to add 'software mipmap generation' if needed (andd link it with your graphic card profile mechanism by adding a toogle for that)
#14
06/10/2004 (1:19 am)
Ok problem is almost solved. It was easy to add some support for mipmap as all functions are already here. I will do extensive check tonight with the release version of TSE (not debug one), clean my code (remove log) and it should be ok.

I'm using the GFXCardProfiler::queryProfile("supportAutoMipMap", true) function to check if I do hardware or software mipmapping. I think it's the correct way, yep?

When everything is ok, do I send the code/patch to Brian or Ben?

Last minute change: Tonight, I'm going to an izakaya bar, so I may be home very late. I may then send the code only on saturday or sunday (sorry, but quite busy also friday and saturday night).
#15
06/10/2004 (8:03 am)
Frank,

Great work. That's exactly right.

Send it to me or Brian and all will be well.

Thanks,
Ben
#16
06/10/2004 (3:58 pm)
Before you go all crazy on the profiling, you might want to just read the D3DCAPS to see if your card can autogenerate mipmaps. It's D3DCAPS2_CANAUTOGENMIPMAP.
#17
06/10/2004 (9:38 pm)
@Brian: I did it ;) and it says ok. I have looked at all the D3DCAPS and my card support all (NVidia Quadro Fx Go 1000 with 128Mb)

Concerning the mipmapping, it works very well now except a little bug that annoys me. When looking at the terrain model, I have some glitches (white line) around some textures. I think it's due to the mipmapping; but difficult to find where (I did not change the GBitmap->extrudeMipmallevel() function). I'm currently digging in that one. If you want I can already sent you the .cpp/.h file. It corrects:
- better handling of error when creating fonts with glyph function
- software and hardware mipmapping (a little visual artefact on the terrain)
#18
06/11/2004 (11:03 am)
See if you can solve the artifact before you send it in to us. I already checked in the font changes you sent me before.

Good job getting this stuff fixed Frank.
#19
06/11/2004 (6:19 pm)
For sure. Concerning the font I did some changes that handle a little bit better the unusual case.
#20
06/11/2004 (11:16 pm)
Patch sent today:
- mipmap software support
- font bug handling better and nicer
- utility function in GBitmap to save a bitmap + all its mipmap level
- correction of GFXCardProfile (the tsDictionnary is bugged, so I had my own dictionnary)
- add setCapability as static console method for GFXCardProfile
- add D3D9.NVIDIA.QuadroFXGo1000.cs as example to disable hardware mipmapping

Works very nicely on my laptop now. I can focus on adding some nice cartoon shader that I already set up with FX Composer.
Page «Previous 1 2