Steve_Yorkshire Posted March 28, 2019 Share Posted March 28, 2019 (edited) Update:I had the terrain's atlas texture map saving out as a JPG at a mere 90k, hence the loss of clarity. :oops: Default is DDS (683k) and PNG (249k) is also available. Whatever you select does not update until you restart the level so you cannot just check the differences on the fly.So if you do go looking through the drop down menu ... remember to reset it to a respectable format. :P ===============================================================When loading a terrain, the textures are washed out.In Terrain Painter, on any texture, hitting "apply" without editing any material/texture, brings the correct colour/tone/etc back.Console says it cannot find the material for the texture - even though it is displaying a "proximity" of that texture.The crux of the problem is this error message: [MaterialList::mapMaterials] Unable to find material for texture: rock01a_dryGroundHard80seamlAutoCon2 [MaterialList::mapMaterials] Unable to find material for texture: grassMidDark_base [MaterialList::mapMaterials] Unable to find material for texture: grassMidDarkDryGroundMix_base [MaterialList::mapMaterials] Unable to find material for texture: dirtyandmix_base Yeah I have terrible naming conventions for some textures ;)Error called from mapMaterials (~300) in materials/materialList.cpp ~338 void MaterialList::mapMaterial( U32 i ) { //... if ( materialName.isNotEmpty() )//<----- THIS IS FAILING FOR SOME REASON ... OR IS IT, IT CAN STILL DISPLAY THE TEXTURE? { Material * mat = MATMGR->getMaterialDefinitionByName( materialName ); mMatInstList = mat ? mat->createMatInstance() : MATMGR->createWarningMatInstance(); } else { if ( Con::getBoolVariable( "$Materials::createMissing", true ) ) { //... } else { Con::errorf( "[MaterialList::mapMaterials] Unable to find material for texture: %s", mMaterialNames.c_str() );//<---- THE WARNING ~338 mMatInstList = MATMGR->createWarningMatInstance(); } //... } Happens on ALL copies of T3D I have, from devhead going way back to the year nth (or at least the old 3.8). :o Anyone with any ideas? :? Edited March 29, 2019 by Steve_Yorkshire Quote Link to comment Share on other sites More sharing options...
Duion Posted March 28, 2019 Share Posted March 28, 2019 A slight hint may be, that terrain textures are handled differently than normal textures and the terrain textures are actually mapped to the base layer, not the actual material.Can you post your materials.cs? Quote Link to comment Share on other sites More sharing options...
Steve_Yorkshire Posted March 29, 2019 Author Share Posted March 29, 2019 @Duion yep, I had the texture map saving out as a JPG. Torque actually defaults to DDS (that and PNG give the best quality). I must have clicked the drop down by mistake, and of course nothing happens until you reload the level ... ahem ... :oops: Quote Link to comment Share on other sites More sharing options...
Duion Posted March 29, 2019 Share Posted March 29, 2019 Using JPG is quite heretical. Another trick is to not set the file ending in the materials.cs, but just type the filename, then Torque will always use it no matter the format, unless you have the same filename in the same folder with multiple file endings, then it may get tricky. Quote Link to comment Share on other sites More sharing options...
LoLJester Posted August 22, 2019 Share Posted August 22, 2019 For anyone stumbling upon the "[MaterialList::mapMaterials] Unable to find material for texture:" warning, you should know that, to avoid this warning, there must be a material created that is mapped to the name of the texture that the warning is displaying.So, if you have for example:new TerrainMaterial() { internalName = "TerMaterialA"; diffuseMap = "art/Textures/myTexture"; }; The corresponding material shall be: new Material(myTexture_Mat) { mapTo = "myTexture"; }; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.