Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Ayumi), 1,405 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Multi Texture Terrain - Help Needed!! :S #391122
01/08/12 18:52
01/08/12 18:52
Joined: Jul 2009
Posts: 28
N
Norby Offline OP
Newbie
Norby  Offline OP
Newbie
N

Joined: Jul 2009
Posts: 28
Hi guys!

Can someone tell me EXACTLY how to create "high resolution"multi-texture terrain?


I've created a terrain already in 3ds max. Than unwrapped the UVs and painted the stuff in Photoshop. Than back to 3ds ->export to MED -> save it.

So it works that way, but the textures look very very BAD when you are close. So its not good that way.


Than I found in the shader library that "mtl_terraintex" thingy. It sounds goood but dont know how it works exactly.
I can create alpha channel TGAs in Photoshop its not a problem.

But how do you assign multiple alpha layer textures to a whole terrain?? I tried all day but cant figure it out.

IF someone knows the answer please help me! THANX!!

Re: Multi Texture Terrain - Help Needed!! :S [Re: Norby] #391129
01/08/12 19:58
01/08/12 19:58
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
everything you need is written in the mtlfx.c

Here:
Code:
//action: fx_terraintex3
//title: 3-Textures Terrain 
//
//skill2: ScaleSkin2 15
//help: Skin2 base texture scale, 1..50, default 15.
//skill3: ScaleSkin3 15
//help: Skin3 red texture scale, 1..50, default 15.
//skill4: ScaleSkin4 15
//help: Skin4 green texture scale, 1..50, default 15.
//desc:
/// Blends 3 textures together, according to
/// the red and green channel in the first skin.
/// The blue channel can be used for a shadow map. 
/// Skin1 = Terrain RGB blend & shadow mask.
/// Skin2 = Base tiled terrain texture (grass).
/// Skin3 = Red channel masked tiled texture (sand).
/// Skin4 = Green channel masked tiled texture (rock).
/// Skin5 = Optional base texture for non-shader hardware.
/// Skin6 = Optional detail texture for non-shader hardware.
//
//Based on ideas by Thomas 'ventilator' Oppl
//and Eric 'Steempipe' Hendrickson-Lambert
//




Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Multi Texture Terrain - Help Needed!! :S [Re: Espér] #391133
01/08/12 20:46
01/08/12 20:46
Joined: Jul 2009
Posts: 28
N
Norby Offline OP
Newbie
Norby  Offline OP
Newbie
N

Joined: Jul 2009
Posts: 28
Thanks for your answer!

Can you give me an example code how does it works exactly?

1. I create a terrain
2. Texture1: RGB map
3. Texture2: Grass (etc.)
4. Texture3: Sand
5. Apply fx_terraintex3 action

Than? O.o

Re: Multi Texture Terrain - Help Needed!! :S [Re: Norby] #391135
01/08/12 20:57
01/08/12 20:57
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
1.)
I think creating a terrain is not that great problem.. (you said that you created one with 3dsmax)

2. - 4.)
you just set the blendmap on your modelskin 1 (in MED)

The blendmap is:
Black = 2nd Modelskin
Red color = 3rd modelskin
Green Color = 4th modelskin

Skin 5 and 6 of the model are for players with PCs of non-shader compatible hardware.

All you need to do is draw a Black/Green/Red Picture and set this as Skin1
On Skin 2-4 you set different Textures.. f.e.:
Skin2 = Grass
Skin3 = Sand
Skin4 = Rock

5.) just use
Code:
entityname.material = mtl_terraintex3;



the difference between mtl_terraintex3 and mtl_terraintex is:
http://www.conitec.net/beta/amaterial2.htm#mtl_terraintex


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Multi Texture Terrain - Help Needed!! :S [Re: Espér] #391136
01/08/12 21:13
01/08/12 21:13
Joined: Jul 2009
Posts: 28
N
Norby Offline OP
Newbie
Norby  Offline OP
Newbie
N

Joined: Jul 2009
Posts: 28
Thank you a lot!! I'll try it.

Re: Multi Texture Terrain - Help Needed!! :S [Re: Norby] #414081
12/22/12 15:28
12/22/12 15:28
Joined: Nov 2012
Posts: 32
T
thorus Offline
Newbie
thorus  Offline
Newbie
T

Joined: Nov 2012
Posts: 32
anyone have an idea why the texture of the terrain wich was created with the terraintex3 fx doesnt show the camera.ambient?

Re: Multi Texture Terrain - Help Needed!! :S [Re: thorus] #414082
12/22/12 15:34
12/22/12 15:34
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
maybe terrain material ambient is zero


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Multi Texture Terrain - Help Needed!! :S [Re: sivan] #414084
12/22/12 15:38
12/22/12 15:38
Joined: Nov 2012
Posts: 32
T
thorus Offline
Newbie
thorus  Offline
Newbie
T

Joined: Nov 2012
Posts: 32
sorry for the question but where in the fx_terraintex3 code can i raise the terrain ambient?

Re: Multi Texture Terrain - Help Needed!! :S [Re: thorus] #414087
12/22/12 17:36
12/22/12 17:36
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
not in the fx, but in the MATERIAL definition, where you assigned effect="terraintex3.fx"; you can set ambient.red .green and .blue. as I know the fx gets these values by the engine and uses them in the fx.


Free world editor for 3D Gamestudio: MapBuilder Editor

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