Game Development Community

Maya and TSE

by Joe Spataro · in Artist Corner · 07/03/2005 (1:10 am) · 13 replies

Are there any special things that need to be done to export from maya to TSE. I can only seem to get the color texture to appear, I can't seem to apply a shader to anything I've exported from maya.

#1
07/03/2005 (4:37 am)
The shaders are applied by mapping a Material (which defines the shader - demo/server/scripts/materials.cs) to a texture name (demo/data/materialMaps.cs). The only thing you do in Maya is assign the right texture (name) to the right parts of the mesh.
#2
07/04/2005 (1:08 am)
I can't seem to get the shader to appear. I do see the texture that i applied in maya but there are no special effects like specular highlights etc.
#3
07/04/2005 (4:51 am)
Did you create the material and the material mapping?
#4
07/04/2005 (10:53 am)
In maya i used a lambert shader with "rockwall.png" as the color texture and then exported to dts into demo/data/shapes/mayatest/

in "materialMap.cs" I added this:
addMaterialMapping("rockwall", "material: MayaTest");

in "materials.cs" I added this:
datablock Material(MayaTest)
{
   baseTex[0] = "demo/data/shapes/mayatest/rockwall";
   bumpTex[0] = "demo/data/shapes/mayatest/rockwall_bump";
   pixelSpecular[0] = true;
   specular[0] = "1.0 1.0 1.0 1.0";
   specularPower[0] = 4.0;
};

The result in the game/show tool is that I see my cube textured with the rock texture but it doesn't show the normal map, the specularity and lighting doesn't affect it. I also tried assigning other shaders, like the orcskin etc but it always only shows the rockwall texture that I applied in maya and not the shader
#5
07/04/2005 (6:16 pm)
Your mapping and material look correct.

Any errors on the console? Does the texture rockwall_bump exist? What size are your textures?
#6
07/05/2005 (12:30 am)
No errors in the console. rockwall_bump exists, and the sizes of both are 256x256.
#7
07/05/2005 (12:50 pm)
Are you sure that rockwall is the name of the material as maya is exporting it? You may want to check your dump.dmp file to be sure.
#8
07/06/2005 (12:02 am)
This is at the bottom of the dump.dmp file:

Material list:
material #0: "rockwall.png".
#9
07/06/2005 (1:05 am)
Hmm...are you 100% sure you aren't getting normal mapping. It might just be a bit more subtle than what you are seeing in Maya. It looks like you are doing everything correctly. Feel free to email me the dts and textures and I can take a look.
#10
10/16/2007 (10:01 am)
Hi!
I was testing the DTSEXPORTER to exporter from maya7 the ADDITIVE BLENDING materials.
But, I don't know how to do. Please somobody can help me? about the transparency are...normal, additive and subtractive.


thanks.
#11
09/13/2008 (9:54 am)
See my post on how to deal with this. The problem is that the maya exporter uses the file name of the maps you used in Maya as the material names, not the material names you actually named them.
#12
09/13/2008 (9:52 pm)
When I create a standard material, it looks like this :
new Material(MayaTest)
{
   [b]mapTo = "rockwall.png";[/b]
   baseTex[0] = "demo/data/shapes/mayatest/rockwall";
   bumpTex[0] = "demo/data/shapes/mayatest/rockwall_bump";
   pixelSpecular[0] = true;
   specular[0] = "1.0 1.0 1.0 1.0";
   specularPower[0] = 4.0;
};
The ".png" is important. You must tell the filetype of the texture for maya exported dts.


So in your case it should be :
addMaterialMapping("rockwall[b].png[/b]", "material: MayaTest");
#13
10/05/2008 (9:13 am)
Is it just me, or do I not have a 'materialsMap.cs' file whatsoever? Nor a 'materials.cs' file located at "server/scripts/"?

Are these instructions not valid for TGEA 1.7.1? My paths also do not look like "demo/data/shapes", but would instead be "scriptsAndAssets/data/shapes" etc.

Would really love some help on how to achieve getting materials mapped onto my maya models.