View Full Version : How to you "permanently" assign material to a mesh
05-07-2012, 06:26 AM
every time I drag a mesh to the map it always has the red "replace me" so I assign a material with the material browser, and everything looks fine and dandy. But, if i bring in that same mesh again from the brush tab it still has the "replace me" texture to it. So how do i "permanently" assign a material to a mesh, so i don't have to keep replacing that red "replace me" mat
05-07-2012, 08:10 AM
As far as i'm aware, this is probably happening because you exported your model, then moved the textures from another directory to your main game build.
Always export your materials to the game build first and foremost, then apply them in max or maya,(from the game build directory) write the .mtl file then export the asset, this generally assures your material links are solid and should solve your issue.
Sometimes regardless of this, your normal maps may not be applied still, not a big worry however, just apply them in the material editor and they will stay applied providing you follow the simple rule above.
05-07-2012, 08:21 AM
Thank you very much jb! I will try that!
Follow this tut and you'll see how to do it propely.
Thing is, inside the .CGF file, there's a path for the default .MTL assigned to that .CGF, if no default .MTL is assigned, or if it's missing, then you'll see a replace-me texture in the object, and you need to assign a material manually.
So make sure your object has the right material assigned in max/maya, export the material first, and then the cfg.
You can also import a material from the editor to Max, I explain that in that tut if i'm not mistaken.
05-08-2012, 11:08 PM
the problem is in ur cgf. make sure the objects are assigned to the right material while exporting.
exporting materials from max/maya might be a pain in the ass and no point to adjust all the parameters outside the editor. so I personally prefer just to copy a empty template mtl file, rename it, and edit it in the editor from scratch (assign texture maps and what not). so in Max I usually just assign it to an 'empty' material with a crytek shader and with THE CORRECT NAME, that's all. it'll load fine in the editor.
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.