Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
basik85278
by basik85278. 04/28/24 08:56
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Quad), 755 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
Question about terrain multitexture shader #34419
10/05/04 06:46
10/05/04 06:46
Joined: Sep 2002
Posts: 700
Orange County, CA
L
LogantheHogan Offline OP
Developer
LogantheHogan  Offline OP
Developer
L

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: LogantheHogan] #34420
10/05/04 07:53
10/05/04 07:53
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline
Serious User
Steempipe  Offline
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
Yes... possible... My current FFP effect has a unique detailmap for each texture. It still needs some cleaning up though, as I have had to abandon it.

Re: Question about terrain multitexture shader [Re: Steempipe] #34421
10/05/04 08:07
10/05/04 08:07
Joined: Sep 2002
Posts: 700
Orange County, CA
L
LogantheHogan Offline OP
Developer
LogantheHogan  Offline OP
Developer
L

Joined: Sep 2002
Posts: 700
Orange County, CA
Thanks Steempipe, this isn't the effect thats currently on your Terrain page on your site, is it?

Re: Question about terrain multitexture shader [Re: LogantheHogan] #34422
10/05/04 08:34
10/05/04 08:34
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline
Serious User
Steempipe  Offline
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
No.. it's not. That one is way outdated. I really need to get the website updated one of these days.

Since I need to incorporate the effect into a current project, it needs to be cleaned up very, very, very soon.

I'll send it to you when I've got it under control and you can help test it. I would say that it will be ready by the 12th of Oct, hopefully sooner.

Re: Question about terrain multitexture shader [Re: Steempipe] #34423
10/05/04 08:44
10/05/04 08:44
Joined: Sep 2002
Posts: 700
Orange County, CA
L
LogantheHogan Offline OP
Developer
LogantheHogan  Offline OP
Developer
L

Joined: Sep 2002
Posts: 700
Orange County, CA
OK thanks for the help, Steempipe! I really appreciate all you are doing for the community as far as shaders, terrains and such. Just thought you should know that.

Logan

Re: Question about terrain multitexture shader [Re: LogantheHogan] #34424
10/05/04 08:49
10/05/04 08:49
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline
Serious User
Steempipe  Offline
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
Cool. Thanks for saying that.

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 Offline
Expert
William  Offline
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;
}




Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/
Re: Question about terrain multitexture shader [Re: William] #34426
10/20/04 09:27
10/20/04 09:27
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline
Serious User
Steempipe  Offline
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
After I work on getting multiple detailmaps in this thing, then my DX 9 FFP terrain effect should be ready to test. Hope it will work soon...

@LoganTheHogan & William: I'll send you a link when it is ready to test.



Re: Question about terrain multitexture shader [Re: Steempipe] #34427
10/20/04 10:10
10/20/04 10:10
Joined: Sep 2002
Posts: 700
Orange County, CA
L
LogantheHogan Offline OP
Developer
LogantheHogan  Offline OP
Developer
L

Joined: Sep 2002
Posts: 700
Orange County, CA
Thanks, looks nice.

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 Offline
Serious User
Steempipe  Offline
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

Page 1 of 3 1 2 3

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1