Game Development Community

Black terrian in TGEA

by Chan Chi Kit · in Torque Game Engine Advanced · 07/25/2007 (8:36 am) · 6 replies

I installed TGEA to my new computer with X1950 display card, but all terrains become black, including the terrain in feature demo...

But if I installed to another computer with 6600 display card, the terrains look fine.

Does TGEA only support nVidia display card ?

#1
07/25/2007 (8:56 am)
No. Make sure all your video drivers and DirectX are up to date. Also browse the forums on this topic. There are numerous posts about using the later DirectX DSKs and the issues you may run into. Black Terrain is a common symptom of a missmatch somewhere.
#2
07/25/2007 (10:32 am)
Download the April 2007 DirectX SDK. Make sure to install the runtime files as well.
#3
07/26/2007 (5:05 pm)
I've run into this (or an extremely similar) issue. Try this:

In materials/materials.h look for this:

enum TexType
   {

      Standard = 1,
      Detail,
      Bump,

Replace with:

enum TexType
   {
      NoTexture = 0,
      Standard = 1,
      Detail,
      Bump,

Then in materials/customMaterial.cpp, in CustomMaterial::setStageData, look for this:

//--------------------------------------------------------------------------
// Set stage data
//--------------------------------------------------------------------------
void CustomMaterial::setStageData()
{
   // This is necessary to insure that fallbacks are loaded when 
   // MaterialList::mapMaterials() is called - since it only calls
   // setStageData() on top level material
   //-----------------------
   if( fallback )
   {
      fallback->setStageData();
   }
   //-----------------------


   if( hasSetStageData ) return;
   hasSetStageData = true;

   S32 i;

   for( i=0; i<MAX_TEX_PER_PASS; i++ )
   {
      if( !texFilename[i] ) continue;

and replace with this:

//--------------------------------------------------------------------------
// Set stage data
//--------------------------------------------------------------------------
void CustomMaterial::setStageData()
{
   // This is necessary to insure that fallbacks are loaded when 
   // MaterialList::mapMaterials() is called - since it only calls
   // setStageData() on top level material
   //-----------------------
   if( fallback )
   {
      fallback->setStageData();
   }
   //-----------------------


   if( hasSetStageData ) return;
   hasSetStageData = true;

   S32 i;

   for( i=0; i<MAX_TEX_PER_PASS; i++ )
   {
         mFlags[i] = NoTexture;
      
      if( !texFilename[i] ) continue;

That fixed it for me, hopefully that will help you out!
#4
07/26/2007 (5:52 pm)
There's no difference between the changes in the materials header file?
#5
07/26/2007 (7:22 pm)
D'oh just fixed it, thanks for catching that!
#6
08/06/2007 (8:35 pm)
Oh, I installed the latest runtime files and it works now. Thanks !!!