normal map not working
by Adithyaa Srikkanth · in Torque Game Engine Advanced · 04/30/2009 (4:37 am) · 7 replies
I used a normal to one of the models and the it doesn't show up.
this is what i did
baseTex[0] = "./data/shapes/speare/texture";
bumpTex[0] = "./data/shapes/speare/texture bump";
i am using tgea 1.8
how do i make it work please help
this is what i did
baseTex[0] = "./data/shapes/speare/texture";
bumpTex[0] = "./data/shapes/speare/texture bump";
i am using tgea 1.8
how do i make it work please help
#2
With TGEA1.8.1 i notice I do not need to script the path as long as the meterials.cs file is in the same folder as the texture.
04/30/2009 (10:17 am)
And of course when it come to textures, ^2 dimensions. One never knows, and questions seldom detail... With TGEA1.8.1 i notice I do not need to script the path as long as the meterials.cs file is in the same folder as the texture.
#3
I tried out each one of them as u suggested but none seem to work
This is the code that goes into that material.cs file
new Material(madden)
{
mapTo = "madden";
baseTex[0] = "madden";
bumpTex[0] = "normal";
emissive[0] = true;
};
Usually all the files are in the same folder as the .cs file . so there is no need for me to give the complete path, i guess. Do i need to do anything while exporting i am using maya 8.5 for creating the shape.please help. i have one .dts file and 5 textures. is it possible to map those 5 textures on to the .dts file .if yes, can you please tell me how.
05/05/2009 (3:14 am)
thanks steve and caylo.I tried out each one of them as u suggested but none seem to work
This is the code that goes into that material.cs file
new Material(madden)
{
mapTo = "madden";
baseTex[0] = "madden";
bumpTex[0] = "normal";
emissive[0] = true;
};
Usually all the files are in the same folder as the .cs file . so there is no need for me to give the complete path, i guess. Do i need to do anything while exporting i am using maya 8.5 for creating the shape.please help. i have one .dts file and 5 textures. is it possible to map those 5 textures on to the .dts file .if yes, can you please tell me how.
#4
The short version of that is you should change your mapTo from "madden" to "madden.png" (assuming your madden texture is a png...)
05/05/2009 (11:06 pm)
From the official TGEA documentation, specifically the Mapping with Maya section, Quote:Maya exports texture tags with the full filename including the extension. If a model has been exported using Maya, any Materials mapping to it will need a mapTo parameter that includes the full texture filename. Example:
new Material( MayaMat ) { mapTo = "bar.png" baseTex[0] = "~/data/textures/bar"; };
The short version of that is you should change your mapTo from "madden" to "madden.png" (assuming your madden texture is a png...)
#5
05/07/2009 (4:40 am)
Is MayaMat just another name or does it have any significance ? I am able to achieve glow or emissive properties for the objects that already exist in the demo like the crossbow or swarmgun.But not even these properties work for the models i created. thanks Alex.
#6
What you are missing is the MapTo, which is how the engine knows what to map your texture to in your model. The supplied assets do not have the same issue with the MapTo parameter, because they were not exported with Maya. So, modify your MapTo like Alex specifies, and it should work.
Without changing the MapTo, The engine will not be able to map your new material to the material on the model.
To see the actual material name, open up your DTS in Notepad, and go all the way to the bottom. You should see the material names in plain ascii text. Do not edit or attempt to save the DTS with notepad, or it will be destroyed.
05/07/2009 (6:59 am)
Mayamat is just the name for the material. It just needs to be different from everything else.What you are missing is the MapTo, which is how the engine knows what to map your texture to in your model. The supplied assets do not have the same issue with the MapTo parameter, because they were not exported with Maya. So, modify your MapTo like Alex specifies, and it should work.
Without changing the MapTo, The engine will not be able to map your new material to the material on the model.
To see the actual material name, open up your DTS in Notepad, and go all the way to the bottom. You should see the material names in plain ascii text. Do not edit or attempt to save the DTS with notepad, or it will be destroyed.
#7
[MaterialList::mapMaterials] Creating missing material for texture: scriptsAndAssets/data/shapes/indica/tata indica
[MaterialList::mapMaterials] Creating missing material for texture: scriptsAndAssets/data/shapes/indica/mirror
The above are the 2 textures (tata indica and mirror)i used on my model
My script was
new Material(indica)
{
mapTo = "tata indica.jpeg";
baseTex[0] = "~/data/shapes/car/tata indica";
glow[0]= true;
};
addMaterialMapping("mirror");
Even without the last line, nothing much changes.
i see no errors or warnings related to this particular script.
In the dts file , i see these two textures exported.
Am i doing anything wrong ?
05/08/2009 (3:10 am)
jaimi thanks for the help. I really learnt a lot from your explanation. I now can see the textures applied to the model but i think the textures are not forced through the script i.e, materials.cs file. I say this because i see this message in the console [MaterialList::mapMaterials] Creating missing material for texture: scriptsAndAssets/data/shapes/indica/tata indica
[MaterialList::mapMaterials] Creating missing material for texture: scriptsAndAssets/data/shapes/indica/mirror
The above are the 2 textures (tata indica and mirror)i used on my model
My script was
new Material(indica)
{
mapTo = "tata indica.jpeg";
baseTex[0] = "~/data/shapes/car/tata indica";
glow[0]= true;
};
addMaterialMapping("mirror");
Even without the last line, nothing much changes.
i see no errors or warnings related to this particular script.
In the dts file , i see these two textures exported.
Am i doing anything wrong ?
Associate Steve Acaster
[YorkshireRifles]
1. bumpTex[0] = "texture_bump";
2. bumpTex[0] = "./data/shapes/speare/texture_bump";
3. bumpTex[0] = "~/data/shapes/speare/texture_bump";