Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (7th_zorro, TipmyPip, RealSerious3D), 892 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 6 1 2 3 4 5 6
Fixed-Function Terrain Multi-Texturing Effect #25126
04/07/04 06:14
04/07/04 06:14
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline OP
Serious User
Steempipe  Offline OP
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
I have been working on a Fixed-Function texture stage effect for mulit-texturing terrain. This is meant to be a fallback in the pixelshaders and also as an alternative.

This is using a 2 pass effect to keep stages under (2) in each pass. The textures are tiled using the texture transform matrix. The sand texture is blended using the alpha channel of a TGA.

I have included some fallback techniques, do not know if they are actually needed but I was having fun playing with this. I also may not be able test the fallbacks correctly. Feedback here, please.

This is done on 3DGameStudio A6.20.2 comm with a Radeon 9200 128 MB.

Goto my web site to get the Effect File, the Demo, or other info



This is adding another pass with a different alphamap and texture:



Please post mods, improvements, and if it does not work on your card please post the info pertaining to your card so I can know/learn.

Eric


Last edited by Steempipe; 04/07/04 06:32.
Re: Fixed-Function Terrain Multi-Texturing Effect [Re: Steempipe] #25127
04/07/04 07:24
04/07/04 07:24
Joined: Mar 2002
Posts: 1,123
California
Cellulaer Offline
Expert
Cellulaer  Offline
Expert

Joined: Mar 2002
Posts: 1,123
California

I get the Default Effect on a Geforce 4 Ti 4400 (1.3 Pixel Shaders).


Buy, Sell, & Archive Realtime 3D Content @ RedRock7.com *BETA* A5.5+ Plugin DLLs: GSADO, GSHTTP, GSImgLst, FreeMod, GSFlash, GSPython http://cellulear.slashbang.com/
Re: Fixed-Function Terrain Multi-Texturing Effect [Re: Cellulaer] #25128
04/07/04 07:41
04/07/04 07:41
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline OP
Serious User
Steempipe  Offline OP
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
Thanks for letting me know!! Hope it works on a wide array of cards.

Note:
The downloadable demo does not have the pass with the grey cracked crap. It should look like the first screenshot.

Eric


Re: Fixed-Function Terrain Multi-Texturing Effect [Re: Steempipe] #25129
04/07/04 08:15
04/07/04 08:15
Joined: Feb 2004
Posts: 19
makai Offline
Newbie
makai  Offline
Newbie

