Game Development Community

Problem converting existing TGE project to TSE

by Michael Berglund · in Torque Game Engine Advanced · 12/17/2004 (8:37 am) · 4 replies

I've been converting a test bed project to use TSE and I get this error in te log and debug window:

MatInstance::MatInstance() - Unable to find material 'TerrainBlenderPS11AMaterial'
MatInstance::MatInstance() - Unable to find material 'TerrainBlenderPS11BMaterial'
MatInstance::MatInstance() - Unable to find material 'TerrainBlenderPS20Material'

The materials.cs, shaders.cs, glowbuffer.cs, and materialMap.cs are all in place; the textures are there, and the shaders directory as well.

What am I missing that is causing this crash?

It crashes here in matInstance.cpp:

void MatInstance::init( SceneGraphData &dat, GFXVertexFlags vertFlags )
{
mSGData = dat;
mVertFlags = vertFlags;

// mMaterial is NULL here
mMaterial->setStageData();

#1
12/20/2004 (2:19 pm)
Have you confirmed the CustomMaterial definitions for TerrainBlender* are present?
#2
12/20/2004 (3:59 pm)
I just had that. I was calling materials.cs etc to early. I moved them to the very last scripts called in OnServerCreated() and the crashes went away.
#3
12/20/2004 (8:05 pm)
Neat-o.
#4
12/21/2004 (8:38 am)
Sorry for the delayed response,
i've been out ill

thanks for the tip, Erik. I suspected it may be just a timing issue