Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Steempipes FFP MultiTexturing and Multi Terrains #48036
06/18/05 02:08
06/18/05 02:08
Joined: Jun 2005
Posts: 656
G
Grafton Offline OP
User
Grafton  Offline OP
User
G

Joined: Jun 2005
Posts: 656
I would like to use Steempipes fantastic FFP MultiTexturing terrain shader
that is on his website dated 4/7/04. I have split a terrain in several tiles,
each has materials applied, and I have made alpha maps for each of them.

How can I use this when I have several pieces with different alphamaps? Is
there a way I can pass the alphamaps to the material, through each terrains
action? Surely I dont have to make a copy for each terrain...

Also do I have to rename the "ffptertex.wdl" to "ffptertex.fx" and include it
in my main?


Thanks for any hints, suggestions, ideas, and especially solutions!


Not two, not one.
Re: Steempipes FFP MultiTexturing and Multi Terrains [Re: Grafton] #48037
06/18/05 03:55
06/18/05 03:55
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline
Serious User
Steempipe  Offline
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
The quick answer is that you can put a fallback Colormap (for use with a detailmap) in entSkin1 RGB and then store that terrains blendmap in the A channel of entskin1. Or, just store a tex with the A channel blendmap in entSkin1. Then each terrain will have it's own blendmap callable by entSkin1 in the material. However, there will probably be some z-sorting issues then, which I have never looked into too deep. I all this would require some modifications to the code.... which leads to this....

If you are using DX9.0c and 6.31, and since I have not updated the cpde on the website, there will be some syntax changes needed and the zbias thing removed. So regardless of whether you break it into a loadable FX file, or keep it as is, it will need some changes. I can always help you out there if you need.

Good luck!

Re: Steempipes FFP MultiTexturing and Multi Terrains [Re: Steempipe] #48038
06/18/05 04:43
06/18/05 04:43
Joined: Jun 2005
Posts: 656
G
Grafton Offline OP
User
Grafton  Offline OP
User
G

Joined: Jun 2005
Posts: 656
Thanks for the reply Steempipe!

I am not sure I get what you mean, I thought storing the alpha maps in the
models skins gave funny results? And I have 2 blendmaps per terrain!

I can remove the "Zbias=1;" from the code, but I wondered if the shader files had to be made "fx" files because of their size?

I am not too up on the shaders, so maybe I am off base.

I noticed your 5 texture FFP shader has different code, But I only wanted to
use 3 textures due to memory and performance issues, so I choose this one from
your site. But maybe it would be best if I just used the 5 tex FFP shader
posted on this forum afterall?

Thanks for the help, And Thanks for contributing these awesome shaders
Steempipe!


Not two, not one.
Re: Steempipes FFP MultiTexturing and Multi Terrains [Re: Grafton] #48039
06/18/05 19:34
06/18/05 19: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
Take the current (5) texture one and eliminate the passes you do not want.

If I can get some time, I'll try and work on the entskin thing. However, right now I am very busy with my work so it may be any number of weeks.

Re: Steempipes FFP MultiTexturing and Multi Terrains [Re: Steempipe] #48040
06/19/05 18:42
06/19/05 18:42
Joined: Jun 2005
Posts: 656
G
Grafton Offline OP
User
Grafton  Offline OP
User
G

Joined: Jun 2005
Posts: 656
I thought I would mention a slight work around I am using, maybe it will
interest someone else.

I have several terrain tiles that "treadmill" into a endless landscape, and I
am bending 3 textures which requires two alphamaps.

I used the original heightmap which I used to make the original terrain before
I split it into several "tiles", and made two large alpha maps from it in
photoshop using "levels".

So, instead of having seperate alphamaps for each tile, I use these two large
alpha maps.

Since each of the two alphas cover the whole set of tiles, I have to use them
as mtlskins instead of entskins.

Now in my definition of the alphamap, I incude which area of the map the
particular tile should use.

For instance, if you are blending 3 textures and have your terrain split into
nine "tiles", and the two alphamaps for the blending are 768 x 768 then

Code:
 

bmap blendmap1a = <Alpha_Low.tga>,0,0,256,256; //area of alphamap for terrain tile #1
bmap blendmap1b = <Alpha_High.tga>,0,0,256,256;
//
bmap blendmap2a = <Alpha_Low.tga>,256,0,256,256; //area of alphamap for terrain tile #2
bmap blendmap2b = <Alpha_High.tga>,256,0,256,256;
//
bmap blendmap3a = <Alpha_Low.tga>,512,0,256,256; //area of alphamap for terrain tile #3
bmap blendmap3b = <Alpha_High.tga>,512,0,256,256;
//
bmap blendmap4a = <Alpha_Low.tga>,0,256,256,256; //area of alphamap for terrain tile #4
bmap blendmap4b = <Alpha_High.tga>,0,256,256,256;
//
bmap blendmap5a = <Alpha_Low.tga>,256,256,256,256; //area of alphamap for terrain tile #5
bmap blendmap5b = <Alpha_High.tga>,256,256,256,256;
//
bmap blendmap6a = <Alpha_Low.tga>,512,256,256,256; //area of alphamap for terrain tile #6
bmap blendmap6b = <Alpha_High.tga>,512,256,256,256;
//
bmap blendmap7a = <Alpha_Low.tga>,0,512,256,256; //area of alphamap for terrain tile #7
bmap blendmap7b = <Alpha_High.tga>,0,512,256,256;
//
bmap blendmap8a = <Alpha_Low.tga>,256,512,256,256; //area of alphamap for terrain tile #8
bmap blendmap8b = <Alpha_High.tga>,256,512,256,256;
//
bmap blendmap9a = <Alpha_Low.tga>,512,512,256,256; //area of alphamap for terrain tile #9
bmap blendmap9b = <Alpha_High.tga>,512,512,256,256;



If you do it this way, you have two blendmaps instead of 18. Also you can
easily modify the alphamaps and not have to worry about where the edges of
tiles meet! It would be difficult with 18 maps whose edges have to tile.

Now if there where only a way to define these alphamaps in each tiles action,
then pass it to the material. Too bad materials dont take parameters like
functions do.


Not two, not one.

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