Game Development Community

Can't get environment mapping to work

by Dean · in Torque Game Engine Advanced · 07/16/2007 (10:26 am) · 1 replies

(TGEA) someone told me I had this in the wrong forum and need to post it here :p

I'm basically trying to make my metal look "shiny" .I've been looking around for the last several days trying to learn this, and I still can't get it to work. in my client prefs.cs, I have $pref::environmentMaps = "1";
In my datablock I have
datablock PlayerData(LightMaleHumanArmor)
{
emap = true;

Someone showed me how to make the image properly with alpha, in this thread
www.garagegames.com/mg/forums/result.thread.php?qt=64654
and this is the image I made as a test. there's just two rectangles that area actually used... the translucent box to the right is the metal texture:
www.eternalkingdoms.net/lut/sparthelm.png
I followed these instructions to the letter for setting up my materials in blender
jsgreenawalt.googlepages.com/HowToSetupTexturesAndMaterialsInBlenderForExportToT...

and it still doesn't work. here's a picture:

www.eternalkingdoms.net/lut/ss.jpg

post2:
Well, its several days later and i'm still trying to figure this out. I've tried the material setting in materials.cs
new Material(sparthelm)
{
baseTex[0] = "./sparthelm";
mapTo = "sparthelm"; //just in case
pixelSpecular[0] = true;
specular[0] = "0.5 0.5 0.5 0.5";
specularPower[0] = 30.0;
};

but it doesnt seem to take into account the alpha on the image and makes the entire thing shiny. and it just looks crappy
www.eternalkingdoms.net/proju/crap.jpgThis would work if there was a way to make it not look crappy :p...Do these material settings have anything to do with environment mapping, or are they two separate features? It doesn't use the alpha in my image so I'm still confused about that.

I read that you have to have varying levels of detail in your shape in order to make environment mapping work, here: www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2052
Is that what i need to do? Here's how i'm set up right now:
www.eternalkingdoms.net/proju/boxes.jpg

Am I missing something? any idea what I could have done wrong? thanks for reading :)

#1
07/17/2007 (8:31 am)
Try getting rid of the "map to" function, and play with the "specular power" setting, and you might find a color that better matches your effect. Hope that helps:)