BumpTex not working and a super speed up!
by J · in Torque Game Engine Advanced · 02/19/2009 (1:07 pm) · 9 replies
I'm having a heck of time here...
I've went through all my materials.cs and nothing is out of whack there. Tried it on a DTS and Dif...same thing...
Now I had 1.7.1 and I couldn't get any shaders, bloom, DRL, Toning, nothing seemed to work there. I do have TGE 1.5.2 with the Mod Kit and all the shaders work fine in there, no problems.
So I downloaded the new 1.8.1 and low and behold...every thing works!!! Ah...almost... Bloom and DRL are kickin. I can get specular to work just fine... but I can't get detailTex or the bumpTex to work...
I do realize how to make, and the difference between bump and normal...
I have previously upgraded my DirectX, I have the November 2008 version of the SDK. (if that matters), hmmm...well it was worth a shot, a new install versus one I've compiled..doesn't make a difference
I just upgraded all my drivers a few minutes ago (got about a 5% increase in frame rate in TGEA 1.8.1, pretty neat; didn't make much difference in 1.5.2)
There are no errors or anything in the console...it just doesn't work...
So I figured its either in the shader and I don't know enough about shaders yet to even begin messing up the engine,
Or its my computer (after seeing the 1.5.2, and 1.7.1 to 1.8.1 difference, I think its a shader bug) But I'm running Windows Vista Ultimate SP1, Nvidia GeForce 8700 GT x2 SLI Tech.,
Or its a bug that was almost completely fixed in transition between 1.7.1 and 1.8.1 that I could not find any info on.
Any ideas?
Also, something I found interesting... what do most of you guys get with your frame rates? With a newMission type level, with next to nothing in there, I was getting terrible frame rates like 32 to 47. I never could get it working any faster...found out that the screen resolution was the culprit! Went from 40s(1280x1024) to 340fps(fullscreen). Neat! Not for sure if this is my computer or a bug though.
I've went through all my materials.cs and nothing is out of whack there. Tried it on a DTS and Dif...same thing...
Now I had 1.7.1 and I couldn't get any shaders, bloom, DRL, Toning, nothing seemed to work there. I do have TGE 1.5.2 with the Mod Kit and all the shaders work fine in there, no problems.
So I downloaded the new 1.8.1 and low and behold...every thing works!!! Ah...almost... Bloom and DRL are kickin. I can get specular to work just fine... but I can't get detailTex or the bumpTex to work...
I do realize how to make, and the difference between bump and normal...
I have previously upgraded my DirectX, I have the November 2008 version of the SDK. (if that matters), hmmm...well it was worth a shot, a new install versus one I've compiled..doesn't make a difference
I just upgraded all my drivers a few minutes ago (got about a 5% increase in frame rate in TGEA 1.8.1, pretty neat; didn't make much difference in 1.5.2)
There are no errors or anything in the console...it just doesn't work...
So I figured its either in the shader and I don't know enough about shaders yet to even begin messing up the engine,
Or its my computer (after seeing the 1.5.2, and 1.7.1 to 1.8.1 difference, I think its a shader bug) But I'm running Windows Vista Ultimate SP1, Nvidia GeForce 8700 GT x2 SLI Tech.,
Or its a bug that was almost completely fixed in transition between 1.7.1 and 1.8.1 that I could not find any info on.
Any ideas?
Also, something I found interesting... what do most of you guys get with your frame rates? With a newMission type level, with next to nothing in there, I was getting terrible frame rates like 32 to 47. I never could get it working any faster...found out that the screen resolution was the culprit! Went from 40s(1280x1024) to 340fps(fullscreen). Neat! Not for sure if this is my computer or a bug though.
About the author
I used to be obsessed with building my own open-ended RPG and a 3D Side Scroller RPG. But the job/house/girlfriend got in the way. I know, I know. Now I concentrate on doing architectural renderings (with the help of T3D of course) and VBA programming.
#2
new Material(basebuggy)
{
mapTo = "base_buggy.png"; << --- this is the material name
baseTex[0] = "base_buggytrans"; << --- this is the diffuse texture
bumpTex[0] = "buggyn"; << --- This is the normal map
pixelSpecular[0] = true;
specular[0] = "1.0 1.0 1.0 1.0";
specularPower[0] = 16.0;
};
PS - you need to go back to the August SDK, the November SDK has bugs.
02/20/2009 (5:46 pm)
Yeah, Bumptex works. Here's a working material with normal mapping:new Material(basebuggy)
{
mapTo = "base_buggy.png"; << --- this is the material name
baseTex[0] = "base_buggytrans"; << --- this is the diffuse texture
bumpTex[0] = "buggyn"; << --- This is the normal map
pixelSpecular[0] = true;
specular[0] = "1.0 1.0 1.0 1.0";
specularPower[0] = 16.0;
};
PS - you need to go back to the August SDK, the November SDK has bugs.
#3
It has to be the DirectX. I know GLSL shaders work just fine out of book examples I'm working on and in Alex's Mod Kit on TGE 1.5.2.
I got August downloaded. I'll try it tonight.
02/23/2009 (6:00 am)
Thanks for the reply Jaimi,It has to be the DirectX. I know GLSL shaders work just fine out of book examples I'm working on and in Alex's Mod Kit on TGE 1.5.2.
I got August downloaded. I'll try it tonight.
#4
Well, never mind...it has to have something to do with the mission lighting. I'm still puzzled though...it works fine in the Forge Demo(kind of, only faces recieving light show up), but it doesn't work in the T3D example. So I re-exported my dts and dif with different textures, now you can see the bumpTex, but only on the faces that are recieving sunlight. If you spin the object, then you can sometimes see the whole thing normal mapped; sometimes no mapping at all.
I don't know. A bug with the lighting or shader I guess... Makes things look really bad. The face with the most light is overkill and the faces on the side look about right, but the face on the back shows no bumpTex at all. If you set your elevation to 90 and azmuith to 0, you get the whole object showing the bumpTex, but then it is overkill.
BUG BUG BUG
02/23/2009 (12:03 pm)
Jaimi,Well, never mind...it has to have something to do with the mission lighting. I'm still puzzled though...it works fine in the Forge Demo(kind of, only faces recieving light show up), but it doesn't work in the T3D example. So I re-exported my dts and dif with different textures, now you can see the bumpTex, but only on the faces that are recieving sunlight. If you spin the object, then you can sometimes see the whole thing normal mapped; sometimes no mapping at all.
I don't know. A bug with the lighting or shader I guess... Makes things look really bad. The face with the most light is overkill and the faces on the side look about right, but the face on the back shows no bumpTex at all. If you set your elevation to 90 and azmuith to 0, you get the whole object showing the bumpTex, but then it is overkill.
BUG BUG BUG
#5
02/26/2009 (3:45 pm)
@J: Can you please post a screenshot of the issue, and upload the model, texture, and material which demonstrate it? If you don't have anywhere to upload just email me directly and I can provide you with a dropbox.
#6
I deleted my original dts that I was messing with, but I redid a few tests in the Forge Demo and T3D with some cubes so you can see what I'm talking about.
http://act7gaming.com/images/bumpTex_Test.zip
02/27/2009 (8:57 am)
Alex,I deleted my original dts that I was messing with, but I redid a few tests in the Forge Demo and T3D with some cubes so you can see what I'm talking about.
http://act7gaming.com/images/bumpTex_Test.zip
#7
1) It looks like your cube model is using "smoothed" or "averaged" normals, is that right? If so, you'll get incoherent lighting since the normals differ far too much from the actual surface.
2) You'll never see "bumps" on the faces facing away from the light, because normal mapping is a lighting effect which depends on light direction. Surfaces facing away from the sun are only affected by ambient light, which has no direction and thus doesn't "shows" the normal map.
(You can kind of get around that by setting up a dynamic light datablock with infinite radius and a low intensity and place it very far away, in the opposite direction of the sun, using it as an ambient light instead.)
02/27/2009 (10:38 am)
Two things:1) It looks like your cube model is using "smoothed" or "averaged" normals, is that right? If so, you'll get incoherent lighting since the normals differ far too much from the actual surface.
2) You'll never see "bumps" on the faces facing away from the light, because normal mapping is a lighting effect which depends on light direction. Surfaces facing away from the sun are only affected by ambient light, which has no direction and thus doesn't "shows" the normal map.
(You can kind of get around that by setting up a dynamic light datablock with infinite radius and a low intensity and place it very far away, in the opposite direction of the sun, using it as an ambient light instead.)
#8
The normals are averaged, I also made the girder bump a little different than the stonewall, could be my very problem. I probably shouldn't be comparing Alex's TGE mod kit to TGEA because it is all setup different, but those bumps look fine there.
I'll try your lighting trick tonight Manoel.
Also, I noticed that the forge demo has a lot of extra lighting and fancy effects in it. That might be what is making the bump show up there with no problem.
I'll keep messing around. And post some more pics here if I find anything else.
Thanks for the help guys, really appreciate it.
02/27/2009 (3:22 pm)
The normals are averaged, I also made the girder bump a little different than the stonewall, could be my very problem. I probably shouldn't be comparing Alex's TGE mod kit to TGEA because it is all setup different, but those bumps look fine there.
I'll try your lighting trick tonight Manoel.
Also, I noticed that the forge demo has a lot of extra lighting and fancy effects in it. That might be what is making the bump show up there with no problem.
I'll keep messing around. And post some more pics here if I find anything else.
Thanks for the help guys, really appreciate it.
#9
02/27/2009 (4:54 pm)
I used this trick with TGE ages ago (using two suns) and it helped a lot in making things less flat in shadowed areas. For normal-mapped geometry something that provides light vectors for surfaces which aren't being directly lit is key to get rich visuals, but by default TGEA doesn't include something like this (rim-lighting, hemisphere-lighting or ambient cubemaps).
Torque Owner J
Act 7