Bump Mapping
by none · in Artist Corner · 08/26/2009 (6:46 pm) · 14 replies
Hey everyone! I want to create some props for a content pack, however I'm not sure how to go about the bump mapping. Is the bump map filter in gimp alright, or do I use something else, thanks!
#2
08/26/2009 (7:09 pm)
Thanks for the reply! However, I don't have TGEA or Torque 3D and I want to make the pack compatible. How would I go about doing the material.cs?
#3
At minimum you would need/want something like this for each "material", using hte rocketlauncher from TGEa as an example:
There are some differences between material setup in TGEa and Torque 3D, but that will get you started with bump-mapping. You can always download one of the TGEa demos and set up a blank mission just for testing materials so you would know that things are looking right.
08/26/2009 (7:43 pm)
Just create a material.cs file for each directory you may have, or wherever your textures are located. It will automatically be exec'd but it must be in the same location as the textures it looks for.At minimum you would need/want something like this for each "material", using hte rocketlauncher from TGEa as an example:
new Material(w_swarmgun)
{
diffuseMap[0] = "w_swarmgun"; // This is the 'color' texture (the skin)
normalMap[0] = "w_swarmgun_bump"; // This is the normalmap
// Specularity is technically optional... but is great if setup properly.
// The most common mistake that people make is to have shiny or "wet"
// looking objects that shouldn't be.
pixelSpecular[0] = true; // Does it have specular, is it shiny?
specular[0] = "1.0 1.0 1.0 1.0"; // The "color" of the light/sheen of the shiny parts
specularPower[0] = 32.0; // The strength of the shininess
};The TGEa Materials Overview page on TDN can give you some further information on setting up other material effects.There are some differences between material setup in TGEa and Torque 3D, but that will get you started with bump-mapping. You can always download one of the TGEa demos and set up a blank mission just for testing materials so you would know that things are looking right.
#4
08/26/2009 (8:08 pm)
Alright thanks, I'll post something here if I have any problems.
#5
08/28/2009 (12:50 am)
Hey, I tried a modified version of your script, but with my file names, but when I place the object in the game, it is an orange texture saying "No Material." What is wrong?
#6
08/28/2009 (1:04 am)
plz post the modified script that you have and also post the full image names including the extension.
#7
08/28/2009 (3:29 am)
Is the materials.cs in the same directory as the shape and it's textures?
#8
This file is in the same folder as the textures and the DTS model.
And once again the file names are:
Container.jpg
Container Bump.png
ScifiContainer.dts
08/28/2009 (12:46 pm)
new Material(container)
{
diffuseMap[0] = "container"; //the file name is container.jpg
normalMap[0] = "container_bump"; //the file name is container bump.png
pixelSpecular[0] = true;
specular[0] = "1.0 1.0 1.0 1.0";
specularPower[0] = 32.0;
};This file is in the same folder as the textures and the DTS model.
And once again the file names are:
Container.jpg
Container Bump.png
ScifiContainer.dts
#9
08/28/2009 (1:10 pm)
Try adding a full path name instead of just the file name.... sometimes people have reported that being necessary for them:diffuseMap[0] = "scriptAndAssets/data/shapes/containers/container.jpg";Do the same for the normal map, and try it with and without the extension. One other thing to try in there is to use mapto on the first line.
mapTo = "container";
#10
08/28/2009 (8:56 pm)
Thanks, that worked!
#11
not really sure what i'm doing wrong, i made a normal tex with the gimp plugin and did the full paths with mapTo, but it's just not displaying it.
here are the base and normal maps i'm using in case there is something wrong with them:
base: http://img26.imageshack.us/img26/7007/fayardbricks01.png
normal: http://img94.imageshack.us/img94/264/fayardnorms3.png
btw i have tried it with and without extensions and full paths, but the results are always the same
11/06/2009 (11:25 pm)
hmm when i try to use normalMap to define the normal, it replaces the texture with a solid white texture and when i turn off specular it gives me a transparent texture.not really sure what i'm doing wrong, i made a normal tex with the gimp plugin and did the full paths with mapTo, but it's just not displaying it.
new Material(FBricks)
{
mapTo = "FAYARD_BRICKS_01";
diffuseMap[0] = "scriptsAndAssets/data/interiors/rooms/FAYARD_BRICKS_01";
normalMap[0] = "scriptsAndAssets/data/interiors/rooms/FAYARD_norms3";
pixelSpecular[0] = true;
specular[0] = "1.0 1.0 1.0 1.0";
specularPower[0] = 30.0;
};here are the base and normal maps i'm using in case there is something wrong with them:
base: http://img26.imageshack.us/img26/7007/fayardbricks01.png
normal: http://img94.imageshack.us/img94/264/fayardnorms3.png
btw i have tried it with and without extensions and full paths, but the results are always the same
#12
also you do not need the full path for the diffuse route, diffuseMap[0] = "FAYARD_BRICKS01.png"; should be sufficient, same for the normal map route.
11/07/2009 (5:57 am)
with the file name for your diffuse you have it as "FAYARD_BRICKS_01" try removing the second underscore, adding the file extension and renaming it to "FAYARD_BRICKS01.png"also you do not need the full path for the diffuse route, diffuseMap[0] = "FAYARD_BRICKS01.png"; should be sufficient, same for the normal map route.
#13
01/22/2010 (2:09 pm)
Photoshop CS4 has wonderful 3D texture painting. It's what I use personally and you can paint right on models to do bump maps and convert the bump map to normal maps if you wish with NVidia's plugin.
#14
It better be able to do the washing up, too.
;)
01/22/2010 (4:05 pm)
Quote:Photoshop CS4700 DOLLARS!?!?!
It better be able to do the washing up, too.
;)
Associate Michael Hall
Distracted...