Game Development Community

Missing texture on character

by Mark Pilkington · in Game Design and Creative Issues · 10/03/2006 (1:42 am) · 6 replies

Hey

I just got my placeholder animated character into TSE but he has the orange 'No material' applied to him. He is fine in show tools and the jpg texture is in the same folder which leaves me to think it might have something to do with the it having a bad material.cs

All I want is a basic jpg diffuse map and a normal map to be drawn on my character. Does anyone know the simplest way to do this in TSE? - ie, a basic shader file to apply a diffuse and local map to my character model?

Cheers

#1
10/03/2006 (9:35 pm)
Put this in a file named materials.cs in the same folder as your model/textures
//Most Basic Material
new Material(MyCoolMaterial)
{
   mapTo ="youDiffuseTextureNameHere";
   baseTex[0] = "yourDiffuseTextureNameHere";
   bumpTex[0] = "yourNormalMapTextureNameHere";
   pixelSpecular[0] = false;

};
#2
10/04/2006 (1:40 am)
Hey cheers for that but it doesn't apppear to work...or I'm doing something still very wrong.

Here is my new material.cs file

//*****************************************************************************
// player base texture
//*****************************************************************************
new Material(Corrigated2)
{
   mapTo = "data\shapes\player_psycho\corrigate2";
   baseTex[0] = "data\shapes\player_psycho\corrigate2";
  // bumpTex[0] = \\"yourNormalMapTextureNameHere\\";
   pixelSpecular[0] = false;
};

The material.cs file is in the same folder as my dts model which is:
data\shapes\player_psycho\place_holder_character.dts

any ideas on what I've done wrong here?

Cheers for the much needed help.
#3
10/04/2006 (3:21 am)
Could you also give me alittle info on the 'mapTo' command?

As much info will really help me alot and I appreciate it.

Cheers.
#4
10/04/2006 (5:11 am)
Maybe it's just a typo problem in the forum, but you could simply name your cs file: "materialS.cs" and not "material.cs".
#5
10/04/2006 (6:30 am)
My file is named materials.cs
#6
10/04/2006 (12:44 pm)
Ok I got it working!

Some info for any people that may have the same problem.

mapTo should just be the file name and file extension and thats it!

//*****************************************************************************
// //player base texture
//*****************************************************************************

new Material(psycho_base texture)
	{   
		mapTo = "corrigate2.jpg";
		baseTex[0] = "~/data/shapes/player_psycho/corrigate2";
		// bumpTex[0] = \\"yourNormalMapTextureNameHere\\";
		pixelSpecular[0] = false;
	};

This works fine.