Normal Mapping - need help

Posted By: Locutus_of_Borg

Normal Mapping - need help - 01/18/05 06:18

Hi, I have a problem.
I don't really get it with the normal mapping....
I want the Map react on static and dynamic light. But it won't react on both!
I will now post my screens, code and fx file!
GeForce FX 5900XT
3D GameStudio Comm A6.31






FX-File

Code:
bmap NORMALTEX = <floor1DOT3.tga>;

material floor1
{
skin1=NORMALTEX;
flags=tangent;
}

starter load_fx
{
bmap_to_mipmap(floor1.skin1);
effect_load(floor1,"bump_diffuse.fx");

}

And all that for 5 textures!

Now, how do I get the Textures look not so yellow and how do I get them realistic.
I tried other fx-files with that code, but the textures are all black!

Thanks for help!
Posted By: MASTERJUNOJET

Re: Normal Mapping - need help - 01/18/05 06:32

Ill take a stab at it, perhaps you forgot the action
Code:

action floor_lighting
{
my.material = floor1;
}


Just apply that to the floor, so the floor would have to be an entity or maybe a model. (Entity would work better in my opinion)

Hope this helps
Posted By: Locutus_of_Borg

Re: Normal Mapping - need help - 01/18/05 06:35

but then I'd have to do the whole house as an map-entity.
That would not be so good!
Posted By: MASTERJUNOJET

Re: Normal Mapping - need help - 01/18/05 06:49

Yeah its a shame that you can attach actions to blocks...however thats the only way to have it influenced by dynamic light. BTW, where did you get the FX file? Is it better that the ultimate lighting shader pack one? Because Im currently working with dynamic lights at this very moment in my project.
Posted By: Locutus_of_Borg

Re: Normal Mapping - need help - 01/18/05 07:19

found it in the forum!
Forgive me, but I don't know where!
It is not better, but the only thing I got working!

I don't get the "Ultimate Shader Pack" working!
How do you do that?
Posted By: MASTERJUNOJET

Re: Normal Mapping - need help - 01/18/05 09:11

It works almost the exact same way, only there are two seperate actions, one for world geometry and one for models.
Posted By: Nadester

Re: Normal Mapping - need help - 01/18/05 11:02

Quote:

Yeah its a shame that you can attach actions to blocks...however thats the only way to have it influenced by dynamic light.



No it's not, by using matt aufterheide's ultimate lighting pack, you can have up to 7 dynamic lights. And the floor doesn't have to be an entity, just a standard WED block. If the material name is the same as a texture's name, everything in the level with that texture will get that material. Simple enough.
Posted By: MASTERJUNOJET

Re: Normal Mapping - need help - 01/18/05 12:21

I meant for the FX file he is using, Matts shader can illuminate anything.
Posted By: Nadester

Re: Normal Mapping - need help - 01/18/05 12:26

Oh I see, I assumed you made that statement in general to all material effects.
Posted By: Matt_Aufderheide

Re: Normal Mapping - need help - 01/18/05 14:59

Having looked over this .fx file, the reason you dont get lights reacting is that the shader doesn't do dynamic lights.. this a "cheap" shader which uses lightmapping to fake the lights. Use my Ulimate Lighting Pack to do dynamic lighting.
Posted By: Locutus_of_Borg

Re: Normal Mapping - need help - 01/18/05 18:34

When I try to use you shader, than everything is just black and does not react on anything! Not even static lights!

But thanks for helping me!
Posted By: slacer

Re: Normal Mapping - need help - 01/18/05 18:39

Maybe your card only supports ps 2.0 and vs 2.0
Geforce FX has no support for 3.0 shaders - at least from what I see in the wiki.

I had to step back to the 2.0 shader support, too.

-- slacer
Posted By: Locutus_of_Borg

Re: Normal Mapping - need help - 01/18/05 22:17

yes it does only suppoer 1 and 2!
But Mats shader is 3.0!
Now how to get it back to 2.0?
Posted By: slacer

Re: Normal Mapping - need help - 01/18/05 23:29

In the same tread is a version 2.0 shader.
Just open the thread (all posts) and do a text search backwards until you find it.

-- slacer
Posted By: Matt_Aufderheide

Re: Normal Mapping - need help - 01/19/05 03:06

Once the next gamestudio version comes out i will make a new Shader with improvements. For now there should be a 2.0 version somewhere.
Posted By: MASTERJUNOJET

Re: Normal Mapping - need help - 01/19/05 14:06

My GeForce FX 5600 can run the ultimate lighting shader effect perfectly.
v.66.93 driver
Posted By: Locutus_of_Borg

Re: Normal Mapping - need help - 01/19/05 20:20

Well I found the test level with the v2 and v3 shader but it looks like this:


When I use the file: normalmap_level_ps2.0.fx
I can see that it works, but the Textures are all very very small scaled!
when you get close to them, you can see that it works but why are they so small?


I updated my graphik-driver but it did not help!
Posted By: Red Ocktober

Re: Normal Mapping - need help - 01/19/05 23:12

congrats on getting em working... it can be a lil confusing/frustrating the very first go round....

... and the second, and the third

but soon it'll come as second nature...



ok, as far as the scaling thing you're experiencing... do this...

open up the shader in a text editor and look for this line of code

Out.Tex = texcoord0.xy*40;

the value at the end may be different than the example i am showing, this is the value i changed to get the textures scaled properly for my particular application.

play with the last value a bit to get the desired effect...



also, the following line affects the light falloff

float LightRange = 0.0001;

again, the last value in my example may be different...


and

float4 gloss = tex2D( sBumpMap, psInStruct.Tex )/32;

will affect the glossiness of the materials appearance...


good luck, i hope this helps a bit

--Mike
Posted By: Locutus_of_Borg

Re: Normal Mapping - need help - 01/20/05 00:26

ok, th etestlevel works now!
Next stepm is to add it to my level...
Posted By: Red Ocktober

Re: Normal Mapping - need help - 01/20/05 01:05

... your welcome, glad you got it working


--Mike
Posted By: Locutus_of_Borg

Re: Normal Mapping - need help - 01/20/05 02:04

mhhhhh... well in my level, there is everything very strange, look at the screen:

Posted By: Locutus_of_Borg

Re: Normal Mapping - need help - 01/20/05 02:20

ok, I finaly got it working!
Now what do you think about this:

Posted By: Locutus_of_Borg

Re: Normal Mapping - need help - 01/21/05 00:22

Can anybody tell me a trick that the wood-wall-texture does not look so "wet/slippy" because for that kind of house, this is not really good! (look at screenshot above)
And how do I get the hole scene darker? It's night in the game!

EDIT: Oh and I almost forgot, is there a way to get static shadows and to get a higher FPS?
© 2024 lite-C Forums