Game Development Community

Torque 3D Beta 2 Bug - Advance Lighting and Terrain issues Ati 3870

by Afan Olovcic · in Torque 3D Professional · 05/01/2009 (3:08 pm) · 13 replies

Ok

I have Intel core 2 Quad CPU Q6600 2.4GHz 4 GB of RAM Ati radeon 3870 last drivers ATI Catalyst™ 9.4 Display Driver for Windows XP Professional ,dirctX SDK(march 2009) .

I found 3 bugs :

FPS genre kit ctrl o option when I change resolution I had to reinstall engine to solve problem :(Bug solved Beta 2)

www.afanolovcic.com/FPS%20Genre%20Kit1.jpg
next one with trees alpha channel ,problem with advance lighting only ,it is OK when I switch on basic lighting .

www.afanolovcic.com/FPS%20Genre%20Kit2.jpg

And terrain material problem

www.afanolovcic.com/FPS%20Genre%20Kit3.jpg

#1
05/01/2009 (3:13 pm)
Afan, for the top image problem (black everything), rather than reinstall, delete your prefs.cs and restart.

Try rebuilding the solutions. It didn't seem to help for the demos, but it did for the "My Projects" exec. After recompiling I can change resolution without it going black.
#2
05/01/2009 (3:22 pm)
Thanks I didn't have time to search for solution :)

Ok on second PC I have Nvidia GeForce 9800 GTX+ works like charm , beautiful

Except first bug ..
#3
05/27/2009 (12:13 pm)
I'm rolling on an ATI 3870 too and have the same issue with lines showing up on materials that use alpha.
#4
05/27/2009 (12:47 pm)
I saw those shadow lines on transparent objects on a 4850 too, Catalyst 9.3. Didn't test beta 2 on it yet.
#5
05/27/2009 (12:50 pm)
Do you enforce any settings especially stuff like Alpha Antialias
#6
05/28/2009 (1:05 pm)
Marc,
No I didn't ,and last two bugs are still there in beta 2
#7
06/02/2009 (4:46 am)
@Afan - I believe i have a fix for the trees alpha channel issue (the second screenshot). If you could give it a test it would help.

In renderInstancerenderPrePassMgr.cpp in function ProcessedPrePassMaterial::addStateBlockDesc around line 420:

void ProcessedPrePassMaterial::addStateBlockDesc(const GFXStateBlockDesc& desc)
{
   const bool pixelOutEnabled = mPrePassMgr->getTargetChainLength() > 0;
   if ( !pixelOutEnabled )
   {
      mUserDefined.colorWriteDefined = true;
      mUserDefined.colorWriteRed = pixelOutEnabled;
      mUserDefined.colorWriteGreen = pixelOutEnabled;
      mUserDefined.colorWriteBlue = pixelOutEnabled;
      mUserDefined.colorWriteAlpha = pixelOutEnabled;
   }

   // Always force alpha test state off when rendering
   // the prepass as we use the alpha channel for the
   // depth information... MFT_AlphaTest will handle it.
   mUserDefined.alphaDefined = true; // ADDED
   mUserDefined.alphaTestEnable = false; // ADDED

   // Add in the stencil write description
   mUserDefined.addDesc( mPrePassMgr->getOpaqueStenciWriteDesc() );
}

The issue was that many Geforce cards... maybe all of them... do not support alpha blending when rendering to an integer R16G16B16A16 target. This just happened to be the target format we've been using for the prepass.

On Geforces the alpha test state was being ignored and didn't have an effect on the final rendered scene.

On ATI cards which do support blending to a R16G16B16A16 target the lower 16bits of depth information stored in the alpha channel was knocking out the prepass normals and depth.

One down... bunch more left to go!
#8
06/02/2009 (4:55 am)
@Tom:
This change fixed alpha channel issue for me (HD4870 with Catalyst 9.4 on XP SP3).
Thanks!
#9
06/02/2009 (7:53 am)
that last one had been reported here for Beta 1
#10
06/02/2009 (1:18 pm)
@Tom Thanks I will try it :)


Ok it works ! Alpha problem is solved ! :):)

#11
06/02/2009 (4:41 pm)
But I have new problem terrain painter doesn't work properly in beta 2 on both cards Ati 3870 and nvidia 9800 GTX+ .The problem is that only first material is visible on terrain ,I can't paint terrain with other materials.

But this bug has nothing with fix above.
#12
06/02/2009 (7:26 pm)
Cool... the terrain rendering code has been rewritten for beta 3, so i hope those changes will solve your issues with it.
#13
06/03/2009 (2:45 am)
Thanks Tom, I hope so too! I'm just trying everything ,just to be sure to push out all possible bugs .:) Nice work guys ! I wish I have more time to work on :(