Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
7 registered members (fairtrader, Quad, miwok, Martin_HH, AndrewAMD, alibaba, dpn), 581 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
shader to(single)textures (mulititex model) in 6.4 #84097
08/01/06 19:18
08/01/06 19:18
Joined: Jun 2005
Posts: 4,875
broozar Offline OP
Expert
broozar  Offline OP
Expert

Joined: Jun 2005
Posts: 4,875
Hi all,

I and some other guys are still not coming along with the new MED functions, especially the shader/fx-function.

say, i have a model containing 4 textures (~15 materials, but they share four textures). i want to apply a BMshader to just one texture. the shader requires one texture map (entSkin1, containing alpha for specularity) and one BMap (in mtlSkin1).

the problem is, if i want to to apply the shader like in 6.3, the bump map is covering the WHOLE model, not just the part it should.


--->How to avoid that?<---


things I already tried:
-naming the material like the original material name in MED, setting the d3d_automaterial to 2.
>nothing
-assigning the fx file under MED, defining the material with the name like in MED.
>the part i wanted to apply the effect to has just DISAPPEARED. the rest of the model stays unchanged.
-for test, i tried to name the material after the model's name.
>model comes out significantly darker, but no shader at all.

I appreciate any help that could be given to me. Thanks in advance.

Re: shader to(single)textures (mulititex model) in 6.4 [Re: broozar] #84098
08/02/06 13:31
08/02/06 13:31
Joined: Sep 2005
Posts: 159
The Netherlands
D
Dutchie666 Offline
Member
Dutchie666  Offline
Member
D

Joined: Sep 2005
Posts: 159
The Netherlands
maybe just add the fx to the texture you want it on. but in the shader himself use another ent_skin(a higher number) wich isn't used by the model? dont know if you tried that already...

Re: shader to(single)textures (mulititex model) in [Re: Dutchie666] #84099
08/02/06 19:55
08/02/06 19:55
Joined: Jun 2005
Posts: 4,875
broozar Offline OP
Expert
broozar  Offline OP
Expert

Joined: Jun 2005
Posts: 4,875
no changes.

come on, lads. i cannot imagine noone uses shaders here in connection with multi skin models...

ello? matt? steempipe? dan? frank? oliver? .... ..anyone...?

Last edited by DaBro0zar; 08/02/06 19:56.
Re: shader to(single)textures (mulititex model) in [Re: broozar] #84100
08/02/06 20:08
08/02/06 20:08
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
multi-skin model=bad

Dont use them..problem solved

ANyway, i dont know how A6 does the skin assignments, but in D3D the model is treated as seperate subset meshes, therefore only one of the subsets needs to be rendered with this material.. I dont think you can do this in A6 in the normal way. There may be some functionality I'm not aware of in A6.. ask JCL.

However, if what you really want is the shader to affect only a certain part of your model, the easiest thing is to simply apply the shader to the whole model, and use a special mask texture like an alpha channel in the specified texture, that control wether the shdaer effects are visible..So just set the alpha to be black on all textures except the one where you want the bump mapping, and just have soething like this in your pixel shader:

float3 regular_lighting_term;
float3 bump_mapping_term;
..........
//do your calculations

final_color.rgb=lerp(regular_lighting_term,bump_mapping_term,entskin.a);

granted this is not a pretty solution but it should work..otherthen that, I dont know.


Sphere Engine--the premier A6 graphics plugin.
Re: shader to(single)textures (mulititex model) in [Re: Matt_Aufderheide] #84101
08/04/06 19:26
08/04/06 19:26
Joined: Jun 2005
Posts: 4,875
broozar Offline OP
Expert
broozar  Offline OP
Expert

Joined: Jun 2005
Posts: 4,875
if someone managed to apply a shader to just one skin of a multitexture model, i beg you to post a testlevel here.

Re: shader to(single)textures (mulititex model) in [Re: broozar] #84102
08/07/06 03:16
08/07/06 03:16
Joined: Aug 2005
Posts: 1,185
Ukraine
Lion_Ts Offline
Serious User
Lion_Ts  Offline
Serious User

Joined: Aug 2005
Posts: 1,185
Ukraine
I'll be short:

Model uses 1 dds texture (2 skins, one with fx applied). Therefore, You can assign different textures to these 2 skins.

Re: shader to(single)textures (mulititex model) in [Re: broozar] #84103
08/07/06 03:26
08/07/06 03:26
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
Quote:

if someone managed to apply a shader to just one skin of a multitexture model, i beg you to post a testlevel here.




While I dont have a test, my method is certain to work.. use alpha channels to control what area or what texture is affected.. it couldnt be simpler.

This is not a nice solution, but would work in any case.


Sphere Engine--the premier A6 graphics plugin.
Re: shader to(single)textures (mulititex model) in [Re: Matt_Aufderheide] #84104
08/07/06 14:35
08/07/06 14:35
Joined: Jun 2005
Posts: 4,875
broozar Offline OP
Expert
broozar  Offline OP
Expert

Joined: Jun 2005
Posts: 4,875
@lion: can you please post a DL link for me so i can use it as kinda "reference"... thanks.

Re: shader to(single)textures (mulititex model) in [Re: broozar] #84105
08/07/06 21:55
08/07/06 21:55
Joined: Aug 2005
Posts: 1,185
Ukraine
Lion_Ts Offline
Serious User
Lion_Ts  Offline
Serious User

Joined: Aug 2005
Posts: 1,185
Ukraine
DaBro0zar, click on the image. This is the link to project sources.
Applied simple 'overlay check' effect to the left cube. The right one has no effect applied. Cubes are one model.

Re: shader to(single)textures (mulititex model) in [Re: Lion_Ts] #84106
08/08/06 08:11
08/08/06 08:11
Joined: Jun 2005
Posts: 4,875
broozar Offline OP
Expert
broozar  Offline OP
Expert

Joined: Jun 2005
Posts: 4,875
thank you for posting it.
however, this is weird, when i use the wiki shader, the cube is invisible - exactly what happened with my model. so don't say "it's the shader", i know it works.
on the other hand, what you used is no real shader, only a FFE, maybe that's the point, i gonna have to ask jcl about that.
however, thanks for your help.

if you manage to get the Bumpmapping shader (only sunlight) from the wiki on this model to work, please let me know


[edit]
did some testing:
i assign the materials with ent_mtlset now, this is very handy. i get the following results:
as long as I use FFEs, everything works. but all of the shaders which have to be compiled first produce invisible model parts...

Page 1 of 3 1 2 3

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