2 registered members (AndrewAMD, NeoDumont),
761
guests, and 1
spider. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Question about terrain multitexture shader
#34419
10/05/04 06:46
10/05/04 06:46
|
Joined: Sep 2002
Posts: 700 Orange County, CA
LogantheHogan
OP
Developer
|
OP
Developer
Joined: Sep 2002
Posts: 700
Orange County, CA
|
I have a question about Steempipe's terrain multitexturing effect -
Is there any way to use detailmaps in conjunction with his shader? Like, for one of the tileable textures, have a smaller detail map, and then for the other, have a different detail map? I was playing Halo yesterday and I noticed that it looks like they did this. There are 2 terrain textures and both of the textures has its own detailmap, and it looked really good.
Thanks for any help.
Logan
P.S. Let's see if anyone can reply before I finish my homework! Only 10 more vocab words!
|
|
|
Re: Question about terrain multitexture shader
[Re: Steempipe]
#34425
10/05/04 09:27
10/05/04 09:27
|
Joined: Aug 2001
Posts: 2,320 Alberta, Canada
William
Expert
|
Expert
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
|
Would I be able to do some testing of you new shader as well? I couldnt convert your old one completely to directx 9, just the FFP part of it... it seems to run a bit slower than the pixelshader/vertexshader version of it. I cant seem to convert the pixelshader version of it right. Also, while I got the FFP version of it working right I cant seem to get the textures to change there uvscale independantly. Hope your new shader will be able to do this stuff - Thanks, I also appreciate all the hard work your putting into progressing shaders in 3DGS!! BTW - Steempipes FFP shader edited slightly to work with DX9 Code:
/////////////////////////////////////////////////////////// // FFP Terrain MultiTexturing Effect // // By: Eric A. Hendrickson-Lambert (Steempipe) //
bmap grass = <ashpalt3.bmp>;//gets blended with the blue channel bmap Alpha_M = <pointysharpparkt.tga>; // Alpha Map/texture
function mtl_terraintex_init() { bmap_to_mipmap(mtl.skin2); // Adjust the texture transform to do some tiling of the textures mtl.matrix11 = float(1); // Tileing of the textures mtl.matrix22 = float(1); // Tileing of the textures }
material mat_terraintex { Skin1 = grass; Skin2 = Alpha_M;
event = mtl_terraintex_init; effect = " texture mtlSkin1; // Grass texture mtlSkin2; // alphamap
matrix matWorldViewProj; matrix matWorld; matrix matWorldView;
vector vecSunDir; vector vecDiffuse; vector vecAmbient; vector vecLight; vector vecFog; vector vecSkill41;
matrix matMtl;
// default technique technique ffp_terrain_tex { pass P0 { //fillmode = wireframe;
alphablendenable=false; Texture[0] = <mtlSkin1>;
magFilter[0]=linear; minFilter[0]=linear; mipFilter[0]=linear; TextureTransformFlags[0] = Count2; TextureTransform[0] = <matMtl>; texcoordindex[0]=1;
colorArg1[0] = Texture; colorOp[0] = selectarg1; alphaop[0]=disable; colorop[1]=disable; alphaop[1]=disable; //disable, modulate, modulate2x, modulate4x, add, subtract, addsigned, addsigned2x, tfactor, dotproduct3, envbumpmap, envemumap }
pass P1 { alphablendenable=true; // We need to enable alphablending srcblend=srcalpha; destblend=invsrcalpha;
Texture[0] = <mtlSkin2>;
magFilter[0]=linear; minFilter[0]=linear; mipFilter[0]=linear; TextureTransformFlags[0] = disable;// We don't want the alphamap to tile texcoordindex[0]=0; colorArg1[0] = current; colorOp[0] = selectarg1; alphaarg1[0] = Texture | alphareplicate; alphaop[0]=selectarg1;
Texture[1] = <mtlSkin2>;//sand
magFilter[1]=linear; minFilter[1]=linear; mipFilter[1]=linear; TextureTransformFlags[1] = Count2; TextureTransform[1] = <matMtl>; texcoordindex[1]=1;
colorArg1[1] = Texture; colorOp[1] = addsigned; alphaarg1[1] = current | alphareplicate; alphaop[1]=disable; // colorop[2]=modulate; alphaop[2]=disable; } } "; // end of the effect string }
action Terrain { my.ambient = 4; //change brightness my.material = mat_terraintex; }
|
|
|
Re: Question about terrain multitexture shader
[Re: LogantheHogan]
#34428
10/22/04 10:19
10/22/04 10:19
|
Joined: Dec 2003
Posts: 1,097 Maryland, USA
Steempipe
Serious User
|
Serious User
Joined: Dec 2003
Posts: 1,097
Maryland, USA
|
Good news LoganTheHogan & William, we are getting closer to a desirable DX9 FFP Multitex effect. Not running too bad, about the same as my pixelshader version with as many textues. Tweaking and optimizing is the next step. The colormap is just a basic big skin stretched across the land... but when all done we will be able to apply tileable textures in it's place. Here are (3) Detailmaps applied, based on blendmaps And here is showing that lighting is working across all blends. finally. Soon I will be notifying you of code downloads. Eric
|
|
|
|