Game Development Community

Missing Materials errors, but... they aren't missing...

by Nicolai Dutka · in Artist Corner · 06/24/2010 (12:58 pm) · 8 replies

In console I am seeing a LOT of things like:

[MaterialList::mapMaterials] Creating missing material for texture: art/shapes/Objects/Weapons/misc/w_swarmgun

There are a whole bunch more...

Anyway, I went to the location of that texture and created a 'materials.cs' file with the following data:
new Material(Bullet_Mat){
  mapTo = "Bullet_Mat";
   diffuseMap[0] = "art/shapes/Objects/Weapons/misc/w_swarmgun.png";
};

Save the file, turn the game back on and wouldn't you know it... The error is STILL THERE!

Am I missing something here?

#1
06/24/2010 (1:39 pm)
not sure..but try removing the extension in the material:

new Material(Bullet_Mat){
  mapTo = "Bullet_Mat";
   diffuseMap[0] = "art/shapes/Objects/Weapons/misc/w_swarmgun";
};
#2
06/24/2010 (1:45 pm)
@eb
I forgot to mention, I tried that already... No change...
#3
06/24/2010 (2:18 pm)
I have seen T3D give off that error for what seems like no reason.
Hopefully someone knows why..but I doubt it.

#4
06/24/2010 (2:44 pm)
Ugh.. It's totally spamming my console like crazy... My employees have been complaining...
#5
06/24/2010 (4:05 pm)
Is the materials.cs you created getting exec'ed?
#6
06/24/2010 (4:58 pm)
Scott, all materials.cs files are exec'd.

T3D core.cs
//--------------------------------------------
// loadMaterials - load all materials.cs files
//--------------------------------------------------
function loadMaterials()
{
...
   // Load all source material files.
   for( %file = findFirstFile( "*/materials.cs" );
        %file !$= "";
        %file = findNextFile( "*/materials.cs" ))
   {
      exec( %file );
   }
...
}
#7
06/26/2010 (1:01 am)
Welcome to bitmaps, materials, and T3D.....

The 'foolProof' way to get your bitmaps rendering...is to name your modeling 'material' to the same name as the bitmap....and hope the engine generates the material automagically.

Manually setting them up is an Epic Failure for me....
#8
06/26/2010 (11:48 pm)
Try changing your mapTo to "w_swarmgun". The mapTo parameter describes the texture tag used in the shape's modeling program, which is usually just the file name of the texture (and in the case of the swarm gun, it is w_swarmgun [at least in TGEA]).