Joined: Feb 2004
Posts: 19
hey really great job steem!
the default worked for me too, with my nvidia geforce 4 go 64 (thats the mx version which doesn't support many shaders..)


but there are some graphic errors, some parts of the terrain seem to transparent.. have a look on this :






Last edited by makai; 04/07/04 08:28.
Re: Fixed-Function Terrain Multi-Texturing Effect [Re: makai] #25130
04/07/04 10:00
04/07/04 10:00
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline OP
Serious User
Steempipe  Offline OP
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
We'll have to fiddle with it.
I don't get that problem here, so it will be hard to troubleshoot.

Where does your alphamap live? Is it an entSkin or a mtlSkin?
Could you try adding the "my.tranparent=off" to your action, just in case?

Maybe try adding "zenable=true"

technique ffp_terrain_tex
{
pass P0
{

alphablendenable=false;
zenable=true; //<<<<<<<<<<<<<<<<

If need be can I get a publish of that level and see how it runs on my card?

I'll think on it a bit and get back to you in a Private message.

Eric


Last edited by Steempipe; 04/07/04 10:20.
Re: Fixed-Function Terrain Multi-Texturing Effect [Re: Steempipe] #25131
04/07/04 15:33
04/07/04 15:33
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
hey, great job. this works on a geforce2. this could be real helpfull fallback for my current work. thx for sharing your worx .


www.earthcontrol.de
quoted: We want to maintain a clean, decent, American family suited forum look... which means you may post zombies or chainsaw massacres, but no erotic.
Re: Fixed-Function Terrain Multi-Texturing Effect [Re: Steempipe] #25132
04/07/04 18:15
04/07/04 18:15
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline OP
Serious User
Steempipe  Offline OP
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
@ello: Thanks, this is good news.

@makai:
I had weird results with the textures if put the alphaTGA in the entSkins. I kept them as mtlSkins.

Lets see.... you could try adding the new things ("//<<<<<<< NEW") in the code, and playing with that. This might give you a start in a direction to tinker with it.

Let me know what happens so I can update the demo if need be before too many people get a hold of it.

technique ffp_terrain_tex
{
pass P0
{

alphablendenable=false;
alphatestenable=false; //<<<<<<< NEW
zenable=true; //<<<<<<< NEW
zwriteenable=true; //<<<<<<< NEW
cullmode=none; //<<<<<<< NEW
//
// Stage 0
//
Texture[0] = <entSkin1>;

magFilter[0]=linear;
minFilter[0]=linear;
mipFilter[0]=linear;




TextureTransformFlags[0] = Count2;
TextureTransform[0] = <matMtl>;
texcoordindex[0]=0;

ColorArg1[0] = Texture;
ColorOp[0] = selectarg1;

alphaop[0]=disable;

//
//stage 1
//
colorop[1]=disable;
alphaop[1]=disable;

}

pass P1
{

// We need to enable alphablending

alphablendenable=true;
srcblend=srcalpha;
destblend=invsrcalpha;
alphatestenable=true; //<<<<<<< NEW
cullmode=none; //<<<<<<< NEW
zenable=false; //<<<<<<< NEW
zwriteenable=false; //<<<<<<< NEW

//
// Stage 0
//
Texture[0] = <mtlSkin2>;

magFilter[0]=linear;
minFilter[0]=linear;
mipFilter[0]=linear;

//
// We don't want the alphamap to tile
//
TextureTransformFlags[0] = disable;

texcoordindex[0]=1;

ColorArg1[0] = current;
ColorOp[0] = selectarg1;
alphaarg1[0] = texture | alphareplicate;
alphaop[0]=selectarg1;

//
// Stage 1
//
Texture[1] = <entSkin2>;//sand

cullmode=none; //<<<<<<< NEW
zenable=true; //<<<<<<< NEW
zwriteenable=true; //<<<<<<< NEW

magFilter[1]=linear;
minFilter[1]=linear;
mipFilter[1]=linear;


TextureTransformFlags[1] = Count2;
TextureTransform[1] = <matMtl>;
texcoordindex[1]=0;

ColorArg1[1] = texture;
ColorOp[1] = modulate;
alphaarg1[1] = current | alphareplicate;
alphaop[1]=disable;

//
// Stage 2
//
colorop[2]=disable;
alphaop[2]=disable;


}


Eric


Re: Fixed-Function Terrain Multi-Texturing Effect [Re: Steempipe] #25133
04/07/04 18:20
04/07/04 18:20
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
you could add it to the wiki!

...
i think cullmode=none; just makes it slower and shouldn't be used.

Re: Fixed-Function Terrain Multi-Texturing Effect [Re: ventilator] #25134
04/07/04 18:43
04/07/04 18:43
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline OP
Serious User
Steempipe  Offline OP
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
Thats a good tip, leaving out cullmode, it is not necessary on my machine. Maybe everyone should leave that out. The code above is mainly for Makai to fiddle with and see if it can work.

Do you have any other suggestions?? You see, the thing ran fine on my card, but you see what happened on Makai's. What about the other things added in the "//<<<<<< NEW". I'm just learning, so most things are trial and error.

About the wiki, I am hoping that the code can be applicable across a varity of cards first. Needs testing and feedback. I am not going to change the code that is on the demo unless alot of people have problems. It will just get too confusing.

Thanks,
Eric




Re: Fixed-Function Terrain Multi-Texturing Effect [Re: Steempipe] #25135
04/07/04 23:59
04/07/04 23:59
Joined: Jan 2004
Posts: 585
Alexandria, VA
Alkai Offline
Developer
Alkai  Offline
Developer

Joined: Jan 2004
Posts: 585
Alexandria, VA
Excellent work, Steempipe!

I even tried it on my old pc with a 32mb Radeon 7500 card and it worked great!


If you gaze long into an abyss, the abyss will gaze back into you. 3.0 GHz Pentium 4 w/HT 1 Gig 400mhz DDR SDRAM 128mb NVidia GeForce FX 5200
Page 1 of 6 1 2 3 4 5 6

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