1 registered members (Ayumi),
662
guests, and 3
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: level textures with bump mapping
[Re: sriram]
#34463
10/09/04 06:45
10/09/04 06:45
|
Joined: Sep 2004
Posts: 1,214 Austin, Texas
Josh_Arldt
Senior Developer
|
Senior Developer
Joined: Sep 2004
Posts: 1,214
Austin, Texas
|
I don't think shaders on level geometry is fully supported by the engine yet. When it is fully supported all you have to do is set the var d3d_automaterial = 1; and rename your texture to the name of your material.
Shaders that work with the models skins will need to be modified for it to work.
In your shader.wdl or .fx there should be a place that says material bumpmap(or whatever you named your material). Open up wed and go to the textures. Change the name of your texture to bumpmap(or the name of your material).
Last edited by humansandbag; 10/09/04 06:47.
|
|
|
Re: level textures with bump mapping
[Re: Josh_Arldt]
#34464
10/10/04 07:34
10/10/04 07:34
|
Joined: Mar 2001
Posts: 3,298 Beverly, Massachusetts
Rhuarc
Expert
|
Expert
Joined: Mar 2001
Posts: 3,298
Beverly, Massachusetts
|
I don't know how many times I've had to say this... but bumpmapping isn't a problem on level geometry
Load this as your shader effect, setting the name of the material to match your texture name, setting d3d_automaterial = on, and setting the skin1 of the material to be a bmap defined above for the normal map. It's as simple as that...
Code:
matrix matWorldViewProj;
matrix matWorld;
texture mtlSkin1;
texture entSkin1;
texture entSkin2;
vector vecLight;
technique dot3map
{
pass p0
{
Texture[0] = <mtlSkin1>;//1te Skin im Model ist die Textur
Texture[1] = <entSkin2>;//1te Skin im Model ist die Textur
Texture[2] = <entSkin1>;//1te Skin im Model ist die Textur
TextureFactor = 0xFFFFFFFF;
COLOROP[0] = DotProduct3;
COLORARG1[0] = Texture;
COLORARG2[0] = TFactor;
TexCoordIndex[0] = 1;
COLOROP[1] = Modulate;
COLORARG1[1] = Texture;
COLORARG2[1] = Current;
TexCoordIndex[1] = 0;
magFilter[2]=Linear;
minFilter[2]=Linear;
mipFilter[2]=Linear;
COLOROP[2] = AddSigned;
COLORARG1[2] = Texture;
COLORARG2[2] = Current;
TexCoordIndex[2] = 1;
}
}
-Rhuarc
|
|
|
Re: level textures with bump mapping
[Re: Rhuarc]
#34465
10/10/04 08:11
10/10/04 08:11
|
Joined: Oct 2002
Posts: 815 NY USA
Red Ocktober
Developer
|
Developer
Joined: Oct 2002
Posts: 815
NY USA
|
hey Rhu... got any shots...
also... how does the lights affect the shaded geometry areas?
seeing as i'm primarily gonna be using bumpmapping, and i couldn't get the dx9 shaders working real well, i went back to 6.22...
what other shaders you got for dx9?
THANKS
--Mike
|
|
|
Re: level textures with bump mapping
[Re: Rhuarc]
#34466
10/10/04 08:22
10/10/04 08:22
|
Joined: Sep 2004
Posts: 1,214 Austin, Texas
Josh_Arldt
Senior Developer
|
Senior Developer
Joined: Sep 2004
Posts: 1,214
Austin, Texas
|
bumpmapping isn't a problem on level geometry ?
Every time I have tried my geometry has looked the same as the others or turned completely black or white. And it isn't my graphics card either. My card supports the right versions of pixel shader and vertex shader. I have also tried it on my other comp. with an ATI card.
I dunno, maybe I just suck at shaders.
BTW how can I properly load this .fx file into gstudio?
And don't you have to define the normalmap in the shader?
Last edited by humansandbag; 10/10/04 08:28.
|
|
|
Re: level textures with bump mapping
[Re: Rhuarc]
#34468
10/10/04 08:46
10/10/04 08:46
|
Joined: Sep 2004
Posts: 1,214 Austin, Texas
Josh_Arldt
Senior Developer
|
Senior Developer
Joined: Sep 2004
Posts: 1,214
Austin, Texas
|
Nice screen Rhuarc.
Does the lighting come from a lighting shader like in drews tutorial or wed lights?
Last edited by humansandbag; 10/10/04 08:48.
|
|
|
Re: level textures with bump mapping
[Re: Rhuarc]
#34469
10/10/04 08:50
10/10/04 08:50
|
Joined: Oct 2002
Posts: 815 NY USA
Red Ocktober
Developer
|
Developer
Joined: Oct 2002
Posts: 815
NY USA
|
ok... i'm convinced!!!
seriously, that looks nice...
yeah, i forgot you showed some shots of shaders on level geometry before...
6.31, right ?
also, yeah, what 'sandy asked above...
--Mike
|
|
|
Re: level textures with bump mapping
[Re: Red Ocktober]
#34470
10/10/04 11:39
10/10/04 11:39
|
Joined: Sep 2004
Posts: 1,214 Austin, Texas
Josh_Arldt
Senior Developer
|
Senior Developer
Joined: Sep 2004
Posts: 1,214
Austin, Texas
|
WOOT!!!
I finally got this working for me.
AND IT REACTS TO WED LIGHTS, AND SUN!!!(sorry for yelling but i am excited.)lol
Stupid me, the reason it wasn't working for me is 'cause I put var d3d_automaterial =1; instead of just d3d_automaterial = 1; lol
Last edited by humansandbag; 10/10/04 11:47.
|
|
|
|