|
7 registered members (fairtrader, Quad, miwok, Martin_HH, AndrewAMD, alibaba, dpn),
581
guests, and 0
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
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
OP
Expert
|
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
[Re: Dutchie666]
#84099
08/02/06 19:55
08/02/06 19:55
|
Joined: Jun 2005
Posts: 4,875
broozar
OP
Expert
|
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
Matt_Aufderheide
Expert
|
Expert
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.
|
|
|
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
Matt_Aufderheide
Expert
|
Expert
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.
|
|
|
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
OP
Expert
|
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...
|
|
|
|