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
5 registered members (AbrahamR, wdlmaster, 7th_zorro, dr_panther, 1 invisible), 764 guests, and 5 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
Normal Map - Models with multiple textures #136870
06/17/07 15:38
06/17/07 15:38
Joined: Apr 2004
Posts: 83
DWilki Offline OP
Junior Member
DWilki  Offline OP
Junior Member

Joined: Apr 2004
Posts: 83
So, I've had quite a bit of success with various shaders. One problem I see is that model geometry with multiple textures will not work with shaders. At least I cannot find a way for them to work. By this I mean the following:

1) Create a model
2) Assign multiple textures and UV on the mesh
3) Import into med and "Manage Skins"
4) For some of models, I may have up to 7 or 8 textures assigned.

In the past, my solution has been to merge all textures into one larger texture (1024x1024) and then re-do the uv layout. This is a lot of extra work. It would be much easier to manage the models and textures if I didnt need to do this.

Is their a way to work with models and assign shaders to models with multiple textures? Hope that makes sense.

As an example, other engines that I work with allow me to assign shaders at the texture level with materials. It doesnt matter that the model has multiple textures becuse the materials and shaders are managed at the texture level.

I think I may just be missing something.

Re: Normal Map - Models with multiple textures [Re: DWilki] #136871
06/17/07 15:50
06/17/07 15:50
Joined: Apr 2004
Posts: 83
DWilki Offline OP
Junior Member
DWilki  Offline OP
Junior Member

Joined: Apr 2004
Posts: 83
Actually, I may have answered my own question. Let me know if this is correct. This information is from Taco Cohen's Introduction to Shader Programming:

"Since engine version 6.40.5, you can assign materials to (a part of) a model in MED. In MED, go to Edit > Manage Skins. If there is a skin already, click [Skin Settings], if there is no skin yet, click [New Skin]. Check the “Effect Setup” and “Texture” Boxes and choose an effect file (.fx) and a texture file."

This way, it doesnt matter how may textures are assigned to a model, I would just assign the .fx file in the Mana Skins properties.

Re: Normal Map - Models with multiple textures [Re: DWilki] #136872
06/17/07 16:40
06/17/07 16:40
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
The engine should auto manage your skins for normalmapping. Simply pair your skins...

ex:
skin1: Diffuse01
skin2: Normal01
Skin3: Diffuse02
skin4: normal02
etc.


xXxGuitar511
- Programmer
Re: Normal Map - Models with multiple textures [Re: xXxGuitar511] #136873
06/17/07 19:45
06/17/07 19:45
Joined: Apr 2004
Posts: 83
DWilki Offline OP
Junior Member
DWilki  Offline OP
Junior Member

Joined: Apr 2004
Posts: 83
Quote:



ex:
skin1: Diffuse01
skin2: Normal01
Skin3: Diffuse02
skin4: normal02
etc.




Thats good news. So, in the case of the FX file where I have (using your shader) entSkin1 and entSkin2, these variables will automagically know to pair skins 3 and 4 and 4 and 5 etc as diffuse and normal maps? From your code below:

sampler ColorMapSampler = sampler_state
{
Texture = <entSkin1>;
MinFilter = Linear;
MagFilter = Linear;
MipFilter = Linear;
AddressU = wrap;
AddressV = wrap;
};


sampler BumpMapSampler = sampler_state
{
Texture = <entSkin2>;
MinFilter = Linear;
MagFilter = Linear;
MipFilter = Linear;
AddressU = wrap;
AddressV = wrap;
};

Re: Normal Map - Models with multiple textures [Re: DWilki] #136874
06/18/07 02:38
06/18/07 02:38
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
From what I've read and heard, yes. Though I have actually never tested this. I'm working towards [finally] purchasing SPHERE so I can actually use these shaders in a project with > 30 fps...


xXxGuitar511
- Programmer

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