Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
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
4 registered members (degenerate_762, AbrahamR, AndrewAMD, ozgur), 667 guests, and 8 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 texturing/texture blending for models #417731
02/16/13 17:36
02/16/13 17:36
Joined: Apr 2002
Posts: 680
Germany
Turrican Offline OP
User
Turrican  Offline OP
User

Joined: Apr 2002
Posts: 680
Germany
Hi,

I'm looking for a way to apply multiple tiling textures with adjustable scale/ratio to a normal model, which is going to be the base architecture for my level. I also want these textures to blend smoothly and on top of that, I want to apply a pre-baked lightmap later on.

I figured the best solution for my problem would be to use mtl_terraintex as material, even though I'm not using a terrain at all, as this FFP offers everything I want - but it sadly has absolutely no effect.

I've set up the skin textures as described in the manual and all I got was this:



Now, as I barely have any idea of shader programming, I would like to ask you to help me out. Any ideas (or even full code examples laugh ) appreciated!

Re: Multi texturing/texture blending for models [Re: Turrican] #417732
02/16/13 17:50
02/16/13 17:50
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Originally Posted By: Turrican
I figured the best solution for my problem would be to use mtl_terraintex as material, even though I'm not using a terrain at all

Uhm ... what?

What did you do in order to achieve the screenshot?


Always learn from history, to be sure you make the same mistakes again...
Re: Multi texturing/texture blending for models [Re: Uhrwerk] #417734
02/16/13 18:17
02/16/13 18:17
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Multi texturing/texture blending for models [Re: Superku] #417735
02/16/13 18:28
02/16/13 18:28
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Just wanted to suggest triplanar texturemapping but Superku was faster grin

I guess using this is the best solution (if you are able to use shaders).


POTATO-MAN saves the day! - Random
Re: Multi texturing/texture blending for models [Re: Uhrwerk] #417744
02/16/13 19:25
02/16/13 19:25
Joined: Apr 2002
Posts: 680
Germany
Turrican Offline OP
User
Turrican  Offline OP
User

Joined: Apr 2002
Posts: 680
Germany
Quote:
Uhm ... what?

What did you do in order to achieve the screenshot?


I thought it was obvious, but perhaps I should go more into the details here. I created the model (1a) and unwrapped it afterwards (1b). Then, I painted the alpha mask for the second texture (2d) directly onto the model's surface.

I imported the model using MED and assigned the first texture (2a) with completely opaque alpha (2b, in a 32-bit TGA, if that matters) to skin1 and another texture (2c), that I wanted to blend over the first one, to skin2. The latter has the previously prepared alpha channel.

I saved all that stuff as MDL, loaded it up into WED, assigned mtl_terraintex as material, built the WMB, started my project and made the screenshot.

Now I guess you wanted to imply that I'm completely nuts, but let me explain my theory: when I have an HMP file, it still has the usual UV mapping as any other model. The textures assigned to its various skins are nothing more but images with visibility information for the UV coordinates. So I thought, what works for heightmaps should very well work for models, too (which prove wrong, as you can tell by my initial post).



Thanks @Superku and Kartoffel. This technique does indeed look very helpful. I'll have a look into that, though I doubt I'll be able to make use of it. I'll just post again as soon as I encounter problems.

Re: Multi texturing/texture blending for models [Re: Turrican] #417752
02/16/13 20:28
02/16/13 20:28
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Originally Posted By: Turrican
Now I guess you wanted to imply that I'm completely nuts
No. I just wouldn't have come to that idea.
Originally Posted By: Turrican
when I have an HMP file, it still has the usual UV mapping as any other model.
Unfortunately this is not the case AFAIK. That's why mtl_terraintex3 won't work for models. But why did you use a model when you wanted a terrain in the first place?


Always learn from history, to be sure you make the same mistakes again...
Re: Multi texturing/texture blending for models [Re: Uhrwerk] #417756
02/16/13 20:38
02/16/13 20:38
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
The shader I once posted (the one Superku posted the link) is like a better version of a terrain-texturing shader.
It just doesn't support mutliple textures. (but this can be changed)


POTATO-MAN saves the day! - Random
Re: Multi texturing/texture blending for models [Re: Uhrwerk] #417757
02/16/13 20:45
02/16/13 20:45
Joined: Apr 2002
Posts: 680
Germany
Turrican Offline OP
User
Turrican  Offline OP
User

Joined: Apr 2002
Posts: 680
Germany
Quote:
No. I just wouldn't have come to that idea.

Okay, I think I got you wrong then. Nevermind! ^^

Quote:
Unfortunately this is not the case AFAIK. That's why mtl_terraintex3 won't work for models. But why did you use a model when you wanted a terrain in the first place?

I think you nailed the problem here. The reason why I'm using models instead of terrain is that I need very organic shapes for my level architecture. See, I'm working on a sidescroller (imagine something like The Cave), and working with terrains and blocks is sort of outta question, because I need to be very flexible and stuff.

Anyway, I got that shader Superku and Kartoffel were pointing me to working so far and I also somehow managed to implement three different textures for different slope angles. I think that will create roughly the same effect I was trying to achieve with the aforementioned method. Thanks! laugh


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